Architecture diagrams are available in Mermaid v11.1.0+. This is a beta feature and uses the
architecture-beta keyword.Basic architecture diagram
This example shows a basic cloud API architecture with a database, storage, and server components:Syntax overview
Building blocks
Architecture diagrams consist of four main building blocks:- Groups: Containers for related services
- Services: Individual components or resources
- Edges: Connections between services
- Junctions: Special nodes for 4-way edge splits
(icon_name) and labels with [label text].
Groups
Groups organize related services together:Services
Services represent individual components:Edge connections
Edge direction
Specify which side of a service the edge connects to usingL (left), R (right), T (top), or B (bottom):
Arrows
Add directional arrows with< or >:
Edges from groups
To create edges between groups, use the{group} modifier:
Junctions
Junctions create 4-way splits for connecting multiple services:Icons
Default icons
Default icons
Architecture diagrams include these built-in icons:
clouddatabasediskinternetserver
Custom icons
Custom icons
You can use any of the 200,000+ icons from Iconify by registering an icon pack. After registration, use the format
pack_name:icon_name:See the icon configuration guide for details on registering icon packs.