src/apphosts Next.js App Router routes:(home)for the landing page,docsfor the spec, andapifor server handlers.- Shared React lives in
src/components; cross-cutting layout and data helpers sit insrc/lib. - Canonical docs and examples live under
content/docsandcontent/references; keep folder slugs stable to preserve OG images and LLM exports. - ReScript sources (
*.res) output tracked.res.mjs; edit the.res, commit the pair, and treat the artefact as a snapshot check. - Root configs (
next.config.mjs,middleware.ts,source.config.ts) handle routing and static generation—mirror their patterns when extending.
bun installrefreshes dependencies after pulling.bun run docs:devlaunches the Turbo dev server athttp://localhost:3000.bun run docs:buildruns the production pipeline; execute before every PR.bun run docs:startserves the build for smoke-testing.bun run res:devwatches ReScript;bun run res:buildperforms a clean compile; pair withbun run res:cleanif artefacts drift.
- TypeScript/TSX follows Prettier defaults (2-space indent, semicolons, single quotes); rely on format-on-save or
bunx prettier. - Export React components in PascalCase and keep route file names lowercase.
- Prefer explicit bindings in ReScript and TitleCase module names; avoid unchecked external calls.
- MDX files need concise frontmatter and relative links so the Fumadocs loader resolves correctly.
- No automated suite yet—ensure
bun run docs:buildsucceeds and manually spot-check/and/docs. - Review the generated
.res.mjsdiff for ReScript changes to catch compiler regressions. - Add MDX demos for new interactive components and document manual QA steps in PRs.
- Commit history skews toward short descriptive subjects; keep messages imperative, ≤72 characters, with detail in the body.
- Reference related issues and note affected routes or content directories.
- PRs should include a summary, verification checklist, and visuals for UI or content shifts; request review from domain owners and wait for a clean build.
- Next.js 15 powers the app, with Fumadocs loaders defined in
src/lib/source.ts; OG images and LLM extracts rely on stable slugs, so avoid renaming docs without redirects.
We track work in Beads instead of Markdown. Run bd quickstart to see how.