Skip to content

Introduction c4

Giang edited this page Mar 23, 2023 · 1 revision

The C4 model was developed to help software development teams describe and communicate software architecture, both during preliminary design sessions and when documenting an existing codebase afterwards. It is a way of creating maps of our code, at different levels of detail, in the same way you would use something like Google Maps to zoom in and out of an area you are interested in. Although the C4 model is primarily for software architects and developers, it provides a way for our software development teams to communicate their software architecture efficiently and effectively, at different levels of detail, telling different stories to different kinds of audiences, when pre-designing or post-documenting an existing codebase.

The perspectives are divided according to the hierarchical level:

Context diagram (level 1):

show the system in scope and its relationship with users and other systems;

Container diagram (level 2):

decompose a system into interconnected containers. A container represents an application or a data store;

Component diagram (level 3):

decompose containers into interrelated components, and relate the components to other containers or other systems;

Code diagram (level 4):

provide additional details on the design of architectural elements that can be converted into code. At this level, the C4 model relies on existing notations such as Unified Modelling Language (UML), Entity Relation Diagrams (ERD) or diagrams generated by Integrated Development Environments (IDE).