Deployment .
The template is optimized for modern cloud platforms. Follow these steps to ensure your production environment is secure and fully functional.
1. Production Database
Ensure you are using a production-ready PostgreSQL instance. Update your DATABASE_URL to point to your live database.
SSL Requirement: Most cloud databases require?sslmode=requireat the end of the connection string.
2. Build Configuration
Your hosting provider should run the following commands during the build phase:
npx prisma generate && next build
This ensures the Prisma Client is updated with your production schema before the Next.js build starts.
3. Environment Variables
In your hosting dashboard, make sure to update these key variables for production:
NEXT_PUBLIC_APP_URL
Set this to your live domain (e.g., https://yourapp.com)
4. Stripe Webhooks
Once deployed, create a **Production Webhook** in your Stripe Dashboard. Point it to:
Update the STRIPE_WEBHOOK_SECRET in your production environment with the new live secret.
Your SaaS is Live!
Verify your authentication flows and stripe payments on the live URL to ensure everything is synced correctly.