Files
OmniRoute/docs/diagrams
diegosouzapw 519fdf41b8 chore(docs): add npm run docs:render-diagrams and export SVGs
Add scripts/docs/render-diagrams.mjs as a thin wrapper around
@mermaid-js/mermaid-cli (mmdc):

- Renders every docs/diagrams/*.mmd into docs/diagrams/exported/*.svg
- Writes a Puppeteer config with --no-sandbox for Ubuntu 23.10+/WSL
- Exits non-zero on first failure so CI can gate on rendering

Expose it as `npm run docs:render-diagrams` and commit the initial
8 rendered SVGs so reviewers see the diagrams without having to install
the renderer locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 13:54:09 -03:00
..

Diagrams

Mermaid sources (.mmd) and exported SVGs for OmniRoute v3.8.0 architecture flows.

Canonical diagrams

Source Exported Used in
request-pipeline.mmd SVG docs/ARCHITECTURE.md, docs/CODEBASE_DOCUMENTATION.md
auto-combo-9factor.mmd SVG docs/AUTO-COMBO.md
resilience-3layers.mmd SVG docs/RESILIENCE_GUIDE.md, CLAUDE.md
i18n-flow.mmd SVG docs/I18N.md
mcp-tools-37.mmd SVG docs/MCP-SERVER.md
cloud-agent-flow.mmd SVG docs/CLOUD_AGENT.md
authz-pipeline.mmd SVG docs/AUTHZ_GUIDE.md
db-schema-overview.mmd SVG docs/CODEBASE_DOCUMENTATION.md

How to update

  1. Edit *.mmd.
  2. Re-render: npm run docs:render-diagrams (uses @mermaid-js/mermaid-cli).
  3. Commit both .mmd and .svg.

If @mermaid-js/mermaid-cli is not available locally, install it once:

npm install -g @mermaid-js/mermaid-cli

The script renders every .mmd in docs/diagrams/ into docs/diagrams/exported/*.svg with a white background, suitable for both dark and light themes.

Linking from a doc

![Request pipeline](./diagrams/exported/request-pipeline.svg)

> Source: [diagrams/request-pipeline.mmd](./diagrams/request-pipeline.mmd)

Conventions

  • One concept per diagram. Don't try to fit the whole platform in one chart.
  • Keep node labels short (36 words). Use <br/> for line breaks inside nodes.
  • Prefer flowchart LR for pipelines and flowchart TB for layered models.
  • Use sequenceDiagram for interactive (request/response) flows.
  • Use erDiagram for database schema overviews.
  • Update both .mmd and .svg in the same commit. Keep them in lock-step.