C4 model for
software architecture

What is the C4 model?

The C4 model is a simple way to bring consistency to how you and your team describe and diagram software architecture.

It was created by Simon Brown and is a set of abstractions and diagram types that help you and your team to align on technical decisions quicker.

It is essentially only 2 things:

A hierarchical set of abstractions

and

Four diagram types

The C4 model abstractions

The first part of the C4 model is a simple set of hierarchical abstractions to describe your software system and the ecosystem around it.

👤

Person

End user who uses the systems.

For Example: Customer, admin user or employee.

🏢

System

The highest level of abstraction that delivers value to end users, whether they are human or not. Systems are often owned by a development team.

For Example: SendGrid is an external system.

📦

Container

Applications and data stores that make up a system. These are independently deployable and runnable. (Not to be confused with Docker containers)

For Example: API service, front-end application or mobile app.

🧩

Component

Building blocks and modules that make up each container.

For Example: Authentication module or payment card validator.

C4 model diagrams

The second part of the C4 model is the 4 hierarchical diagram types, each tailored for a specific audience. Each diagram type visualizes the abstractions for each of the C4 levels.

Level 1
System context diagram

A high-level overview of how your users interact with the internal and external systems to get value.

Audience

Architects, developers, product and business. For technical and non-technical audiences.

Scope

Persons and systems.

Example above using IcePanel

Level 2
Container diagram

A zoomed-in view of one system that shows the running containers inside it.

Audience

Architects, developers and product. For high-level technical audiences.

Scope

Persons, systems and containers.

Example above using IcePanel

Level 3
Component diagram

A zoomed-in view of one container that shows the components making it up.

Audience

Architects and developers. For low-level technical audiences.

Scope

Persons, systems, containers and components.

Example above using IcePanel

Level 4
Code diagram

Usually in the form of UML class diagrams that are ideally autogenerated from the actual code. This level is rarely used as it goes into too much technical detail for most teams.

Audience

Architects and developers. For low-level technical audiences.

Scope

Persons, systems, containers and components.

The C4 model website also defines three supplementary diagram types

C4 model tools

Text-based modelling tools

Text-based diagramming tools

IcePanel

Start your diagramming
journey today with IcePanel

Try for free
IcePanel Banner