DEV Community

huangyongshan46-a11y
huangyongshan46-a11y

Posted on

Deploy a Next.js SaaS to Vercel in 5 Minutes (Complete Checklist)

Deploying a Next.js SaaS app to Vercel should take 5 minutes. Here is the exact checklist.

Prerequisites

  • GitHub repo with your Next.js app
  • Vercel account (free tier works)
  • Environment variables ready

Step 1: Push to GitHub

git add -A && git commit -m "Ready to deploy" && git push
Enter fullscreen mode Exit fullscreen mode

Step 2: Import in Vercel

  1. Go to vercel.com/new
  2. Import your GitHub repo
  3. Framework: Next.js (auto-detected)
  4. Click Deploy

Step 3: Environment Variables

Add these in Vercel dashboard → Settings → Environment Variables:

DATABASE_URL=postgresql://...
AUTH_SECRET=your-secret
AUTH_URL=https://your-domain.vercel.app
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
OPENAI_API_KEY=sk-...
RESEND_API_KEY=re_...
NEXT_PUBLIC_APP_URL=https://your-domain.vercel.app
Enter fullscreen mode Exit fullscreen mode

Step 4: Database

For PostgreSQL, use one of:

  • Supabase (free tier, managed Postgres)
  • Neon (free tier, serverless Postgres)
  • Railway (free tier, hosted Postgres)

Copy the connection string to DATABASE_URL.

Step 5: Stripe Webhook

  1. Go to Stripe Dashboard → Developers → Webhooks
  2. Add endpoint: https://your-domain.vercel.app/api/stripe/webhook
  3. Select events: checkout.session.completed, invoice.payment_succeeded, customer.subscription.deleted
  4. Copy the webhook signing secret to STRIPE_WEBHOOK_SECRET

Step 6: OAuth Redirect URIs

Update your Google/GitHub OAuth apps:

  • Authorized redirect URI: https://your-domain.vercel.app/api/auth/callback/google
  • Same pattern for GitHub

Step 7: Custom Domain (optional)

Vercel dashboard → Settings → Domains → Add your domain.

The 5-minute version

If you use a starter kit like LaunchKit, all the routes, env vars, and configurations are pre-set. You literally just:

  1. Push to GitHub
  2. Import in Vercel
  3. Add env vars
  4. Done

Preview | Get LaunchKit ($49)

Top comments (0)