"매 architecture-as-code 의 reference impl". Simon Brown 의 C4 model 을 textual DSL 로 표현 → 다양한 view (Context, Container, Component, Code) 의 자동 generation. 2026 의 AI-aided (Claude, Cursor) 의 architectural diagram 생성 의 default tooling 중 하나.
매 핵심
매 C4 model recap
Level 1 — Context: System 의 user, external system 과 의 관계.
Level 2 — Container: Application, datastore, microservice 의 deployment unit.
Level 3 — Component: Container 내부 의 logical group.
Level 4 — Code: 매 class diagram (rarely needed).
매 Structurizr 형태
Structurizr DSL: text-based, 매 single source of truth.
docker run -it --rm -p 8080:8080 \
-v $PWD:/usr/local/structurizr \
structurizr/lite
# open http://localhost:8080
AI-aided generation (Claude prompt)
Given this codebase tree and key file imports, generate a Structurizr DSL
workspace covering Context + Container views. Use:
- person for end users
- softwareSystem for our system
- container for each deployable unit (web, api, worker, db, queue)
- explicit relationships with technology labels
Return only the DSL block.
언제: 매 codebase walk-through 후 architecture diagram 생성 (Claude 가 DSL 작성), 매 refactor plan 의 before/after view, 매 ADR 의 visual context.
언제 X: 매 throwaway sketch (overkill), 매 UI component design (use Figma), 매 sequence diagram primary (use Mermaid sequenceDiagram).
❌ 안티패턴
Level 4 (Code) 의 maintain: IDE 가 더 잘함. C4 의 Code level 은 rarely worthwhile.
DSL 의 stale: 매 code 와 sync 안 됨 → AI 가 quarterly regenerate.
Container 의 too granular: 매 microservice 50+ 의 single view → split per bounded context.
🧪 검증 / 중복
Verified (Simon Brown C4 model, structurizr.com docs, GitHub structurizr/dsl).