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/ui and shared tooling

It owns the landing page, docs, API docs, and any AI/search experiences.

File layout

package.json

Local workflow

Start the dev server:

pnpm --filter @repo/docs dev

The 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:pre

Use 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 links
  • bun ./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 lint

    This 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:spelling

    Keeps documentation spelling consistent across all MDX files.

Deployment

Vercel

  1. Create a new Vercel project.
  2. Set the root directory to apps/docs.
  3. Vercel automatically detects Next.js and configures the build.
  4. Configure environment variables:
    • Analytics tracking (if used)
    • Sentry error tracking (if configured)
    • Any other app-specific variables
  5. 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

Last updated on

On this page