The Explanation LabAll 20 lessons

22 SEEING · How eyes read a picture

Label every box and line.

You will learn how to draw a software system so anyone can follow it, with what goes in each box, what goes on each line, and which diagram to draw for which reader. It takes 7 minutes.

LEVEL 1 · CONTEXT · FOR EVERYONE The short version

Most system diagrams are boxes and arrows. You can't tell what a box is, what a line does, or which way it goes. The C4 model fixes that with four rules:

Here's a typical diagram of a clinic's booking system. The button shows the same system drawn the C4 way.

EXAMPLE SYSTEM

BEFORENo title

UsersWebAPIDBEHRSMS

No key

LEVEL 1 · SYSTEM CONTEXTSystem Context diagram for Appointment Booking

For: Everyone, technical or not. Shows: The system, the people who use it, and the systems it talks to.

Books visitsfor callersusing Books andmanages visitsusing Reads openslots from andwritesbookings to Sendsremindersusing Front desk staff [Person] Books visits forpatients who phone in. Patient [Person] Books, moves andcancels their ownvisits. Appointment Booking [Software System] Lets patients and staff bookclinic visits. Clinic Records [Software System] Holds patient recordsand doctors' schedules.Already in use. Text Message Service [Software System] Sends text messages topatients' phones. Runby an outside vendor.

Scroll sideways to see the whole diagram.

KEYPersonSoftware system in scopeExisting or outside systemRelationship, read along the arrow

Same system. Now you can tell who uses it, what it depends on and what each line does, without asking the person who drew it.

C4 isn't progressive disclosure. Progressive disclosure decides when to show more. C4 decides what goes on each diagram, and who each diagram is for.

This page zooms the same way. You just read level 1. Level 2 opens the system for the people who draw it. Level 3 is the detailed rules.

LEVEL 2 · CONTAINERS · FOR WHOEVER DRAWS Open a box

The clip starts with a typical diagram. Watch what each box gains, what each line gains, and what happens when the system box opens.

48 seconds · a new lesson, not part of the full video

THE NAME FOR IT

The C4 model

Simon Brown · c4model.com · The C4 Model (O'Reilly, 2026)

Draw a software system as a set of maps at different levels of zoom, one for each audience. Every box says what it is and what it does. Every line says what it does, in one direction.

Each level of zoom is its own diagram, for its own reader. Below is the example at three levels. Choose the system box to open it into its containers. Then choose the Booking API to see its components.

EXAMPLE SYSTEM

LEVEL 1 · SYSTEM CONTEXTSystem Context diagram for Appointment Booking

For: Everyone, technical or not. Shows: The system, the people who use it, and the systems it talks to.

Books visitsfor callersusing Books andmanages visitsusing Reads openslots from andwritesbookings to Sendsremindersusing Front desk staff [Person] Books visits forpatients who phone in. Patient [Person] Books, moves andcancels their ownvisits. Appointment Booking [Software System] Lets patients and staff bookclinic visits.OPEN + Clinic Records [Software System] Holds patient recordsand doctors' schedules.Already in use. Text Message Service [Software System] Sends text messages topatients' phones. Runby an outside vendor.

Scroll sideways to see the whole diagram.

KEYPersonSoftware system in scopeExisting or outside systemRelationship, read along the arrow

LEVEL 2 · CONTAINERSContainer diagram for Appointment Booking

For: Technical people, in and out of the team. Shows: The apps and data stores inside the system, and how they talk.

Appointment Booking[Software System] Books visitsfor callersusing[HTTPS] Books andmanages visitsusing[HTTPS] Makes APIcalls to[JSON/HTTPS] Reads openslots from andwritesbookings to[FHIR/HTTPS] Reads from andwrites to[SQL/TCP] Readstomorrow'svisits from[SQL/TCP] Sendsremindersusing[REST/HTTPS] Front desk staff [Person] Books visits forpatients who phonein. Patient [Person] Books, moves andcancels their ownvisits. Booking Web App [Container:TypeScript, React] Shows open slots andtakes bookings in thebrowser. Booking API [Container:Node.js, Express] Applies the bookingrules and saves eachbooking.OPEN + Booking Database [Container: PostgreSQL] Stores bookings andsent reminders. Reminder Worker [Container:Node.js, cron job] Texts everyone bookedfor tomorrow. Clinic Records [Software System] Holds patientrecords and doctors'schedules. Alreadyin use. Text Message Service [Software System] Sends text messagesto patients' phones.Run by an outsidevendor.

Scroll sideways to see the whole diagram.

KEYPersonContainer (an app)Container (a data store)System boundaryOutside systemRelationship [protocol]FHIR the HL7 standard for exchanging health recordsAPI application programming interface

LEVEL 3 · COMPONENTSComponent diagram for the Booking API

For: Architects and developers. Only if it helps. Shows: The main parts inside one container.

Booking API[Container: Node.js, Express] Makes APIcalls to[JSON/HTTPS] Checks eachbooking with Gets openslots andbooks themusing Saves eachbooking using Reads openslots from andwritesbookings to[FHIR/HTTPS] Reads from andwrites to[SQL/TCP] Booking Web App [Container:TypeScript, React] Shows open slots andtakes bookings inthe browser. Booking Database [Container: PostgreSQL] Stores bookings andsent reminders. Booking Controller [Component:Express router] Takes booking requestsfrom the web app. Booking Rules [Component:TypeScript module] Blocks double bookingsand cancels inside 24hours. Booking Store [Component:TypeScript module] Saves bookings to theBooking Database. Records Client [Component:TypeScript module] Reads open slots fromClinic Records andwrites bookings back. Clinic Records [Software System] Holds patientrecords and doctors'schedules. Alreadyin use.

Scroll sideways to see the whole diagram.

KEYComponentContainer (an app)Container (a data store)Container boundaryOutside systemRelationship [protocol]FHIR the HL7 standard for exchanging health recordsAPI application programming interface
Choose a box marked OPEN to zoom in. Level 4, code, isn't drawn: most IDEs can draw it on demand.

In C4, a container is "an application or a data store": a web app, an API, a database, a scheduled job. Each one runs or stores data on its own. A component is a part inside one container.

Here are the four levels and who each one is for:

1

System context The system, the people who use it, and the systems it talks to.

Everyone, technical or not.

2

Containers The apps and data stores inside the system, and how they talk.

Technical people, in and out of the team.

3

Components The main parts inside one container.

Architects and developers. Only if it helps.

4

Code Classes, functions and tables inside one component.

Developers. Let the IDE draw it on demand.

You don't have to draw them all. On c4model.com, Brown says "the system context and container diagrams are sufficient for most software development teams." Draw components only where they help. Leave the code level to your tools.

LEVEL 3 · THE RULES · FOR REVIEWERS The rules, checked

C4 doesn't fix the shapes or colors you use. Brown calls it notation independent. It fixes what every diagram must say.

What goes in a box

What goes on a line

What goes on the diagram

This page's self-check

c4model.com has a review checklist for any diagram. This page runs its rules over its own diagrams each time it's built:

RulePasses
Every box has a name13 of 13
Every box says its type13 of 13
Every box says what it does13 of 13
Every container and component names its technology8 of 8
Every line has a label17 of 17
Every label is specific (a verb phrase, not "uses")17 of 17
Every line goes one way17 of 17
Every line between containers names its protocol10 of 10
Every diagram has a title3 of 3
Every diagram has a key3 of 3

Checked when this page is built, over the 13 boxes and 17 lines in the diagrams above. Nothing fails.

TAKEAWAY

Label every box.
Label every line.

Draw this way

  1. Name the reader. Everyone? Draw the system context. Developers? Add the containers.
  2. Draw the system as one box. Put the people who use it on one side and the systems it talks to on the other.
  3. Label every box. Its name, its [type] and one line on what it does.
  4. Draw every line one way. Label it with a verb phrase that reads along the arrow.
  5. Add a title and a key. The title says the level and the scope.
  6. Zoom in only where it helps. Open the system into its containers. Add each container's technology and each line's protocol.
  7. Test it. Show it to someone who didn't draw it. Can they read every arrow out loud as a sentence?

Ask your agent

PROMPT
Draw the software system described below as a C4 model (Simon Brown, c4model.com), one level at a time.
1. Start with the System Context diagram only: the system as one box, the people who use it, and the outside systems it talks to.
2. Give every element a name, its type in brackets (Person, Software System) and one short line on what it does.
3. Draw every relationship in one direction, with a specific label that reads along the arrow. Never just "uses".
4. Give the diagram a title that says the level and the scope, and a key for every shape and line style. Explain any acronym in the key.
5. Output it as Mermaid (C4Context) or Structurizr DSL. Then stop and ask me if I want the Container diagram.
6. For the Container diagram, show the apps and data stores inside the system. Add each container's technology and each relationship's protocol.
Don't invent parts of the system. If something isn't in the description, list it as a question instead.

System:
[paste here]

What good output looks like: you can read every arrow as a sentence ("Booking API reads from and writes to Booking Database"), and no one has to ask what a box is.

Sources