C4 model

C4 model

The C4 model is a discipline more than a notation: draw the same system at four zoom levels, and never mix two levels in one diagram. Most confusing architecture diagrams are confusing because they mix levels.

Capable supports both common routes: C4-PlantUML, and the Structurizr DSL where one model generates every view.


When to reach for one

  • Architecture documentation that people outside the team will read.

  • Onboarding, where context comes before components.

  • Any system where the current diagram tries to show everything at once.


How to draw it in Capable

Route

Use when

Route

Use when

C4-PlantUML

One diagram at a time; the quickest way in.

Structurizr DSL

One model, many views, kept consistent automatically.


A worked example

A system context diagram, C4 level 1:

extension

The source, which you can paste into a new diagram and edit:

extension

A few things that catch people out

  • Level 1 has no technology on it. If your context diagram mentions Kubernetes, it is a container diagram.

  • Most teams need levels 1 and 2 only. Level 3 is for the parts that are genuinely hard.

  • Structurizr keeps views consistent, at the cost of learning a DSL. Worth it above about six diagrams.


Related

extension

Cheap to change means it stays true.

extension
extension