mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
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>
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
- Edit
*.mmd. - Re-render:
npm run docs:render-diagrams(uses@mermaid-js/mermaid-cli). - Commit both
.mmdand.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

> 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 (3–6 words). Use
<br/>for line breaks inside nodes. - Prefer
flowchart LRfor pipelines andflowchart TBfor layered models. - Use
sequenceDiagramfor interactive (request/response) flows. - Use
erDiagramfor database schema overviews. - Update both
.mmdand.svgin the same commit. Keep them in lock-step.