TurboJet

Deployment

Production URL planning, env matrix, and when to adopt subdomain deployment.

This kit runs as two Next.js surfaces:

  • apps/marketing
  • apps/docs

Locally, they use different ports. In production, keep their public URLs explicit through env vars.

Production URL matrix

SurfaceEnv varExample
Marketing (landing, API, checkout)NEXT_PUBLIC_MARKETING_URLhttps://www.example.com
Leftover package CORS / auth originsNEXT_PUBLIC_APP_URL / NEXT_PUBLIC_SAAS_URLSame as marketing
Docs siteNEXT_PUBLIC_DOCS_URLhttps://docs.example.com

Better Auth reminders

Auth lives in @repo/auth. This repo does not host dashboard auth routes. If you reuse the package, set BETTER_AUTH_URL to the origin that mounts /api/auth. Do not add the docs origin as a trusted origin unless you intentionally need auth flows there.

Subdomain deploy gate

Only add subdomain rewrites or a two-project Vercel setup when you are ready to operate www. and docs. separately.

Payments and webhooks

Storefront Mayar webhooks should point to the marketing origin:

  • {MARKETING_URL}/api/webhooks/mayar

Leftover kit adapters still document Polar / Midtrans / DOKU webhook paths; those are not hosted here unless you remount them. Full guide: Payments and Storefront checkout.

On this page