ForkDocs
Self-host

Project structure

Monorepo layout for apps/web and apps/docs.

Top level

The repo is a monorepo with packages under apps/:

PathRole
apps/webMain product: Next.js app, Prisma, API routes, editor, player, dashboard.
apps/docsThis documentation site (Fumadocs + Next.js).

Install and scripts run from the repository root with Bun unless you cd into an app.

Inside apps/web

PathContents
app/App Router: dashboard, editor, media, analytics, auth, play, embed, app/api/.
actions/Server actions (projects, templates, viewer access, etc.).
components/UI: editor/, player/, dashboard/, media/, shared primitives in components/ui/.
hooks/React hooks.
lib/Domain logic: story graph, player engine, assets, workspaces, viewer access, Prisma helpers.
stores/Client stores (e.g. editor state).
public/Static assets.
prisma/Schema and migrations.
proxy.tsClerk / route protection (Next.js 16 middleware entry).

Inside apps/docs

PathContents
content/docs/MDX documentation pages and meta.json navigation.
app/(docs)/Docs layout and [[...slug]] routes (served at the site root on docs.*).
lib/source.tsFumadocs content loader.

On this page