Level 2 — Container
C4 Level 2: Container Diagram
Purpose
The Container diagram zooms into the system boundary to show:
- Major deployable/runnable units
- Technology choices
- High-level communication patterns
Audience: Technical stakeholders — developers, architects, DevOps.
Train.md Container Diagram
flowchart TB
subgraph Client
browser["🌐 Web Browser"]
end
subgraph "Train.md System"
hugo["📝 Hugo Static Site\n(Go, Markdown)"]
theme["🎨 Hugo Book Theme\n(HTML/CSS/JS)"]
content["📚 Content\n(Markdown + Mermaid)"]
end
subgraph Infrastructure
cdn["☁️ CDN / GitHub Pages\n(Static Hosting)"]
end
browser -->|HTTPS| cdn
cdn -->|serves| hugo
content --> hugo
theme --> hugoContainer Inventory
| Container | Technology | Purpose |
|---|---|---|
| Hugo Static Site | Go, Hugo | Builds Markdown into HTML |
| Hugo Book Theme | HTML, SCSS, JS | Provides UI components and styling |
| Content | Markdown, Mermaid | Documentation source files |
| CDN/Hosting | GitHub Pages / Netlify | Serves static assets globally |
Communication Patterns
| From | To | Protocol | Notes |
|---|---|---|---|
| Browser | CDN | HTTPS | All traffic |
| CDN | Static files | File system | Pre-built at deploy time |
Checklist for Container Diagrams
- All deployable units shown
- Technology stack indicated
- Data stores identified (if any)
- Communication protocols labeled