ForkDocs
Self-host

Local development

Ports, scripts, and layout of the Fork monorepo.

Ports

AppDefault portCommand
Main Next.js app (apps/web)3000bun run dev
Docs (apps/docs)3001bun run docs:dev

Run both when you are editing product code and documentation together.

Useful scripts

From the repository root (see also Scripts & commands):

ScriptPurpose
bun run devDev server for apps/web
bun run docs:devFumadocs dev server for apps/docs
bun run buildProduction build for apps/web (includes prisma generate)
bun run build:allTurbo: build web and docs in parallel
bun run db:migrateprisma migrate dev in apps/web
bun run db:generateprisma generate only
bun run lintESLint across the repo
bun run typechecktsc --noEmit for apps/web
bun testBun test runner (apps/web)
bun run docs:buildProduction build for docs
bun run docs:typesfumadocs-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 under apps/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.

On this page