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 can be a useful starting point for diagramming and documenting a software system, allowing you to step back and look at the big picture. Draw a simple block diagram showing your system as a box in the centre, surrounded by its users and the other systems that it interfaces 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 with a System Context diagram, a really useful next step can be to illustrate the high-level technology choices with a Container diagram. A "container" is something like a web server, application server, desktop application, mobile app, database, file system, etc. Essentially, a container is anything that can execute code or host 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

Following on from a Container diagram showing the high-level technology decisions, you can then start to zoom in and decompose each container further. However you decompose your system is up to you, but this is about identifying the major logical structural building blocks and their interactions.

The Component diagram shows how a container is divided into 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.