Skill Tracer
Skills › Scientific Agent Skills › markdown-mermaid-writing › architecture.md

architecture.md

119 lines · skills/markdown-mermaid-writing/references/diagrams/architecture.md at 5f2bc03

Open on GitHub
1<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->
2
3# Architecture Diagram
4
5> **Back to [Style Guide](../mermaid_style_guide.md)** — Read the style guide first for emoji, color, and accessibility rules.
6
7**Syntax keyword:** `architecture-beta`
8**Best for:** Cloud infrastructure, service topology, deployment architecture, network layout
9**When NOT to use:** Logical system boundaries (use [C4](c4.md)), component layout without cloud semantics (use [Block](block.md))
11> **Accessibility:** Mermaid 12.0.0 emits `accTitle`/`accDescr` for this type. Keep a visible description and verify older destination renderers.
13---

<!-- Source: https://github.com/SuperiorByteWorks-LLC/agent-project | License: Apache-2.0 | Author: Clayton Young / Superior Byte Works, LLC (Boreal Bytes) -->

Architecture Diagram

Back to Style Guide — Read the style guide first for emoji, color, and accessibility rules.

Syntax keyword: architecture-beta Best for: Cloud infrastructure, service topology, deployment architecture, network layout When NOT to use: Logical system boundaries (use C4), component layout without cloud semantics (use Block)

Accessibility: Mermaid 12.0.0 emits accTitle/accDescr for this type. Keep a visible description and verify older destination renderers.

Raw lines 1 to 14
15## Exemplar Diagram
17_Architecture diagram showing a cloud-hosted web application with a load balancer, API server, database, and cache deployed within a VPC:_
19```mermaid
20architecture-beta
21 accTitle: Architecture Example
22 accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
23 group cloud(cloud)[AWS Cloud]
24 group vpc(cloud)[VPC] in cloud
26 service lb(internet)[Load Balancer] in vpc
27 service api(server)[API Server] in vpc
28 service db(database)[PostgreSQL] in vpc
29 service cache(disk)[Redis Cache] in vpc
31 lb:R --> L:api
32 api:R --> L:db
33 api:B --> T:cache
34```
36---

Exemplar Diagram

Architecture diagram showing a cloud-hosted web application with a load balancer, API server, database, and cache deployed within a VPC:

architecture-beta
    accTitle: Architecture Example
    accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
    group cloud(cloud)[AWS Cloud]
    group vpc(cloud)[VPC] in cloud

    service lb(internet)[Load Balancer] in vpc
    service api(server)[API Server] in vpc
    service db(database)[PostgreSQL] in vpc
    service cache(disk)[Redis Cache] in vpc

    lb:R --> L:api
    api:R --> L:db
    api:B --> T:cache

Raw lines 15 to 37
38## Tips
40- Use `group` for logical boundaries (VPC, region, cluster, availability zone)
41- Use `service` for individual components
42- Direction annotations on connections: `:L` (left), `:R` (right), `:T` (top), `:B` (bottom)
43- Built-in icon types: `cloud`, `server`, `database`, `internet`, `disk`
44- Nest groups with `in parent_group`
45- Keep labels concise. Mermaid 12.0.0 accepts hyphens and Unicode inside `[]`; older hosts may differ
46- Use `-->` for directional arrows, `--` for undirected edges
47- Keep to **6–8 services** per diagram
48- **Always** pair with a Markdown text description above for screen readers
50---

Tips

  • Use group for logical boundaries (VPC, region, cluster, availability zone)
  • Use service for individual components
  • Direction annotations on connections: :L (left), :R (right), :T (top), :B (bottom)
  • Built-in icon types: cloud, server, database, internet, disk
  • Nest groups with in parent_group
  • Keep labels concise. Mermaid 12.0.0 accepts hyphens and Unicode inside []; older hosts may differ
  • Use --> for directional arrows, -- for undirected edges
  • Keep to 6–8 services per diagram
  • Always pair with a Markdown text description above for screen readers

Raw lines 38 to 51
52## Template
54_Description of the infrastructure topology and key components:_
56```mermaid
57architecture-beta
58 accTitle: Architecture Example
59 accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
60 group region(cloud)[Cloud Region]
62 service frontend(internet)[Web Frontend] in region
63 service backend(server)[API Server] in region
64 service datastore(database)[Database] in region
66 frontend:R --> L:backend
67 backend:R --> L:datastore
68```
70---

Template

Description of the infrastructure topology and key components:

architecture-beta
    accTitle: Architecture Example
    accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
    group region(cloud)[Cloud Region]

    service frontend(internet)[Web Frontend] in region
    service backend(server)[API Server] in region
    service datastore(database)[Database] in region

    frontend:R --> L:backend
    backend:R --> L:datastore

Raw lines 52 to 71
72## Complex Example
74_Multi-region cloud deployment with 3 nested groups (2 regional clusters + shared services) showing 9 services, cross-region database replication, CDN distribution, and centralized monitoring. Demonstrates how nested `group` + `in` syntax creates clear infrastructure boundaries:_
76```mermaid
77architecture-beta
78 accTitle: Architecture Example
79 accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
80 group cloud(cloud)[AWS Platform]
82 group east(cloud)[US East Region] in cloud
83 service lb_east(internet)[Load Balancer East] in east
84 service app_east(server)[App Server East] in east
85 service db_primary(database)[Primary Database] in east
87 group west(cloud)[US West Region] in cloud
88 service lb_west(internet)[Load Balancer West] in west
89 service app_west(server)[App Server West] in west
90 service db_replica(database)[Replica Database] in west
92 group shared(cloud)[Shared Services] in cloud
93 service cdn(internet)[CDN Edge] in shared
94 service monitor(server)[Monitoring] in shared
95 service queue(server)[Message Queue] in shared
97 cdn:B --> T:lb_east
98 cdn:B --> T:lb_west
99 lb_east:R --> L:app_east
100 lb_west:R --> L:app_west
101 app_east:B --> T:db_primary
102 app_west:B --> T:db_replica
103 db_primary:R --> L:db_replica
104 app_east:R --> L:queue
105 app_west:R --> L:queue
106 monitor:B --> T:app_east
107```

Complex Example

_Multi-region cloud deployment with 3 nested groups (2 regional clusters + shared services) showing 9 services, cross-region database replication, CDN distribution, and centralized monitoring. Demonstrates how nested group + in syntax creates clear infrastructure boundaries:_

architecture-beta
    accTitle: Architecture Example
    accDescr: Illustrative architecture diagram; the surrounding text describes its data and relationships.
    group cloud(cloud)[AWS Platform]

    group east(cloud)[US East Region] in cloud
    service lb_east(internet)[Load Balancer East] in east
    service app_east(server)[App Server East] in east
    service db_primary(database)[Primary Database] in east

    group west(cloud)[US West Region] in cloud
    service lb_west(internet)[Load Balancer West] in west
    service app_west(server)[App Server West] in west
    service db_replica(database)[Replica Database] in west

    group shared(cloud)[Shared Services] in cloud
    service cdn(internet)[CDN Edge] in shared
    service monitor(server)[Monitoring] in shared
    service queue(server)[Message Queue] in shared

    cdn:B --> T:lb_east
    cdn:B --> T:lb_west
    lb_east:R --> L:app_east
    lb_west:R --> L:app_west
    app_east:B --> T:db_primary
    app_west:B --> T:db_replica
    db_primary:R --> L:db_replica
    app_east:R --> L:queue
    app_west:R --> L:queue
    monitor:B --> T:app_east
Raw lines 72 to 108
109### Why this works
111- **Nested groups mirror real infrastructure** — cloud > region > services is exactly how teams think about multi-region deployments. The nesting creates clear blast radius boundaries.
112- **Conservative labels** keep this example readable across hosts; current Mermaid also accepts Unicode and hyphens in labels. Group nesting and built-in icons supply the primary visual distinctions.
113- **Directional annotations select ports** — `:B --> T:` connects the source bottom to the target top, and `:R --> L:` connects source right to target left. Inspect routing and crossings; port selection does not guarantee a clean layout.
114- **Cross-region replication is explicit** — the `db_primary:R --> L:db_replica` edge is the most important infrastructure detail and reads clearly as a horizontal connection between regions.

Why this works

  • Nested groups mirror real infrastructure — cloud > region > services is exactly how teams think about multi-region deployments. The nesting creates clear blast radius boundaries.
  • Conservative labels keep this example readable across hosts; current Mermaid also accepts Unicode and hyphens in labels. Group nesting and built-in icons supply the primary visual distinctions.
  • Directional annotations select ports — :B --> T: connects the source bottom to the target top, and :R --> L: connects source right to target left. Inspect routing and crossings; port selection does not guarantee a clean layout.
  • Cross-region replication is explicit — the db_primary:R --> L:db_replica edge is the most important infrastructure detail and reads clearly as a horizontal connection between regions.
Raw lines 109 to 116
117## Verified reference
119Syntax examples reviewed against [official Mermaid documentation](https://mermaid.js.org/syntax/architecture.html) and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.

Verified reference

Syntax examples reviewed against official Mermaid documentation and rendered with Mermaid 12.0.0 (2026-10-01). Check the destination version; appearance and accessibility are not guaranteed by a successful parse.

Raw lines 117 to 119