Case study 35 / 37
DocAtlas
A documentation site engine whose cross-references cannot go stale: live code includes from the real source tree, dead links that fail the build, and BM25 search.
- Status
- In development
- Period
- 2026
- Domain
- Web · Tools
- Language
- TypeScript
- Last push
- 26 OCT 2026
- License
- MIT
- Source of claims
- README.md, docs/architecture.md, CHANGELOG.md, src/cli.ts, src/snippets/extractor.ts, test/site/output-links.test.ts, .github/workflows/ci.yml; check/build/search run from a fresh clone 2026-10-25

01/The problem
Documentation accumulates code samples that were right the day they were pasted and links that worked until a page was renamed. Most tooling treats both as proofreading; DocAtlas treats them as build failures.
02/The system
Code fences can include a file, a marked region or a line range, filled from the real source at build time. Every relative link and heading anchor is resolved against the fully parsed page graph, and a dead one fails the build. Search is a compile-time inverted index ranked with Okapi BM25, using the same ranking module in the browser and on the command line.
- parseMarkdown to resolveSnippets
- resolveSnippets to Page[]
- Page[] to checkLinks
- Page[] to buildIndex
- Page[] to renderPage
03/Implementation
- 01A hand-written Markdown parser for documentation prose: headings, lists, blockquotes, fenced code and inline links.
- 02Live includes: include="file.ts", a docatlas:start/end marker region (matched regardless of comment syntax) or a line range, injected into required-empty fences.
- 03A link and anchor checker that runs once over the whole page graph, so cross-page anchors can be verified, and rewrites links to the .html files actually written.
- 04A shared tokenizer and light stemmer, an inverted index built at compile time, and BM25 ranking used by both the in-page search box and docatlas search.
- 05build, check, serve and search subcommands over the same pipeline.
04/Engineering
check is build, pointed at a temp directory
Validation happens as a side effect of building, so there is no separate “just validate” path that could drift from what build actually does.
Link checking after every page is parsed
A cross-page anchor needs the other page's heading slugs, so every page is parsed and snippet-resolved before checkLinks runs over the graph.
It builds its own docs
A CI dogfood job builds and checks the project's docs with the binary it just compiled, and a test crawls the built HTML for unresolvable links.
05/Interface
Real screenshots of the running software. Captions state the data shown.
06/Tech stack
- TypeScript
- Node.js
- Okapi BM25
- Vitest
- ESLint
- GitHub Actions
07/Result
Verified outcomes
- 200 tests with about 97% statement coverage, run by CI on Linux, Windows and macOS (per the README).
Known limitations
- The parser targets documentation prose, not the full CommonMark grammar.
- Not published to npm; it is built from a clone.
08/Links
Related work
Page-load forensics
Waterfall Lens →
Turns a HAR capture into an answer: the critical rendering chain, connection queuing and third-party weight, explained in plain English beside an interactive waterfall.
Open source · In development
Versioned system-design workspace
ArchitectFlow →
Design a system's architecture, data model, API and UI as one versioned document, check it with deterministic rules, and generate an implementation prompt from the exact saved revision.
Open source · Experimental
Agent skill · video renderer
Animation Ad →
An agent skill that reads a product's source, writes a storyboard and renders a real animated ad locally: motion graphics, characters or low-poly 3D, with voice, music and captions.
Private · Working build
Next case study
RepoGraph →