What are C4 diagrams?
C4 diagrams, or the C4 model, is used to diagram domain and implementation abstractions of system software architectures. These diagrams represent system architectures in a semantically consistent format that can stand by itself with little to no prior context as they always incorporate a name, description, with relevant contexts such as type of technology or its deployment location. The semantics used for C4 diagrams are coincidentally very similar to state-explain-link. It is focused as an "abstraction-first" approach to diagramming, with the hierarchy of abstractions of the model going down 4 levels:
- System Context diagram - shows the context of the entire system with related entities
- Container diagram - a high level shape of the architecture and how it fits the IT environment
- Component diagram - decompose containers into components to show implementation abstractions
- Code - shows how the component is implemented as programmable code
The C4 model isn't strictly static when it comes to these levels and also supports supplementary diagrams, such as system landscape diagrams, dynamic diagrams, deployment diagrams, etc.
The story of C4 diagrams
The C4 model was created by Simon Brown, designed with the goal for it to be a developer friendly approach to diagramming. The high level representations of these diagrams incidentally also allowed it to assist in communication between software development teams and product teams. The abstractions make it suitable for software consulting and allows us to do architecture evaluations and risk identification.