Documentation guide for Vercel deployment, environment variables, and production launch checks.
Deploy Nexora to production.
Use this deployment guide to move your SaaS boilerplate from local development to Vercel with production environment variables, MongoDB, Stripe webhooks, email, analytics, and post-launch testing.
Vercel deployment
Deploy the app after the local build is clean.
Vercel deployment is straightforward when the repository, build command, environment variables, and production callbacks are aligned.
Step 1
Push the project to GitHub
Vercel deploys cleanly from a Git repository. Push the SaaS boilerplate after local type-check, lint, and build pass.
Deployment example
git add .
git commit -m "Prepare production deployment"
git push origin mainStep 2
Import the app into Vercel
Create a Vercel project from the repository, select the Next.js framework preset, and keep the default build output.
Deployment example
Framework Preset: Next.js
Build Command: next build
Output Directory: .nextStep 3
Add production environment variables
Configure app URLs, auth secrets, database credentials, Stripe keys, email settings, analytics, and admin emails before first deploy.
Deployment example
NEXT_PUBLIC_APP_URL=https://nexora.collabtower.com
NEXTAUTH_URL=https://nexora.collabtower.com
NEXTAUTH_SECRET=your-production-secret
MONGODB_URI=mongodb+srv://...Step 4
Connect MongoDB Atlas
Use a production database, database user, network access rule, and connection string that Vercel can reach.
Deployment example
MONGODB_URI=mongodb+srv://user:password@cluster.mongodb.net/nexoraStep 5
Switch Stripe to production
Use live Stripe keys, production price IDs, and a live webhook endpoint pointed at your deployed domain.
Deployment example
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...Step 6
Add the production domain
Attach your custom domain, update DNS, then update app URLs and Stripe webhooks to use the final domain.
Deployment example
A record: @ -> 76.76.21.21
CNAME: www -> cname.vercel-dns.com
Webhook: https://nexora.collabtower.com/api/stripe/webhookEnvironment variables
Add production values before deploy.
Treat Vercel environment variables as part of the deployment. Missing or stale values are the most common cause of production launch issues.
App and auth
NEXT_PUBLIC_APP_NAMENEXT_PUBLIC_APP_URLNEXTAUTH_URLNEXTAUTH_SECRETADMIN_EMAILS
Database
MONGODB_URI
Stripe billing
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYSTRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRETSTRIPE_PRICE_ID_BASICSTRIPE_PRICE_ID_PROSTRIPE_PRICE_ID_ENTERPRISE
Email and analytics
EMAIL_SERVER_HOSTEMAIL_SERVER_PORTEMAIL_SERVER_USEREMAIL_SERVER_PASSWORDEMAIL_FROMNEXT_PUBLIC_POSTHOG_KEYNEXT_PUBLIC_POSTHOG_HOST
Production checklist
Confirm the basics before customers arrive.
Run npm run type-check, npm run lint, and npm run build locally.
Use production Stripe keys instead of test keys.
Generate a new NEXTAUTH_SECRET for production.
Set NEXT_PUBLIC_APP_URL and NEXTAUTH_URL to the same production domain.
Confirm MongoDB Atlas network access and database user permissions.
Point the Stripe webhook endpoint to /api/stripe/webhook on the live domain.
Configure email credentials and verify the sender domain or inbox.
Test signup, signin, dashboard access, checkout, billing portal, and profile updates after deployment.
Post-deployment tests
Test the product as a customer would.
Homepage and marketing pages
Visit the homepage, pricing, features, docs, and SEO landing pages. Confirm styles, metadata, and links load.
Authentication
Create an account, sign in, verify protected dashboard access, and test profile updates.
Stripe billing
Open checkout from pricing, complete a test payment in the correct environment, and verify webhook delivery.
Customer portal
Open the billing portal from an authenticated account and confirm the return URL leads back to the dashboard.
Email delivery
Trigger verification or password recovery flows and confirm production email settings work.
Analytics
Visit key pages and check PostHog or your analytics provider for production events.
Troubleshooting
Common production deployment issues.
Vercel deployment fails during build
Run npm run build locally, compare Node versions, and confirm all required environment variables exist in Vercel.
Environment variables are undefined
Check exact variable names, redeploy after adding variables, and use NEXT_PUBLIC_ only for values needed in the browser.
Auth redirects to localhost
Update NEXTAUTH_URL and NEXT_PUBLIC_APP_URL to the production domain in Vercel, then redeploy.
Stripe webhooks fail in production
Confirm the webhook endpoint URL, selected events, and STRIPE_WEBHOOK_SECRET match the live Stripe endpoint.
MongoDB connection times out
Check Atlas network access, connection string, password encoding, and database user permissions.
Deployment questions
Answers before going live.
How do I deploy Nexora to Vercel?
Push the project to GitHub, import it into Vercel as a Next.js app, add production environment variables, connect MongoDB and Stripe, then run a production deployment.
Which environment variables are required for production?
You need app URLs, NEXTAUTH_SECRET, MongoDB URI, Stripe keys and price IDs, Stripe webhook secret, email credentials, analytics keys, and admin emails.
What should I test after deploying a SaaS boilerplate?
Test the homepage, signup, signin, protected dashboard, profile updates, checkout, Stripe webhooks, billing portal, email delivery, and analytics events.
Deploy with the SaaS systems aligned.
Nexora gives you the Next.js app, auth, Stripe billing, dashboard, analytics, and docs foundation. This checklist helps you ship that foundation safely.