Skip to content

The model is the entry point ​

The editor follows the familiar four C4 levels:

  1. System Context — the system boundary, users, and external dependencies.
  2. Containers — applications, databases, web frontends, and other deployable or executable units.
  3. Components — controllers, services, adapters, endpoints, and internal building blocks.
  4. Code — classes, interfaces, functions, or other implementation-level objects where that detail is useful.

A small but important clarification: a container in C4 does not mean a Docker container. It is a high-level runtime or data-store boundary such as an API application, a PostgreSQL database, or a single-page web application.

System context diagram: an internet banking system surrounded by an identity provider, a mainframe, an e-mail system, a payment network and fraud analytics
Level 1 — system context. Every arrow carries a label and a technology.

The point of these layers is not to document everything to the same depth. In most systems, Context, Container, and selected Component diagrams are enough. I only use the Code level for the parts that are genuinely hard to understand, risky to change, or important for onboarding.

Container diagram with people, a gateway, an API, a cache, an event bus, a datastore and a worker
Level 2 — containers of one system. Colour comes from the technology; datastores are cylinders and people are actors.