Concepts

Understand what you're modeling before you model it.

CRAYON-C4 gives you three ways to describe a software system, and each answers a different kind of question. Before you draw anything, it helps to know which one you actually need — most modeling mistakes come from reaching for the wrong diagram.

Start here

The three models

  • The C4 model — the four logical levels of structure: who uses the system, what it's built from, and how each part is arranged.
  • The deployment model — where the software actually runs: the infrastructure your parts occupy.
  • The F4 flow model — behavior over structure: what happens, in what order, across whom.

How they fit together

graph LR
  C4["`**C4**
How the system is arranged
(structure)`"]
  F4["`**F4**
How work moves through it
(behavior)`"]
  DEP["`**Deployment**
Where it runs
(infrastructure)`"]
  C4 -->|"flow runs over structure"| F4
  C4 -->|"parts get deployed onto infra"| DEP

The three share one underlying model, so they can't tell two different stories about the same system. A relationship you draw in C4 is the same relationship an F4 hand-off implies; a container you define in C4 is the same container a deployment node hosts.

Where next