"매 diagram 의 audience 의 결정한다". 매 C4 model (Simon Brown, 2018) 의 Context → Container → Component → Code 의 4-level zoom 의 default standard 의 됨. 매 2026 의 PlantUML + Mermaid + Structurizr DSL 의 most-used toolchain.
매 핵심
매 C4 Model levels
Level 1 — System Context: 매 system + users + external systems. 매 non-technical audience.
Level 2 — Container: 매 deployable units (web app, DB, queue). 매 technical overview.
Level 3 — Component: 매 container 안의 logical components. 매 dev team.
Level 4 — Code: 매 class diagram (rarely used — 매 IDE 의 generation 의 default).
매 supplementary diagrams
Sequence: 매 request flow / interaction.
Deployment: 매 infra topology (k8s, regions).
Dynamic: 매 runtime view, message sequence.
State: 매 entity lifecycle.
매 응용
ADR 의 embedded diagram — 매 context.
Onboarding 의 system overview.
Incident postmortem 의 affected component highlight.
💻 패턴
C4 Context (Mermaid)
C4Context
title System Context for Banking App
Person(customer, "Customer", "Bank customer with accounts")
System(banking, "Internet Banking", "Allows customers to view info")
System_Ext(mainframe, "Mainframe", "Stores account, txn info")
System_Ext(email, "Email System", "SMTP relay")
Rel(customer, banking, "Uses", "HTTPS")
Rel(banking, mainframe, "Reads/writes", "XML/HTTPS")
Rel(banking, email, "Sends emails", "SMTP")
workspace "Banking" {
model {
user = person "Customer"
bank = softwareSystem "Banking" {
spa = container "SPA" "React/TS"
api = container "API" "Go/Gin"
db = container "Database" "Postgres 17" "Database"
}
user -> spa "Uses"
spa -> api "JSON/HTTPS"
api -> db "SQL"
}
views {
container bank "Containers" { include * autolayout lr }
theme default
}
}
Sequence (Mermaid)
sequenceDiagram
actor U as User
participant S as SPA
participant A as API
participant D as DB
U->>S: Click "Pay"
S->>A: POST /payments
A->>D: BEGIN; INSERT; COMMIT
A-->>S: 201 Created
S-->>U: Success toast
Deployment (Mermaid)
flowchart LR
subgraph k8s[Kubernetes / us-east-1]
api[API Pods x3]
worker[Worker Pods x2]
end
subgraph rds[RDS]
pg[(Postgres 17 Multi-AZ)]
end
ALB --> api
api --> pg
worker --> pg
worker --> SQS
언제: text spec → Mermaid/PlantUML 의 generation, code → C4 inference.
언제 X: production diagram 의 unverified auto-generation — 매 hallucinated component 의 risk.
❌ 안티패턴
Box-and-line soup: 매 layer/audience 의 mix 의 unreadable diagram.
Stale .png in repo: 매 source-less binary — 매 update 의 X. Mermaid/DSL 의 사용.
Over-leveling: 매 Level 4 (Code) 의 manually 의 maintain — 매 IDE 의 generate.
No legend: 매 shape/color semantics 의 없는 diagram — 매 reader 의 confusion.
🧪 검증 / 중복
Verified (Simon Brown, Software Architecture for Developers; c4model.com).
신뢰도 A.
🕓 Changelog
날짜
변경
2026-05-08
Phase 1
2026-05-10
Manual cleanup — C4 model + Mermaid/Structurizr/diagrams.py patterns