c4-model
c4 model is a hierarchical way to diagram software architecture at four levels of abstraction.
the four levels:
- context - system plus users and external systems (big picture)
- containers - major deployable units (apps databases services) and their interactions
- components - logical building blocks inside a container
- code - classes and methods (optional rarely maintained)
c4 enables:
- shared mental model across team and stakeholders
- clear system boundaries and responsibilities
- effective communication at the right level of detail
- early detection of design issues like tight coupling
use simple boxes and labeled arrows. start with context and containers. keep diagrams lightweight and useful.
practices:
- create context and container diagrams first
- maintain consistency in notation
- store diagrams with code when possible (structurizr or similar)
related: