docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,167 @@
|
||||
---
|
||||
id: wiki-2026-0508-c4-modeling-framework
|
||||
title: C4 Modeling Framework
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [C4 Model, C4 Diagrams, Simon Brown C4]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [architecture, c4, diagram, structurizr, documentation]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: DSL
|
||||
framework: Structurizr
|
||||
---
|
||||
|
||||
# C4 Modeling Framework
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 software architecture = 4 zoom levels (Context → Container → Component → Code)."**. 매 Simon Brown 이 2006년경 제안한 lightweight visualization framework. 매 2026 현재 Structurizr DSL + Mermaid C4 plugin 으로 diagram-as-code 가 standard, 매 audience-specific abstraction level 이 핵심 가치.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 4 levels
|
||||
- **L1 — System Context**: 매 system + users + external systems. 매 non-technical stakeholder 용.
|
||||
- **L2 — Container**: 매 deployable unit (web app, API, DB, queue). 매 technical lead 용.
|
||||
- **L3 — Component**: 매 container 내부 logical grouping (controller, service, repo). 매 dev team 용.
|
||||
- **L4 — Code**: 매 class diagram (UML). 매 거의 안 그림 — IDE 가 대신.
|
||||
|
||||
### 매 supplementary diagrams
|
||||
- **Deployment diagram**: 매 container → infrastructure node mapping.
|
||||
- **Dynamic diagram**: 매 runtime sequence/collaboration.
|
||||
- **System landscape**: 매 enterprise-wide multi-system view.
|
||||
|
||||
### 매 응용
|
||||
1. **Onboarding doc**: 매 새 dev 의 codebase orientation.
|
||||
2. **ADR illustration**: 매 architecture decision record 의 visual aid.
|
||||
3. **Stakeholder communication**: 매 PM/exec 에게 system scope 설명.
|
||||
4. **Compliance audit**: 매 data flow / boundary 시각화.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Structurizr DSL (canonical)
|
||||
```dsl
|
||||
workspace "Banking System" {
|
||||
model {
|
||||
customer = person "Customer"
|
||||
bankSystem = softwareSystem "Internet Banking" {
|
||||
webApp = container "Web Application" "Spring Boot" "Java"
|
||||
mobileApp = container "Mobile App" "React Native" "TypeScript"
|
||||
api = container "API" "Spring Boot" "Java"
|
||||
db = container "Database" "PostgreSQL" "RDBMS"
|
||||
|
||||
webApp -> api "uses" "JSON/HTTPS"
|
||||
mobileApp -> api "uses" "JSON/HTTPS"
|
||||
api -> db "reads/writes" "JDBC"
|
||||
}
|
||||
mainframe = softwareSystem "Mainframe" "External"
|
||||
customer -> bankSystem "uses"
|
||||
bankSystem -> mainframe "fetches account data" "MQ"
|
||||
}
|
||||
views {
|
||||
systemContext bankSystem { include * autolayout }
|
||||
container bankSystem { include * autolayout }
|
||||
theme default
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Mermaid C4 (in-repo markdown)
|
||||
```mermaid
|
||||
C4Context
|
||||
title System Context — Banking
|
||||
Person(customer, "Customer")
|
||||
System(bank, "Internet Banking", "Allows customers to view accounts")
|
||||
System_Ext(mainframe, "Mainframe", "Legacy core banking")
|
||||
Rel(customer, bank, "Uses")
|
||||
Rel(bank, mainframe, "Fetches data", "MQ")
|
||||
```
|
||||
|
||||
### Component-level decomposition
|
||||
```dsl
|
||||
api = container "API" {
|
||||
signInController = component "SignIn Controller" "Spring MVC"
|
||||
accountsController = component "Accounts Controller" "Spring MVC"
|
||||
authService = component "Auth Service" "Spring Bean"
|
||||
accountsRepo = component "Accounts Repository" "Spring Data JPA"
|
||||
|
||||
signInController -> authService "uses"
|
||||
accountsController -> accountsRepo "reads"
|
||||
authService -> db "verifies credentials"
|
||||
}
|
||||
```
|
||||
|
||||
### Deployment view
|
||||
```dsl
|
||||
deploymentEnvironment "Production" {
|
||||
deploymentNode "AWS us-east-1" {
|
||||
deploymentNode "EKS Cluster" {
|
||||
containerInstance webApp
|
||||
containerInstance api
|
||||
}
|
||||
deploymentNode "RDS" {
|
||||
containerInstance db
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Generated docs pipeline
|
||||
```bash
|
||||
# CI step — render diagrams from DSL
|
||||
docker run --rm -v $PWD:/usr/local/structurizr structurizr/cli \
|
||||
export -workspace workspace.dsl -format plantuml/c4plantuml
|
||||
plantuml -tsvg *.puml
|
||||
mv *.svg docs/architecture/
|
||||
```
|
||||
|
||||
### ADR + C4 link
|
||||
```markdown
|
||||
# ADR-007: Move auth to dedicated service
|
||||
**Status**: Accepted
|
||||
**Context**: See [Container diagram](../diagrams/banking-containers.svg)
|
||||
**Decision**: Extract `authService` component into its own container.
|
||||
**Consequences**: New diagram in `diagrams/v2-containers.svg`.
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Diagram level |
|
||||
|---|---|
|
||||
| Pitch to exec / new joiner intro | L1 Context |
|
||||
| Tech selection / deployment plan | L2 Container |
|
||||
| Code review / refactor discussion | L3 Component |
|
||||
| Inheritance question | IDE (skip L4) |
|
||||
| Multi-system enterprise view | System Landscape |
|
||||
|
||||
**기본값**: L1 + L2 (둘만 있어도 90% communication 충족).
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Software_Architecture]] · [[Architecture_Documentation]]
|
||||
- 변형: [[arc42]]
|
||||
- 응용: [[ADR]] · [[Structurizr]]
|
||||
- Adjacent: [[Mermaid]] · [[PlantUML]] · [[DDD]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: greenfield architecture 문서화, legacy reverse-engineering, ADR illustration.
|
||||
**언제 X**: real-time runtime monitoring (observability tool 영역).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **All 4 levels for every system**: 매 L4 거의 무의미 — IDE 대체.
|
||||
- **Mixing levels in one diagram**: 매 abstraction 깨짐 → audience 혼란.
|
||||
- **No legend / inconsistent shapes**: 매 reader 가 element type 못 구분.
|
||||
- **Diagram drift**: 매 DSL 없이 manual draw → 6개월 후 stale.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (c4model.com — Simon Brown, Structurizr DSL spec 2024).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — C4 levels, Structurizr DSL, Mermaid C4 examples |
|
||||
Reference in New Issue
Block a user