09 — Deploy
Purpose: Conduct thorough QA, set up Firebase infrastructure, and deploy MVP to production
Outcome: Have a deployed, tested, and monitored MVP ready for users
Audience: PM / Dev / Both
Time: 1-2 days
Prerequisites: 08 — Build Features - Working MVP features ready for private beta
Learning Outcomes
By the end of this chapter, you will be able to:
Conduct thorough quality assurance testing before deployment
Set up Firebase project with Authentication, Hosting, and Functions
Configure environment variables and Firebase services
Set up Google Analytics and LogRocket for monitoring
Build and deploy MVP to production using Firebase
Jobs-to-Be-Done
When: I have working MVP features and need to deploy to production
I want: To conduct QA, set up Firebase infrastructure, and deploy the MVP
So that: Users can access a tested, monitored, and functional MVP
Inputs
Working MVP features from 08 — Build Features
Firebase account (create if needed)
Understanding of Firebase services (Authentication, Hosting, Functions)
Access to Google Analytics (via Firebase)
LogRocket account (create if needed)
Activities
1. Conduct Quality Assurance
Before Deployment: Conduct thorough quality assurance to identify and fix issues before deployment.
Option 1: Manual Testing
Process:
Test the entire application flow manually
Navigate through all user journeys
Test all features and functionality
Test error cases and edge states
Document all issues with as much detail as possible:
What component or feature has the issue
What the expected behavior is
What the actual behavior is
Steps to reproduce
Screenshots or videos if helpful
Provide the documented issues to Cursor Planning agent
Use Cursor's planning function in a new chat to create a fix plan
Review and approve the fix plan
Let Cursor implement the fixes
Test again after fixes are pushed
Issue Documentation Example:
Issues Found:
1. Login validation errors don't display properly
- Expected: Error message appears below input field
- Actual: No error message appears
- Steps: Try to login with invalid email format
- Screenshot: [attach screenshot]
2. Dashboard cards overlap on mobile devices
- Expected: Cards stack vertically on mobile
- Actual: Cards overlap each other
- Steps: View dashboard on mobile device (375px width)
- Screenshot: [attach screenshot]💡 Tip: Be thorough with manual testing. Document everything - it helps Cursor fix issues more effectively.
Option 2: Cursor Agent with Browser (Automated Testing)
Process:
Use Cursor Agent with Browser to navigate through the app
Cursor will automatically test user flows and record inconsistencies
Cursor will identify issues and inconsistencies
Once testing completes, Cursor will automatically fix bugs
Review the fixes and test again manually
Ensure all issues are resolved
💡 Tip: Cursor Agent with Browser saves significant time and provides comprehensive automated testing. It's extremely helpful for catching issues you might miss.
After Testing:
Ensure you test again after pushing fixes
Verify all issues are resolved
Test the complete user journey one more time
Ensure the application is ready for deployment
⚠️ Warning: Don't skip QA. Thorough testing before deployment prevents issues that affect real users.
2. Set Up Firebase Project
Create Firebase Account and Project:
Go to Firebase Console
Create a Firebase account (if you don't have one)
Create a new Firebase project
Follow the setup wizard
Note your project ID and configuration
Configure Firebase Services:
Authentication: Will be enabled in next step
Hosting: Will be configured in next step
Functions: Will be configured if needed
Cloud Firestore: Will be configured if needed
📝 Note: This playbook focuses on Firebase Authentication, Hosting, and Functions as a base. Configure these services as instructed by Cursor.
3. Set Up Environment Variables
Configure Environment Variables:
Set up environment variables for your Firebase project
Configure API keys and secrets
Set up Firebase configuration
Follow Cursor's instructions for environment variable setup
Environment Variables to Configure:
Firebase API keys
Firebase project configuration
AI API keys (if applicable)
Other service API keys
Environment-specific settings
💡 Tip: Use
.envfiles for local development and Firebase Functions environment configuration for production. Never commit secrets to version control.
4. Set Up Firebase Authentication
Enable Authentication:
Enable Firebase Authentication in Firebase Console
Configure authentication methods:
Social Login: Enable Google, GitHub, or other providers as desired
Email/Password: Enable email and password authentication if desired
Follow Cursor's instructions for setting up authentication
Configure authentication providers in your application
Test authentication flow
Authentication Methods:
Social login (Google, GitHub, etc.)
Email and password
Custom authentication (if needed)
📝 Note: Enable authentication methods based on your PRD requirements. Social login is recommended for MVP simplicity.
5. Add Google Analytics Through Firebase
Set Up Google Analytics:
Enable Google Analytics in Firebase Console
Link Google Analytics to your Firebase project
Follow Cursor's instructions for integrating Google Analytics
Configure analytics tracking in your application
Set up essential events tracking:
User signup
Core feature usage
Journey completion
Errors
Verify analytics events are firing
Analytics Events:
User signup/login
Core feature usage
User journey completion
Error events
Custom events as needed
💡 Tip: Start with essential events. You can add more tracking later based on what you learn.
6. Install and Set Up LogRocket
Set Up LogRocket:
Create a LogRocket account (if you don't have one)
Create a new project in LogRocket
Install LogRocket SDK in your application
Configure LogRocket for session tracking and bug reporting
Follow Cursor's instructions for LogRocket setup
Test LogRocket integration
Verify session replay is working
LogRocket Features:
Session replay
Bug reporting
Error tracking
Performance monitoring
📝 Note: LogRocket provides session tracking and bug reporting which is essential for understanding user behavior and debugging issues in production.
7. Build and Deploy
Final Steps Before Launch:
Ensure all QA issues are resolved
Verify Firebase services are configured
Verify environment variables are set
Verify authentication is working
Verify Google Analytics is tracking
Verify LogRocket is recording sessions
Build Production Bundle:
npm run buildDeploy to Firebase:
firebase deployVerify Deployment:
Visit your deployed URL
Test the complete user journey
Verify all features work in production
Check that analytics and LogRocket are working
Verify authentication is working
🎉 Congratulations! Your MVP is now deployed and ready for users.
Apply It Now
Task: Conduct QA, set up Firebase, and deploy MVP
Conduct thorough quality assurance (manual or Cursor Agent)
Document issues and get them fixed by Cursor
Test again after fixes
Create Firebase account and project
Set up environment variables
Configure Firebase Authentication (social login and/or email/password)
Add Google Analytics through Firebase
Install and set up LogRocket
Build production bundle (
npm run build)Deploy to Firebase (
firebase deploy)Verify deployment and test in production
Artifact: A deployed MVP with:
QA issues resolved
Firebase infrastructure set up
Authentication configured
Google Analytics tracking
LogRocket session tracking
Production deployment live
Artifacts
You'll create:
QA issue documentation and fixes
Firebase project configuration
Environment variables setup
Firebase Authentication configuration
Google Analytics integration
LogRocket integration
Production deployment
Worked Example
Situation: Deploying retrospective tool MVP
QA Process:
Manual Testing: Tested entire application flow
Found 5 issues: login validation, mobile layout, AI loading state, export button, error handling
Documented all issues with details and screenshots
Provided to Cursor Planning agent
Cursor created fix plan with 8 tasks
Approved fix plan
Cursor implemented fixes
Tested again - all issues resolved
Firebase Setup: Created Firebase project
Project name: "retro-tool-mvp"
Project ID: "retro-tool-mvp"
Configured Authentication, Hosting, Functions
Environment Variables: Set up configuration
Firebase API keys
Anthropic API key
Environment-specific settings
Authentication: Enabled Firebase Auth
Enabled Google social login
Enabled email/password authentication
Configured in application
Tested authentication flow
Google Analytics: Added through Firebase
Enabled Google Analytics in Firebase Console
Configured essential events: signup, journey completion, errors
Verified events are firing
LogRocket: Installed and configured
Created LogRocket project
Installed SDK
Configured session tracking
Verified session replay working
Deployment: Built and deployed
Ran
npm run build- successRan
firebase deploy- successDeployed URL:
https://retro-tool-mvp.web.appTested in production - all features working
Time: QA and deployment took 1.5 days
Checklist
Before proceeding to the next chapter, verify:
Self-Assessment
What should you do before deploying?
What Firebase services should be set up? (Select all)
What monitoring tools should be set up? (Select all)
Exit Criteria
You're ready to proceed when:
Dependencies & Next Steps
Prerequisites Completed
08 — Build Features - Working MVP features ready for private beta
Next Steps
Proceed to Launch & Iterate to launch MVP and gather feedback
What This Enables
Deployment enables:
Users can access the MVP
Real user feedback opportunities
Learning from actual usage
Iteration and improvement based on data
Monitoring and debugging capabilities
💡 Tip: Don't skip QA. Thorough testing before deployment prevents issues that affect real users. 📝 Note: This playbook focuses on Firebase (Authentication, Hosting, Functions) as the base. Follow Cursor's instructions for setup. ⚠️ Warning: Test thoroughly before deployment. Production issues affect real users. Ensure all QA issues are resolved. 🎉 Launch: The final step is
npm run buildfollowed byfirebase deploy. Your MVP is now live!
Last updated