Skip to content

docs: add architecture page with mermaid diagrams - #321

Merged
timdegroot1996 merged 2 commits into
mainfrom
mermaid
Sep 13, 2026
Merged

timdegroot1996 merged 2 commits into
mainfrom
mermaid

Conversation

@timdegroot1996

Copy link
Copy Markdown
Collaborator

Summary

  • Adds architecture diagrams (CLI flow, Regular Mode, Server Mode) as a new docs/architecture.md page, replacing the inline diagrams originally added to the README. Linked from the sidebar (Advanced), the homepage feature cards, and the README's Quick Links.
  • Upgrades VitePress 2.0.0-alpha.17 -> 2.0.0-alpha.20. Also evaluated downgrading to stable 1.6.4, but that pins a bundled Vite (<=6.4.2) with a high-severity path-traversal CVE with no fix in the 1.x line -- staying on the 2.x alpha line and bumping is the safer option.
  • Fixes all 5 pre-existing npm audit vulnerabilities (transitive vitest/nanoid/postcss/undici bumps).
  • Adds mermaid diagram rendering to the docs site. vitepress-plugin-mermaid only supports VitePress ^1.0.0 (its own peer dependency), so this wires it up directly instead: a markdown-it fence override for fenced mermaid code blocks plus a client-side renderer hook using VitePress 2.x's router.onAfterRouteChange (renamed from onAfterRouteChanged in 1.x). Uses mermaid@11.17.2 rather than the just-released 12.0.0, which currently pulls a vulnerable chevrotain/lodash-es.

Test plan

  • npm run test:js -- 232/232 pass
  • npm run docs:build -- succeeds, architecture.html renders with all 3 diagram blocks
  • npm audit -- 0 vulnerabilities
  • Verified locally via npm run docs:dev

Upgrade VitePress within the 2.x alpha line (alpha.17 -> alpha.20)
instead of downgrading to the "stable" 1.6.4: 1.6.4 pins a bundled
Vite (<=6.4.2) with a high-severity path-traversal CVE that has no
fix in the 1.x line, while 2.x bundles Vite 7/8. Also resolves the
5 pre-existing npm audit vulnerabilities (vitest/nanoid/postcss/
undici transitive bumps via `npm audit fix`).

Add mermaid diagram rendering to the docs site. vitepress-plugin-
mermaid only supports VitePress ^1.0.0 (peer dependency), so wire it
up directly instead: a markdown-it fence override for ```mermaid
blocks (config.mts) and a client-side renderer hook (theme/index.ts)
using VitePress 2.x's router.onAfterRouteChange (renamed from
onAfterRouteChanged in 1.x). Picked mermaid@11.17.2 over the just
released 12.0.0, which pulls a vulnerable chevrotain/lodash-es.

Move the three diagrams out of README.md into a new docs/architecture.md
page (added to the sidebar under Advanced and as a homepage feature
card), and replace them in the README with a Quick Links entry.
@timdegroot1996
timdegroot1996 merged commit 4cd7b16 into main Sep 13, 2026
3 checks passed
@timdegroot1996
timdegroot1996 deleted the mermaid branch September 13, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant