Self-host
Project structure
Monorepo layout for apps/web and apps/docs.
Top level
The repo is a monorepo with packages under apps/:
| Path | Role |
|---|---|
apps/web | Main product: Next.js app, Prisma, API routes, editor, player, dashboard. |
apps/docs | This documentation site (Fumadocs + Next.js). |
Install and scripts run from the repository root with Bun unless you cd into an app.
Inside apps/web
| Path | Contents |
|---|---|
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.ts | Clerk / route protection (Next.js 16 middleware entry). |
Inside apps/docs
| Path | Contents |
|---|---|
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.ts | Fumadocs content loader. |