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-boilerplateRepository layout
apps/marketing— public site, storefront checkout, Hono/apiapps/docs— this documentation sitepackages/*— shared libraries (auth, database, payments, mail, UI, …)
There is no apps/saas or apps/mail-preview in this checkout.
Install dependencies
pnpm installSet up environment variables
Copy the example file at the repository root (not inside an app):
cp .env.example .envOpen .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:3000NEXT_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:generatedocker: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 devTurborepo starts the apps in this checkout:
| App | URL |
|---|---|
| Marketing | http://localhost:3000 |
| Docs | http://localhost:3001 |
Docs are locale-prefixed: open http://localhost:3001/en.
Email preview (separate process):
pnpm --filter @repo/mail devOpens React Email at http://localhost:3003.
Seed users (optional)
pnpm prisma:seedThis 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
- Configuration — feature flags and knobs
- Apps — what each surface owns
- Troubleshooting — common local issues