Docs
Modify the Next.js/Fumadocs site and MDX content
Introduction
The docs app is the public website and documentation. It is built with:
- Next.js 16
- React 19
- Tailwind CSS v4
- Fumadocs (for the docs system)
@repo/uiand shared tooling
It owns the landing page, docs, API docs, and any AI/search experiences.
File layout
Local workflow
Start the dev server:
pnpm --filter @repo/docs devThe site runs on http://localhost:3000.
Edit MDX files under apps/docs/content/docs/ or React components/layout in apps/docs/src/app/.
For OpenAPI or changelog changes, run the pre-build script first:
pnpm --filter @repo/docs run build:preUse the in-browser search to jump to the page you're modifying, and restart the dev server if Fumadocs metadata gets cached.
Scripts & tooling
The docs app uses Bun for TypeScript script execution:
bun ./scripts/lint.ts- Lint MDX content and validate linksbun ./scripts/pre-build.ts- Generate OpenAPI docs and sync changelog before build- Other helper scripts in
apps/docs/scripts/
Adding UI components
Run pnpm ui-add from the repo root to add new shadcn/ui components. They'll be added to packages/ui/src/components and can be imported in the docs app.
Testing
Run these commands from the repo root:
-
Linting:
pnpm --filter @repo/docs lintThis also validates internal and external links in MDX files.
-
Formatting:
pnpm --filter @repo/docs format -
Type checking:
pnpm --filter @repo/docs typecheck -
Spell checking:
pnpm --filter @repo/docs check:spellingKeeps documentation spelling consistent across all MDX files.
Deployment
Vercel
- Create a new Vercel project.
- Set the root directory to
apps/docs. - Vercel automatically detects Next.js and configures the build.
- Configure environment variables:
- Analytics tracking (if used)
- Sentry error tracking (if configured)
- Any other app-specific variables
- Deploy. The docs site will automatically:
- Pull in shared UI components from
@repo/ui - Use Tailwind configuration from
tooling/tailwind - Include generated OpenAPI documentation from the API app
- Pull in shared UI components from
Last updated on