Stackbook Logo
← Back to Syllabus
Day 5Level 1 — Core Mental Models

C4 Modelling: Context, Containers, Components, Code

Learn: 45 minMap: 30 minDesign: 60 min

Core Concepts (5)

  • 1.C4 gives you 4 zoom levels: System Context → Containers → Components → Code
  • 2.Context diagram: who uses it, what external systems touch it
  • 3.Container diagram: deployable units (services, databases, queues, SPAs)
  • 4.Component diagram: internal structure of a container (modules, classes)
  • 5.Diagrams as code (Mermaid/Structurizr) = versionable, reviewable, diffable

Map to Your Experience

Draw the Context and Container diagrams for your system. What external systems did you miss on first pass?

Design Brief: C4 Context & Container Diagrams

Requirements

  • Context diagram shows all actors and external systems
  • Container diagram shows all deployable units
  • Technology choices labelled on each container
  • Data flows and protocols indicated
  • Rendered as Mermaid (text-based)

Constraints

  • Mermaid syntax only — no drag-and-drop tools
  • Must be valid C4 notation

Must Cover

context-diagramcontainer-diagramtechnology-labelsdata-flows

Trade-off Axis

diagram detail vs maintenance burden

Referenced Patterns

Competencies Advanced

distribution communication → L2requirements constraints → L2

Ready to Design?

Open this brief in the Design Studio. Your constraints, requirements, and patterns will be pre-filled. Create a Design Record and get AI critique.

Open in Studio →