All diagram types Open editor

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:files

Syntax quick reference

How to use it

  1. Open the example in the editor, or paste your own Mermaid code.
  2. Edit the code on the left. The preview updates as you type, and errors point to the line.
  3. Export SVG or PNG, copy a Markdown block for GitHub or Notion, or copy a share link.

More diagram types