ID: I202512091216 Status: idea Tags: Diagrams

C4 Diagram

Not to be confused with C4 Explosives.

A C4 model diagram consists of 4 layers.

  • System Diagram
  • Container Diagram
  • Component Diagram
  • Code Diagram

These 4 layers combined create a C4 Diagram. You don’t need to make all 4 layers for it to be complete. The thing that makes a C4 Diagram useful is that you can combine multiple layers, being able to zoom in on parts of your code.

In general you’d create 1 diagram of each layer, where each diagram shows you the internals of a specific thing. Kinda like using a microscope.

An image showing the 4 layers of a C4 diagram, and how thewy link together In this picture, you can see how each diagram zooms in on the layer above it.

Levels

System Level

Container Level

Component Level

Code level


References