Simon Brown’s C4 model - Container diagrams

This learning hour follows on from the previous one on this topic and goes into a little more detail about The C4 model for visualising software architecture

Learning Goals

Session Outline

Connect: C4 recap

The list below comprises descriptions of elements of the C4 model. Some statements describe a Diagram, some describe an Abstraction. Fill in the blanks with the following words:

  1. A ____ represents one of the human users of your software system (e.g. actors, roles, personas, etc).
  2. A ____ diagram can be used to zoom into an individual component, showing how that component is implemented.
  3. A ____ is a grouping of related functionality encapsulated behind a well-defined interface. If you’re using a language like Java or C#, the simplest way to think of it is as a collection of implementation classes behind an interface.
  4. A ____ is the highest level of abstraction and describes something that delivers value to its users, whether they are human or not.
  5. A ____ diagram zooms into the software system in scope, showing the high-level technical building blocks.
  6. A ____ diagram provides a starting point, showing how the software system in scope fits into the world around it.
  7. A ____ diagram zooms into an individual container, showing the components inside it.
  8. A ____ represents an application or a data store. It is not the same as in Docker. It is something that needs to be running in order for the overall software system to work.

Context and Container diagrams

Go through the example diagrams on The C4 model website. Explain in particular the differences between Context and Container diagrams. Provide a context diagram for the Instavoiced exercise. Either one you designed yourself or one created in the previous session.

Go through some advice on notation:

Concrete: draw a container diagram

Take the example context diagram or the one your pair produced last time. Create a Container diagram that ‘zooms in’ on the Instavoiced system. If you have time, pick one of the containers and create a component diagram for it.


Join with another pair to compare the diagrams you have come up with. Did you make the same decisions about what details to include? Go through the advice on notation - did you follow it? If you have time, update your diagram.


Go and read more about the C4 model The C4 model. Create Context and Container diagrams for the software you work on.