ShipKit.one

Deploy to Vercel

Production deployment on Vercel.

Overview

Vercel is the recommended production host for this Next.js app. It supports preview deployments, automatic builds, and environment management.

Deploy steps (Git-based)

  1. Create a new project in Vercel and import your repository.
  2. Configure build settings:
  • Framework preset: Next.js
  • Install command: pnpm install
  • Build command: pnpm build
  • Output directory: .next
  1. Add environment variables in the Vercel dashboard:
DATABASE_URL=...
DB_PROVIDER=neon
DB_POOL_SIZE=1
BETTER_AUTH_SECRET=...
BETTER_AUTH_URL=https://your-domain.com
NEXT_PUBLIC_APP_URL=https://your-domain.com
NEXT_PUBLIC_APP_NAME=your_app_name
NEXT_PUBLIC_APP_DESCRIPTION=your_app_description
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
ADMIN_EMAILS=admin@example.com,founder@example.com
PAYPAL_CLIENT_ID=...
PAYPAL_CLIENT_SECRET=...
PAYPAL_WEBHOOK_ID=...
PAYPAL_MODE=live
STRIPE_SECRET_KEY=...
STRIPE_WEBHOOK_SECRET=...
CREEM_API_KEY=...
CREEM_WEBHOOK_SECRET=...
CREEM_MODE=live
CREEM_PRODUCT_LIFETIME_ID=...
RESEND_API_KEY=...
EMAIL_FROM=noreply@yourdomain.com
RESEND_WEBHOOK_SECRET=...
R2_ACCOUNT_ID=...
R2_ACCESS_KEY_ID=...
R2_SECRET_ACCESS_KEY=...
R2_BUCKET=...
R2_PUBLIC_URL=...
NEXT_PUBLIC_GA_MEASUREMENT_ID=...
  1. Deploy. Vercel runs pnpm build and serves with next start.

GitHub auto-deploy

  1. Push the repository to GitHub.
  2. Connect the repo in Vercel and select the production branch (usually main).
  3. Every push to main triggers a production deploy. Pull requests generate preview deployments.

Deploy steps (CLI)

  1. Install the Vercel CLI:
pnpm add -g vercel
  1. Log in and link the project:
vercel login
vercel link
  1. Add environment variables (once per project):
vercel env add DATABASE_URL
vercel env add DB_PROVIDER
vercel env add BETTER_AUTH_SECRET
vercel env add NEXT_PUBLIC_APP_URL
  1. Deploy to production:
vercel --prod

Vercel will run pnpm build and serve with next start.

Webhooks

Update webhook endpoints after deployment:

  • PayPal: https://your-domain.com/api/webhooks/paypal
  • Stripe: https://your-domain.com/api/webhooks/stripe
  • Creem: https://your-domain.com/api/webhooks/creem
  • Resend: https://your-domain.com/api/webhooks/resend

On this page