Profile picture
Simon Brown @simonbrown
, 9 tweets, 4 min read Read on Twitter
Here's an introduction to the C4 model in a few tweets. The C4 model is a way to visualise the software architecture of a software system, and a way to avoid creating diagrams like this.
"C4" stands for Context, Containers, Components and Code ... a set of hierarchical diagrams that you can use to describe your software architecture at different zoom levels, each useful for different audiences. Think of it as Google Maps for your code.
There are four types of elements that the Context, Container and Component diagrams show: people, software systems, containers (apps, databases, microservices, etc) and components. This is the common vocabulary we use to describe the static structure of a software system.
Level 1 - System Context: this shows the software system you are building, and how it fits into the world around it (the people who use it, and the other software systems it interacts with). Here's an example for a fictional Internet Banking System.
Level 2 - Containers: this zooms into the software system boundary, and shows the containers (apps, databases, microservices, etc) that make up that software system. Note that this includes information about the technology decisions.
Level 3 - Components: this zooms into an individual container to show the components inside it. These components should map to real abstractions (e.g. a grouping of code) in your codebase.
Level 4 - Code (e.g. classes): if you really want or need to, you can zoom into an individual component to show how that component is implemented. Here's a zoom in on a single component, showing the classes and interfaces inside it.
If you're not using UML to draw these diagrams (and you can), notation is important. Make sure that you have a key/legend to describe any notation that you're using, even if it's obvious to you. And don't forget about the diagram title!
That's basically it. See c4model.com for more information, supplementary diagrams (runtime and deployment), examples, resources, FAQs, training, videos from conference talks, tooling, etc.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Simon Brown
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($3.00/month or $30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!