C4 model
C4 is a way to draw the structure of a software system at four zoom levels, like a map: from a whole country down to a single street. Each level gets its own picture, and levels are not mixed into one diagram. That way a newcomer and a developer each see exactly as much detail as they need. The name C4 comes from four English words: context, containers, components, code.
Four levels
- Context · the whole system as one block and everyone linked to it: people and neighboring systems. The question: who uses it and why.
- Containers · the separately running parts it is made of: a website, a server, a database. The question: what the system is built from.
- Components · what one such part is made of, for example a server: payment, orders, promo codes. The question: how one part is organized.
- Code · how one component is organized inside: classes and functions. This level is rarely drawn: the code itself shows it.
Frequently asked questions
What is the C4 model?
A way to draw a software system’s structure at four zoom levels: context, containers, components and code.Why four levels?
Each level has its own picture, so both a newcomer and a developer see exactly as much detail as they need.Source: c4model.com, the method site by Simon Brown
Read more: How an agent draws diagrams on request: sequence and C4
Where it appears · 1
- QA work after support with an AI agent · Harness