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

block.md

182 lines · skills/markdown-mermaid-writing/references/diagrams/block.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# Block 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:** `block-beta`
8**Best for:** System block composition, layered architectures, component topology where spatial layout matters
9**When NOT to use:** Process flows (use [Flowchart](flowchart.md)), infrastructure with cloud icons (use [Architecture](architecture.md))
11> ⚠️ **Accessibility:** Block diagrams do **not** support `accTitle`/`accDescr`. Always place a descriptive _italic_ Markdown paragraph directly above the code block.
13---

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

Block Diagram

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

Syntax keyword: block-beta Best for: System block composition, layered architectures, component topology where spatial layout matters When NOT to use: Process flows (use Flowchart), infrastructure with cloud icons (use Architecture)

⚠️ Accessibility: Block diagrams do not support accTitle/accDescr. Always place a descriptive italic Markdown paragraph directly above the code block.

Raw lines 1 to 14
15## Exemplar Diagram
17_Block diagram showing a three-tier web application architecture from client-facing interfaces through application services to data storage, with emoji labels indicating component types:_
19```mermaid
20block-beta
21 columns 3
23 block:client:3
24 columns 3
25 browser["🌐 Browser"]
26 mobile["📱 Mobile App"]
27 cli["⌨️ CLI Tool"]
28 end
30 space:3
32 block:app:3
33 columns 3
34 api["🖥️ API Server"]
35 worker["⚙️ Worker"]
36 cache["⚡ Redis Cache"]
37 end
39 space:3
41 block:data:3
42 columns 2
43 db[("💾 PostgreSQL")]
44 storage["📦 Object Storage"]
45 end
47 browser --> api
48 mobile --> api
49 cli --> api
50 api --> worker
51 api --> cache
52 worker --> db
53 api --> db
54 worker --> storage
55```
57---

Exemplar Diagram

Block diagram showing a three-tier web application architecture from client-facing interfaces through application services to data storage, with emoji labels indicating component types:

block-beta
    columns 3

    block:client:3
        columns 3
        browser["🌐 Browser"]
        mobile["📱 Mobile App"]
        cli["⌨️ CLI Tool"]
    end

    space:3

    block:app:3
        columns 3
        api["🖥️ API Server"]
        worker["⚙️ Worker"]
        cache["⚡ Redis Cache"]
    end

    space:3

    block:data:3
        columns 2
        db[("💾 PostgreSQL")]
        storage["📦 Object Storage"]
    end

    browser --> api
    mobile --> api
    cli --> api
    api --> worker
    api --> cache
    worker --> db
    api --> db
    worker --> storage

Raw lines 15 to 58
59## Tips
61- Use `columns N` to control the layout grid
62- Use `space:N` for empty cells (alignment/spacing)
63- Nest `block:name:span` followed by its contents and `end` for grouped sections
64- Connect blocks with `-->` arrows
65- Use **emoji in labels** `["🔧 Component"]` for visual distinction
66- Use cylinder `db[("text")]` syntax for databases within blocks
67- Keep to **3–4 rows** with **3–4 columns** for readability
68- **Always** pair with a Markdown text description above for screen readers
70---

Tips

  • Use columns N to control the layout grid
  • Use space:N for empty cells (alignment/spacing)
  • Nest block:name:span followed by its contents and end for grouped sections
  • Connect blocks with --> arrows
  • Use emoji in labels ["🔧 Component"] for visual distinction
  • Use cylinder db[("text")] syntax for databases within blocks
  • Keep to 3–4 rows with 3–4 columns for readability
  • Always pair with a Markdown text description above for screen readers

Raw lines 59 to 71
72## Template
74_Description of the system layers and how components connect:_
76```mermaid
77block-beta
78 columns 3
80 block:layer1:3
81 columns 3
82 comp_a["📋 Component A"]
83 comp_b["⚙️ Component B"]
84 comp_c["📦 Component C"]
85 end
87 space:3
89 block:layer2:3
90 columns 2
91 comp_d["💾 Component D"]
92 comp_e["🔧 Component E"]
93 end
95 comp_a --> comp_d
96 comp_b --> comp_d
97 comp_c --> comp_e
98```
100---

Template

Description of the system layers and how components connect:

block-beta
    columns 3

    block:layer1:3
        columns 3
        comp_a["📋 Component A"]
        comp_b["⚙️ Component B"]
        comp_c["📦 Component C"]
    end

    space:3

    block:layer2:3
        columns 2
        comp_d["💾 Component D"]
        comp_e["🔧 Component E"]
    end

    comp_a --> comp_d
    comp_b --> comp_d
    comp_c --> comp_e

Raw lines 72 to 101
102## Complex Example
104_Enterprise platform architecture rendered as a 5-tier block diagram with 15 components. Each tier is a block group spanning the full width, with internal columns controlling component layout. Connections show the primary data flow paths between tiers:_
106```mermaid
107block-beta
108 columns 4
110 block:clients:4
111 columns 4
112 browser["🌐 Browser"]
113 mobile["📱 Mobile App"]
114 partner["🔌 Partner API"]
115 admin["🔐 Admin Console"]
116 end
118 space:4
120 block:gateway:4
121 columns 2
122 apigw["🌐 API Gateway"]
123 auth["🔐 Auth Service"]
124 end
126 space:4
128 block:services:4
129 columns 4
130 user_svc["👤 User Service"]
131 order_svc["📋 Order Service"]
132 product_svc["📦 Product Service"]
133 notify_svc["📤 Notification Service"]
134 end
136 space:4
138 block:data:4
139 columns 3
140 postgres[("💾 PostgreSQL")]
141 redis["⚡ Redis Cache"]
142 elastic["🔍 Elasticsearch"]
143 end
145 space:4
147 block:infra:4
148 columns 3
149 mq["📥 Message Queue"]
150 logs["📊 Log Aggregator"]
151 metrics["📊 Metrics Store"]
152 end
154 browser --> apigw
155 mobile --> apigw
156 partner --> apigw
157 admin --> auth
158 apigw --> auth
159 apigw --> user_svc
160 apigw --> order_svc
161 apigw --> product_svc
162 order_svc --> notify_svc
163 user_svc --> postgres
164 order_svc --> postgres
165 product_svc --> elastic
166 order_svc --> redis
167 notify_svc --> mq
168 order_svc --> mq
169 mq --> logs
170```

Complex Example

Enterprise platform architecture rendered as a 5-tier block diagram with 15 components. Each tier is a block group spanning the full width, with internal columns controlling component layout. Connections show the primary data flow paths between tiers:

block-beta
    columns 4

    block:clients:4
        columns 4
        browser["🌐 Browser"]
        mobile["📱 Mobile App"]
        partner["🔌 Partner API"]
        admin["🔐 Admin Console"]
    end

    space:4

    block:gateway:4
        columns 2
        apigw["🌐 API Gateway"]
        auth["🔐 Auth Service"]
    end

    space:4

    block:services:4
        columns 4
        user_svc["👤 User Service"]
        order_svc["📋 Order Service"]
        product_svc["📦 Product Service"]
        notify_svc["📤 Notification Service"]
    end

    space:4

    block:data:4
        columns 3
        postgres[("💾 PostgreSQL")]
        redis["⚡ Redis Cache"]
        elastic["🔍 Elasticsearch"]
    end

    space:4

    block:infra:4
        columns 3
        mq["📥 Message Queue"]
        logs["📊 Log Aggregator"]
        metrics["📊 Metrics Store"]
    end

    browser --> apigw
    mobile --> apigw
    partner --> apigw
    admin --> auth
    apigw --> auth
    apigw --> user_svc
    apigw --> order_svc
    apigw --> product_svc
    order_svc --> notify_svc
    user_svc --> postgres
    order_svc --> postgres
    product_svc --> elastic
    order_svc --> redis
    notify_svc --> mq
    order_svc --> mq
    mq --> logs
Raw lines 102 to 171
172### Why this works
174- **5 tiers read top-to-bottom** like a network diagram — clients, gateway, services, data, infrastructure. Each tier is a block spanning the full width with its own column layout.
175- **`space:4` creates visual separation** between tiers without unnecessary lines or borders, keeping the diagram clean and scannable.
176- **Cylinder syntax `db[("text")]` for databases** — PostgreSQL renders as a cylinder, instantly recognizable as a data store. Other components use standard rectangles.
177- **Connections show real data paths** — not every possible connection, just the primary flows. A fully-connected diagram would be unreadable; this shows the key paths an engineer would trace during debugging.

Why this works

  • 5 tiers read top-to-bottom like a network diagram — clients, gateway, services, data, infrastructure. Each tier is a block spanning the full width with its own column layout.
  • **space:4 creates visual separation** between tiers without unnecessary lines or borders, keeping the diagram clean and scannable.
  • **Cylinder syntax db[("text")] for databases** — PostgreSQL renders as a cylinder, instantly recognizable as a data store. Other components use standard rectangles.
  • Connections show real data paths — not every possible connection, just the primary flows. A fully-connected diagram would be unreadable; this shows the key paths an engineer would trace during debugging.
Raw lines 172 to 179
180## Verified reference
182Syntax examples reviewed against [official Mermaid documentation](https://mermaid.js.org/syntax/block.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 180 to 182