merIDK / Diagram types / Architecture diagram
Mermaid architecture diagram: example and syntax
Architecture diagrams show cloud and infrastructure layouts: services, groups and the connections between them, drawn with icons. They are a text-based alternative to drawing cloud diagrams by hand.
Open this example in the editor
Example code
architecture-beta
group cloud(cloud)[Cloud]
service web(internet)[Web] in cloud
service app(server)[App server] in cloud
service db(database)[Database] in cloud
service files(disk)[Files] in cloud
web:R --> L:app
app:R --> L:db
app:B --> T:files
Result
architecture-beta
group cloud(cloud)[Cloud]
service web(internet)[Web] in cloud
service app(server)[App server] in cloud
service db(database)[Database] in cloud
service files(disk)[Files] in cloud
web:R --> L:app
app:R --> L:db
app:B --> T:filesSyntax quick reference
- Service:
service id(icon)[Label] in group. - Built-in icons:
cloud,database,disk,internet,server. - Edges pick a side of each node:
a:R --> L:b(sides T, B, L, R).
How to use it
- Open the example in the editor, or paste your own Mermaid code.
- Edit the code on the left. The preview updates as you type, and errors point to the line.
- Export SVG or PNG, copy a Markdown block for GitHub or Notion, or copy a share link.