Quick Deploy
The fastest way to deploy this project is using the Vercel deployment button:Prerequisites
Before deploying to Vercel, ensure you have:- A Vercel account
- A Supabase project with database configured
- A Dodo Payments account with API keys
- Google OAuth configured in your Supabase project
- Database schema deployed (run
bun run db:pushlocally first)
Manual Deployment Steps
1. Install Vercel CLI (Optional)
2. Connect Your Repository
- Go to Vercel Dashboard
- Click “Add New…” → “Project”
- Import your Git repository
- Select the repository containing your starter kit
3. Configure Environment Variables
In the Vercel project settings, add all required environment variables. See the Environment Variables page for complete details. Required variables:NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYDATABASE_URLDODO_PAYMENTS_API_KEYDODO_WEBHOOK_SECRETDODO_PAYMENTS_ENVIRONMENT
4. Deploy
Click “Deploy” and Vercel will:- Build your Next.js application
- Deploy to a production URL
- Set up automatic deployments for future pushes
5. Configure OAuth Redirect URLs
After deployment, update your OAuth provider settings: Google OAuth (in Google Cloud Console): Add these authorized redirect URIs:6. Update Webhook URL
In your Dodo Payments dashboard, update the webhook endpoint to use your production URL:Build Configuration
The starter kit uses the default Next.js build configuration. No custom Vercel configuration is needed.Build Command
Output Directory
Install Command
Environment-Specific Settings
Development vs Production
Make sure to use the correct environment settings: Development:Deployment Checklist
Before deploying to production:- All environment variables are set correctly
- Database schema is deployed to Supabase
- Webhook function is deployed to Supabase
- Google OAuth is configured with production URLs
- Dodo Payments webhook URL is updated
- Products are created in Dodo Payments dashboard
- Test a complete user flow (signup, subscribe, webhook processing)
- Switch to
live_modefor Dodo Payments
Automatic Deployments
Vercel automatically deploys:- Production: Every push to your main/master branch
- Preview: Every push to pull requests and other branches
Troubleshooting
Build Fails
Check build logs in the Vercel dashboard for specific errors. Common issues:- Missing environment variables
- TypeScript errors
- Dependency installation failures
Authentication Not Working
Verify OAuth redirect URLs are correctly configured in:- Google Cloud Console
- Supabase Authentication settings
- Include both development and production URLs
Webhooks Not Received
Check webhook configuration:- Webhook URL is correct in Dodo Payments dashboard
- Webhook secret matches your environment variable
- Supabase function is deployed (verify in Supabase dashboard)
- Function logs show incoming requests
Database Connection Issues
Verify DATABASE_URL:- Format:
postgresql://postgres:[password]@db.[project-ref].supabase.co:5432/postgres - Password is URL-encoded if it contains special characters
- Supabase project is active and accessible
Performance Optimization
Edge Functions
Vercel deploys your Next.js application to the Edge by default, ensuring low latency globally.Caching Strategy
The starter kit uses Next.js 15’s built-in caching mechanisms:- Static pages are cached at the CDN
- API routes use appropriate cache headers
- Supabase responses are cached when appropriate
Database Connection Pooling
Supabase automatically handles connection pooling. No additional configuration needed.Monitoring
Vercel Analytics
Enable Vercel Analytics to monitor:- Page load times
- Core Web Vitals
- User sessions
Supabase Logs
Monitor webhook processing in:- Supabase Dashboard → Functions → dodo-webhook → Logs
Dodo Payments Dashboard
Track payment and subscription events in your Dodo Payments dashboard.Scaling Considerations
The starter kit is built to scale:- Serverless architecture: Automatically scales with traffic
- Edge deployment: Low latency worldwide
- Connection pooling: Efficient database connections
- Managed services: Supabase and Vercel handle infrastructure
For high-traffic applications, consider upgrading your Vercel and Supabase plans to ensure adequate resources.
