Launch time!

Complete guide to deploying your Next.js application.

Deployment Checklist

1. Google Authentication Setup

  • Google Cloud Console: Create OAuth 2.0 Client IDs for web applications.
  • Credentials: Obtain GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.
  • Environment Variables: Add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to your Vercel project's environment variables (Production, Preview, Development).
  • Authorized redirect URIs: Set the correct redirect URI in Google Cloud Console (e.g., https://yourdomain.com/api/auth/callback/google). Ensure this matches NEXTAUTH_URL.

2. Stripe Deployment Checklist

  • Turn OFF Test Mode in your Stripe Dashboard
  • In your [Developers], copy your public & private keys and add them to STRIPE_SECRET_KEY & STRIPE_PUBLIC_KEY in your production environment variables. In developers/webhook
  1. Add Enpoint
  2. Set your domain
  3. Set /api/webhook/. Select [checkout.session.completed] event, copy the signing secret and add it to STRIPE_WEBHOOK_SECRET in your production environment variables.
  4. In settings/customers-emails, activate emails for successful payments & refunds

3. Vercel Setup

We'll only deploy to Vercel in this, since it's just work the best.

  1. Create a project with the associated git repository.
  2. Go to your project and settings/environment variables and copy your .env file
    • Replace STRIPE_SECRET_KEY with your production stripe key.
    • Replace STRIPE_WEBHOOK_SECRET with your production stripe key.
    • Replace RESEND_API_KEY with your production stripe key.
    • Replace NEXT_PUBLIC_GOOGLE_CLIENT_ID with your production google app.
    • Replace GOOGLE_CLIENT_SECRET with your google secret app.
    • Replace DATABASE_URL with your Production Database URLs
    • Replace DIRECT_URL with your Production database URLs
    • Go over Build and Deployment and override the build command with bunx prisma generate && bunx prisma migrate deploy && next build
  3. Re-deploy your app and everything should work!

This checklist provides a basic overview. Refer to specific service documentation for detailed instructions.

On this page