Self-host
Local development
Ports, scripts, and layout of the Fork monorepo.
Ports
| App | Default port | Command |
|---|---|---|
Main Next.js app (apps/web) | 3000 | bun run dev |
Docs (apps/docs) | 3001 | bun run docs:dev |
Run both when you are editing product code and documentation together.
Useful scripts
From the repository root (see also Scripts & commands):
| Script | Purpose |
|---|---|
bun run dev | Dev server for apps/web |
bun run docs:dev | Fumadocs dev server for apps/docs |
bun run build | Production build for apps/web (includes prisma generate) |
bun run build:all | Turbo: build web and docs in parallel |
bun run db:migrate | prisma migrate dev in apps/web |
bun run db:generate | prisma generate only |
bun run lint | ESLint across the repo |
bun run typecheck | tsc --noEmit for apps/web |
bun test | Bun test runner (apps/web) |
bun run docs:build | Production build for docs |
bun run docs:types | fumadocs-mdx + Next typegen + tsc for docs |
Turborepo orchestrates tasks. On Vercel, linking the project enables Remote Cache for faster repeated builds.
Where things live
apps/web— Product: Next.js App Router, server actions, components, Prisma schema,proxy.ts(Clerk / route protection).apps/docs— This Fumadocs site; content underapps/docs/content/docs.
More detail: Project structure.
Route protection
The main app uses Clerk’s middleware API from apps/web/proxy.ts. Next.js 16 can use proxy as the middleware entry alongside middleware — keep that in mind when debugging auth redirects.