This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the documentation site for Umami Analytics, built with Next.js 16 and Fumadocs. It uses MDX for content authoring and Tailwind CSS v4 for styling.
# Development (clears .source cache and uses Turbopack)
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Linting and formatting (uses Biome)
npm run lint # Check for lint errors
npm run format # Format code
npm run check # Run all Biome checkscontent/docs/*.mdx → fumadocs-mdx (postinstall) → .source/ → src/lib/source.ts → Routes
MDX files in /content/docs are processed by fumadocs-mdx during postinstall, generating the .source/ directory (git-ignored). The src/lib/source.ts file creates loader instances that routes use to access content.
Four separate loader instances exist in src/lib/source.ts:
source- Main docs at/docsapi- API reference at/docs/apiguides- Deployment/migration guides at/docs/guidescloud- Cloud-specific docs at/docs/cloud
source.config.ts- Fumadocs configuration (frontmatter schema, MDX settings)next.config.mjs- Next.js config with/docsasset prefix, rewrites, and Umami tracker script injectionsrc/lib/source.ts- Content loaders and helper functions (getPageImage,getLLMText)src/lib/layout.shared.tsx- Shared layout options (nav, links)src/mdx-components.tsx- Custom MDX component overrides
src/app/docs/[[...slug]]/page.tsx- Dynamic docs pages (catch-all)src/app/api/search/route.ts- Full-text search endpoint (Orama-powered)src/app/llms-full.txt/route.ts- LLM-friendly text dump of all docssrc/app/og/docs/[...slug]/route.tsx- Open Graph image generation
Documentation in /content/docs uses:
- MDX files with
titleanddescriptionfrontmatter meta.jsonfiles to define page ordering within folders- Folder names in parentheses (e.g.,
(quickstart)) create collapsible groups
@/.source→./.source/index.ts(generated content)@/*→./src/*