C4 Model

Context, Container, Components and Code

A simple and clear model for documenting/visualizing Software Architecture.

It has 4 levels of detailed diagrams.

Drawing

Levels

Context (Software System)

It is the highest level of abstraction and describes something that delivers value to its users.

This includes the software system being modelled, and any other depended softwares.

Diagram exemple.

Represents an application or data store. (It is a Deployable Unit)

A container is something that needs to be running in order for overall software systems to work.

Diagram example.

It is a grouping of related functionalities encapsulated behind a well defined interface.

All the Components inside a container execute in the same process space.

Diagram example.

These are one or more elements constructed with the basic building blocks of the used programming language, (like class, interface, enums, function, object, etc).

Diagram example.

It is a library to create C4 Model diagrams through code.

A VSCode plugin named PlantUML is also available to run PlantUML.

Creating a Context

Then execute in VSCode this command PlantUML: Preview Current Diagram.

Creating Containers

Last updated