Deployment
Deploy your SaaS app to production with Vercel in minutes.
shipsaas is optimized for Vercel deployment with automatic HTTPS, global CDN, and instant rollbacks.
Deploying to Vercel
Option 1: Deploy via Git (Recommended)
- Push code to GitHub/GitLab/Bitbucket
git init git add . git commit -m "Initial commit" git remote add origin https://github.com/yourusername/your-repo.git git push -u origin main - Import to Vercel
- Go to vercel.com and sign in
- Click Add New → Project
- Import your Git repository
- Vercel will auto-detect Next.js settings
- Configure Environment Variables
Add all your
.env.localvariables in Vercel:- Go to Settings → Environment Variables
- Add each variable from your
.env.local - Update URLs to production values
- Deploy
Click Deploy and wait for the build to complete (~2 minutes)
Option 2: Deploy via CLI
- Install Vercel CLI
npm i -g vercel - Login to Vercel
vercel login - Deploy
vercel --prod
Environment Variables
Make sure to set these production environment variables in Vercel:
# Authentication - Auth.js v5
AUTH_SECRET=your-production-secret
# Google OAuth
AUTH_GOOGLE_ID=your-google-client-id
AUTH_GOOGLE_SECRET=your-google-client-secret
# Database - Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-anon-key
# Stripe (PRODUCTION KEYS!)
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Email - Mailgun (Optional)
MAILGUN_API_KEY=your-mailgun-api-key⚠️ Important: Use production/live keys for Stripe and other services. Never use test keys in production!
Custom Domain Setup
- In Vercel dashboard, go to Settings → Domains
- Enter your custom domain (e.g.,
yourdomain.com) - Add DNS records to your domain provider:
- Type:
A, Name:@, Value:76.76.21.21 - Type:
CNAME, Name:www, Value:cname.vercel-dns.com
- Type:
- Wait for DNS propagation (can take up to 48 hours)
- Vercel will automatically provision SSL certificate
Post-Deployment Checklist
Update Stripe webhook URL to production domain
Update OAuth redirect URIs (Google, etc.) to production
Test authentication flow end-to-end
Test payment checkout and webhooks
Verify email sending works
Check all environment variables are set
Test on mobile devices
Run Lighthouse audit for performance
Set up error monitoring (optional: Sentry)
Configure analytics (optional: Google Analytics)
Continuous Deployment
With Vercel's Git integration, deployment is automatic:
- •Push to main branch → Automatic production deployment
- •Push to other branches → Preview deployments with unique URLs
- •Pull requests → Automatic preview deployments for testing
Troubleshooting
Build Failures
- •Check build logs in Vercel dashboard
- •Run
npm run buildlocally to reproduce - •Ensure all environment variables are set
Authentication Issues
- •Verify
AUTH_SECRETis set and is a strong random string - •Update OAuth redirect URIs to production URLs
- •Check
AUTH_GOOGLE_IDandAUTH_GOOGLE_SECRETare correct
Webhook Not Working
- •Update webhook URL in Stripe dashboard to production domain
- •Get new webhook signing secret for production endpoint
- •Check Vercel function logs for errors
🎉 Congratulations! Your SaaS app is now live and ready to accept users and payments!