Components & code
Most C4 models stop at the container level, and that's correct. This page covers the two deeper levels for the few places that earn them.
Components: the inside of one container
A Component is a structural building block inside a single container — a service, a module, an adapter. A component layer answers "how is this one part organized?" for the people who work on it.
Only one container's internals per layer. Two containers' components on one canvas is the same level-mixing mistake as putting components on the container diagram.
When a container earns it
Draw a component layer when:
- several people need to agree on the container's internal structure;
- the container is the system's risk concentration (the "everything goes through it" part);
- onboarding to that container keeps requiring a whiteboard session.
Skip it when the container is a database, a third-party product, or anything whose insides nobody needs to discuss.
Code: the level you don't draw
The code level (classes, sequences) changes with every commit. Hand-drawn, it's stale before the ink dries. Model code-level elements only where a specific structure genuinely needs to be communicated and is stable enough to stay true.
Where next
- The C4 model — the full zoom story.
- Flow guides — behavior across the parts you've modeled.