TurboJet

Setup

Clone TurboJet, configure env, and run marketing and docs locally.

This guide walks you through cloning the project, installing dependencies, setting up the database (optional), and starting the local development servers.

Prerequisites

Project setup

Clone the repository

git clone <repo-url>
cd nextjs-boilerplate

Repository layout

  • apps/marketing — public site, storefront checkout, Hono /api
  • apps/docs — this documentation site
  • packages/* — shared libraries (auth, database, payments, mail, UI, …)

There is no apps/saas or apps/mail-preview in this checkout.

Set up environment variables

Copy the example file at the repository root (not inside an app):

cp .env.example .env

Open .env and set at least the values you need. Root scripts and Turbo load .env via dotenv-cli (not .env.local as the primary file).

Typical local URLs (match the ports in this repo):

NEXT_PUBLIC_MARKETING_URL=http://localhost:3000
NEXT_PUBLIC_DOCS_URL=http://localhost:3001
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_SAAS_URL=http://localhost:3000

NEXT_PUBLIC_APP_URL / NEXT_PUBLIC_SAAS_URL still exist because leftover packages (@repo/api CORS, @repo/auth trusted origins) require them. Point them at the marketing origin.

For storefront checkout, set Mayar keys and payment-link IDs/URLs. For mail, set RESEND_KEY and RESEND_EMAIL_DOMAIN. Full table: Environment.

Database (optional)

Postgres is needed if you exercise Prisma, auth package flows, or leftover API modules. Marketing checkout alone does not require it.

pnpm docker:up
pnpm prisma:migrate
pnpm prisma:generate

docker:up also starts Mailpit (SMTP 1025, UI 8025). More detail: Database.

Storage (optional)

Set S3_* for Cloudflare R2 or AWS S3 if you need uploads. Guide: Storage.

Start the development servers

From the repository root:

pnpm dev

Turborepo starts the apps in this checkout:

Docs are locale-prefixed: open http://localhost:3001/en.

Email preview (separate process):

pnpm --filter @repo/mail dev

Opens React Email at http://localhost:3003.

Seed users (optional)

pnpm prisma:seed

This upserts seed emails from env (SEED_EMAIL, E2E_USER_EMAIL). It does not create an admin. Promote role to ADMIN in Prisma Studio — see Admin. There is no create:user script.

Next steps

On this page