Development
Deployment

Deployment

Environments

EnvironmentURLBranchAuto-deploy
Productionenvara.aimainYes
Preview*.vercel.appAny PRYes
Locallocalhost:3000

Vercel Deployment

The app deploys to Vercel automatically on push to main. Pull requests get preview deployments with unique URLs.

Environment Variables

All secrets are configured in the Vercel dashboard under Project Settings → Environment Variables. Production and preview environments have separate keys (live vs test for Stripe, Clerk, etc.).

Build

# Vercel runs this automatically:
pnpm build

Build failures block deployment. TypeScript errors and lint failures must be resolved before merge.

Database Migrations

Migrations run manually, not as part of the deploy pipeline. This is intentional — database changes should be reviewed and applied deliberately.

# Generate migration from schema changes
pnpm db:generate
 
# Review the generated SQL in drizzle/migrations/
 
# Apply to production
DATABASE_URL=<production_url> pnpm db:migrate

Rule: Schema changes must be backwards-compatible. The running application and the new schema must coexist during the deploy window. Add columns as nullable first, backfill, then add constraints.

Rollback

Vercel supports instant rollback to any previous deployment. Database rollbacks are manual — write a reverse migration if needed.

Monitoring

  • Errors: Sentry (sentry.io (opens in a new tab)) — alerts on new errors, tracks resolution.
  • Performance: Vercel Analytics — page load times, API response times.
  • Product: PostHog — funnels, feature usage, retention.
  • Uptime: Vercel's built-in checks + external monitoring (Betteruptime or similar).