Mermaid syntax
C4 diagram (beta)
Syntax
C4 stands for
• Context
• Containers
• Components
• Code
Mermaid supports five types of C4 diagrams
• C4Context - System Context
• C4Container - Container diagram
• C4Component - Component diagram
• C4Dynamic - Dynamic diagram
• C4Deployment - Deployment diagram
Shapes
The position of shapes is adjusted by changing the order in which statements are written.
PlantUML
Mermaid’s C4 diagram syntax is compatible with PlantUML.
For more guidance on writing C4 diagrams, visit C4-PlantUML.
© Mermaid Chart 2024