Mermaid View
Every C4 diagram has a Mermaid View — a read-only rendering of the diagram as valid Mermaid C4 markup. The Mermaid View is independent of the C4 Designer: it gives you a portable, embeddable diagram that renders natively in GitHub, Confluence, Azure DevOps, Notion, SharePoint, and any other Mermaid-capable tool.
What Mermaid View Shows
Mermaid View gives you a text-based version of the current diagram. It is useful when you want a shareable view that can be pasted into documentation tools or copied into another Mermaid-capable system.
It focuses on the same architecture you see in the designer:
- The diagram keeps the current shape of the architecture
- The output stays readable in external tools
- The view is read-only, so it cannot change the diagram itself
Example Output
The following is an example of Mermaid C4Container markup auto-generated by Nodinite
Diagram Level and Mermaid Type
The diagram type selected when creating the diagram controls which Mermaid C4 header is emitted. When importing existing Mermaid markup the type is auto-detected from the keyword on the first line:
| Diagram type | Mermaid output header | When to use |
|---|---|---|
| System Landscape (L0) | C4Context |
Enterprise-wide view of all systems and their relationships |
| Context (L1) | C4Context |
High-level people + systems overview for one central system |
| Container (L2) | C4Container |
Services and technology inside a system boundary |
| Component (L3) | C4Component |
Internal structure of a single service |
| Deployment | C4Deployment |
Infrastructure topology — where containers are hosted |
| Dynamic | C4Dynamic |
Runtime interaction sequence for a specific workflow |
Pages for the Mermaid View
| URL | Purpose |
|---|---|
/repository/architecture/sets/{setId}/diagrams/{id}/view |
Rendered Mermaid diagram with zoom/pan, shareable URL |
/repository/architecture/sets/{setId}/diagrams/{id}/mermaid |
Raw Mermaid markup with copy-to-clipboard button |
The /view page uses the existing Mermaid viewing experience already present in Nodinite. No separate setup is required.
The /mermaid page displays the raw markup so it can be pasted directly into external tools such as GitHub README files, Confluence pages, or the Mermaid Live Editor.
Connector Message Members in Mermaid
On Context, Container, and Component diagrams, Interactive View may show one visible connector labelled 2 flows, 3 flows, or similar. That is a presentation choice to reduce clutter on the canvas.
The Mermaid output stays explicit:
- Each connector message member becomes its own relationship line
- Each member keeps its own label and protocol text
- Optional Message Type links remain Repository metadata and are not written into the Mermaid markup
This means the Mermaid view can look more detailed than the interactive canvas. That is expected and useful when you want a text representation of every flow rather than the compact presentation used during diagram review.
Sharing and Embedding
Shareable URL
The /view URL is stable and always reflects current data. Share it with team members, stakeholders, or external partners. Every time the URL is opened, the diagram is freshly generated from the current relational rows — no stale screenshots.
Embedding in External Tools
Because the Mermaid markup is standard C4 Mermaid syntax, it renders natively in:
- GitHub — paste into a
README.mdor wiki page inside a```mermaid ```block - Confluence — use the Mermaid macro or a compatible Confluence app
- Azure DevOps — wiki pages support Mermaid natively
- Notion — use the Mermaid code block
- SharePoint — embed via web part or iFrame
- Mermaid Live Editor — for quick sharing and editing
Export Endpoint
The headless export endpoint returns the diagram in multiple formats, always reflecting the current state:
| Format | URL | Use case |
|---|---|---|
| PNG image | /api/repository/architecture/sets/{setId}/diagrams/{id}/export.png |
Embed in Word, PowerPoint, Confluence |
| SVG vector | /api/repository/architecture/sets/{setId}/diagrams/{id}/export.svg |
High-quality print, scalable embedding |
| Mermaid markup | /api/repository/architecture/sets/{setId}/diagrams/{id}/export.md |
Paste into any Mermaid-capable tool |
| Draw.io XML | /api/repository/architecture/sets/{setId}/diagrams/{id}/export.drawio |
Import into draw.io / diagrams.net for manual editing |
See Export and Sharing for full details on export formats and automation.
Relationship to the Existing "Show in Mermaid" Feature
The existing "Show in Mermaid" action on individual Repository entities (Integrations, Services, Systems) continues to work unchanged. It is useful for quick ad-hoc exploration.
The C4 Diagram Mermaid View is the diagram page for persistent, publishable architecture documentation.
Both capabilities are valuable and serve different use cases.