Static structure diagrams

Structurizr supports four types of static structure diagrams. These are the Enterprise Context, System Context, Container and Component diagrams; a simple hierarchy of diagrams that can be used to describe the static structure of a software system.

A System Context diagram

System Context diagram

A System Context diagram is a good starting point for diagramming and documenting a software system, allowing you to step back and see the big picture. Draw a diagram showing your system as a box in the centre, surrounded by its users and the other systems that it interacts with.

Detail isn't important here as this is your zoomed out view showing a big picture of the system landscape. The focus should be on people (actors, roles, personas, etc) and software systems rather than technologies, protocols and other low-level details. It's the sort of diagram that you could show to non-technical people.

The example diagram you see here is a System Context diagram for the Spring PetClinic. The full-size diagram can be found here.

Container diagram

Once you understand how your system fits in to the overall IT environment, a really useful next step is to illustrate the high-level technology choices with a Container diagram. A "container" is something like a web application, desktop application, mobile app, database, file system, etc. Essentially, a container is a separately deployable unit that executes code or stores data.

The Container diagram shows the high-level shape of the software architecture and how responsibilities are distributed across it. It also shows the major technology choices and how the containers communicate with one another. It's a simple, high-level technology focussed diagram that is useful for software developers and support/operations staff alike.

The example diagram you see here is a Container diagram for the Spring PetClinic. The full-size diagram can be found here.

A Container diagram

A Component diagram

Component diagram

Next you can zoom in and decompose each container further to identify the major structural building blocks and their interactions.

The Component diagram shows how a container is made up of a number of components, what each of those components are, their responsibilities and the technology/implementation details.

The example diagram you see here is a Component diagram for the Spring PetClinic and the collection of components has been automatically extracted from the codebase using static analysis and reflection techniques. The full-size diagram can be found here.

Enterprise Context diagram

The Enterprise Context diagram is really the same as the System Context diagram, without a focus on a specific software system. It can help to provide a broader view of the people and software systems that are related to and reside within a given enterprise context (e.g. a business or organisation). The following diagrams show an example of this.

An Enterprise Context diagram

This is an Enterprise Context diagram for a fictional business called "Widgets Limited", showing the people and software systems related to the business.

A System Context diagram

This is a System Context diagram specifically for the "E-commerce System" in Widgets Limited, which only shows the people and other software systems that have a direct relationship with it.