Mermaid Overview Diagrams
Rules
- prefer flowchart (graph) with TD or LR direction
- wrap in
```mermaid fenced code block
- use stadium-shaped nodes:
([text])
- use meaningful node IDs reflecting component names
- use
--> for dependencies, -.-> for optional/async dependencies
- label arrows only when ambiguous:
Gateway -->|routes| Service
- visualize only high-level concepts — omit classes, methods, implementation details
- use subgraphs for logical grouping (subsystems)
- write diagram into the target file (e.g. README.md) when context is clear
BCE Shape Mapping
| Element |
Mermaid syntax |
Style class |
| Business Component (BC) |
Orders([Orders]) |
bc |
| Subsystem |
subgraph Billing |
subsystem |
| External service |
PayGW([Payment Gateway]) |
ext |
| Boundary layer |
Boundary([Boundary]) |
boundary |
| Control layer |
Control([Control]) |
control |
| Entity layer |
Entity([Entity]) |
entity |
Style Classes
Define these classDef entries at the end of the graph and apply with class or ::::
classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
classDef boundary fill:#d5e8d4,stroke:#82b366,color:#000
classDef control fill:#e1d5e7,stroke:#9673a6,color:#000
classDef entity fill:#fff2cc,stroke:#d6b656,color:#000
Color Palette
- BC blue: fill
#dae8fc, border #6c8ebf
- External yellow: fill
#fff2cc, border #d6b656
- Boundary green: fill
#d5e8d4, border #82b366
- Control purple: fill
#e1d5e7, border #9673a6
- Entity yellow: fill
#fff2cc, border #d6b656
Example — Between Components
graph LR
subgraph Billing
Orders([Orders]) -->|charges| Payments([Payments])
end
Orders -.->|async| Notifications([Notifications])
Payments -->|REST| PayGW([Payment Gateway])
classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
class Orders,Payments,Notifications bc
class PayGW ext
1---2name: mermaid3description: Generate Mermaid overview diagrams for architecture and component visualization. Use when asked to create, generate, or draw Mermaid diagrams, architecture overviews, component diagrams, dependency graphs, or system visualizations. Triggers on "mermaid diagram", "architecture diagram", "component overview", "dependency graph", "draw a diagram", or requests to visualize system structure. Not for sequence diagrams or class diagrams.4---56# Mermaid Overview Diagrams78## Rules910- prefer flowchart (graph) with TD or LR direction11- wrap in ` ```mermaid ` fenced code block12- use stadium-shaped nodes: `([text])`13- use meaningful node IDs reflecting component names14- use `-->` for dependencies, `-.->` for optional/async dependencies15- label arrows only when ambiguous: `Gateway -->|routes| Service`16- visualize only high-level concepts — omit classes, methods, implementation details17- use subgraphs for logical grouping (subsystems)18- write diagram into the target file (e.g. README.md) when context is clear1920## BCE Shape Mapping2122| Element | Mermaid syntax | Style class |23|---|---|---|24| Business Component (BC) | `Orders([Orders])` | `bc` |25| Subsystem | `subgraph Billing` | `subsystem` |26| External service | `PayGW([Payment Gateway])` | `ext` |27| Boundary layer | `Boundary([Boundary])` | `boundary` |28| Control layer | `Control([Control])` | `control` |29| Entity layer | `Entity([Entity])` | `entity` |3031## Style Classes3233Define these `classDef` entries at the end of the graph and apply with `class` or `:::`:3435```36classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#00037classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 538classDef boundary fill:#d5e8d4,stroke:#82b366,color:#00039classDef control fill:#e1d5e7,stroke:#9673a6,color:#00040classDef entity fill:#fff2cc,stroke:#d6b656,color:#00041```4243## Color Palette4445- BC blue: fill `#dae8fc`, border `#6c8ebf`46- External yellow: fill `#fff2cc`, border `#d6b656`47- Boundary green: fill `#d5e8d4`, border `#82b366`48- Control purple: fill `#e1d5e7`, border `#9673a6`49- Entity yellow: fill `#fff2cc`, border `#d6b656`5051## Example — Between Components5253```mermaid54graph LR55 subgraph Billing56 Orders([Orders]) -->|charges| Payments([Payments])57 end58 Orders -.->|async| Notifications([Notifications])59 Payments -->|REST| PayGW([Payment Gateway])6061 classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#00062 classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 563 class Orders,Payments,Notifications bc64 class PayGW ext65```