Overview

Deploy to Vercel

Steps#

  1. Import the repository in Vercel.
  2. Set every environment variable in Project Settings → Environment Variables before the first deploy.
  3. Set APP_URL to your production domain.
  4. Run npm run db:migrate:deploy against your production database before the first request hits it.
  5. Point your Stripe webhook at <APP_URL>/api/webhooks/stripe.

Other targets#

The app is a standard Next.js 15 App Router project, so Railway and Fly.io work the same way. The only Vercel-specific consideration is Edge Runtime: middleware.ts verifies tokens with the public key only, so the private key never reaches the edge. See security decisions.

After deploying#

Verify the webhook is receiving events before you take real money. A webhook handler that returns the same status for an invalid signature and a transient database error means Stripe stops retrying and billing events vanish silently. That case is handled in the boilerplate, but confirm it end to end in your own environment.

Next: Reporting usage from your live MCP server.