practice

C4 Model

A set of four nested diagram levels — context, container, component, code — that keeps each diagram at one consistent level of abstraction.

diagramsdocumentationcommunication

The problem it solves is the diagram that mixes a user, a Kubernetes namespace, a class and a firewall on one page, which is legible to its author and nobody else.

Context shows the system as one box with its users and external systems — the diagram for executives. Container shows the separately deployable things and how they communicate — the single most useful diagram in practice and the one most teams stop at. Component opens one container. Code is usually generated if drawn at all.

The discipline that makes it work is not the notation. It is choosing an audience per diagram and refusing to add anything that belongs to a different level.