Deployment

Deploying to Vercel

The easiest way to deploy your TanStack Start application is with Vercel.

  1. Push your code to a GitHub repository.
  2. Import the project in Vercel.
  3. Vercel should automatically detect the framework settings.
  4. Add your Environment Variables in the Vercel Project Settings.
  5. Deploy!

Environment Variables

Ensure you add all required environment variables to your deployment:

  • MONGODB_URI
  • BETTER_AUTH_SECRET
  • BETTER_AUTH_URL (Set to your production URL)
  • POLAR_ACCESS_TOKEN
  • RESEND_API_KEY
  • NODE_ENV (Set to "production")

Build Command

The build command is:

pnpm run build

Output Directory

The output directory is usually .output or handled automatically by the Vercel adapter.