Examples

This page shows some examples of what you can do with Structurizr, with links to the source code in Java and/or C#.

Getting Started

A simple "getting started" example, with a single System Context diagram.

GitHub GettingStarted.java GettingStarted.cs

Getting Started

Big Bank plc

This is an example workspace to illustrate the key features of Structurizr, based around a fictional Internet Banking System for Big Bank plc. It includes all of the diagram types, plus documentation.

GitHub BigBankPlc.java BigBankPlc.cs

Big Bank plc

Microservices

This is a simple example of what an asynchronous microservices style of architecture might look like. In addition to a diagram showing the static structure, there is also a dynamic diagram that shows the element interactions that take place in the scenario that a "customer update" event is generated. Some of these interactions happen in parallel. You can run the animation by pressing the button, or step through the animation using the Up/Down cursor keys.

GitHub MicroservicesExample.java MicroservicesExample.cs

A microservices example

Financial Risk System

This workspace describes a sample solution (at the system context level) to the financial risk system architecture kata used in Simon Brown's software architecture workshops. It also includes some supplementary documentation, which has been created using the documentation feature and three Markdown/AsciiDoc files, one per section.

The program that creates the workspace simply inserts the contents of the Markdown files into the workspace and uploads it to Structurizr. The documentation is then rendered in the web browser.

GitHub FinancialRiskSystem.java FinancialRiskSystem.cs context.adoc functional-overview.md quality-attributes.md

Financial Risk System documentation

adr-tools

This example shows how to use the decision log feature, where architecture decision records (ADRs) are imported from Nat Pryce's adr-tools tooling. As with documentation, each decision record is a separate Markdown file, which is parsed and imported into the Structurizr workspace, and rendered in the web browser.

GitHub AdrTools.java AdrTools.cs decision records

Architecture decision records

Spring PetClinic

This is a full C4 representation of the open source Spring PetClinic, which is a demonstration of how to build applications using the Spring MVC framework. The system context and container levels of the software architecture model have been created manually using a few lines of code.

The component level model has been extracted automatically from the codebase using a combination of static analysis and reflection. All of the components in the component model are linked to a source code file on GitHub too. You can see this by double-clicking any of the components on the web application component diagram.

You can also read the step-by-step description of the Spring PetClinic example.

GitHub SpringPetClinic.java

Spring PetClinic

Filtered Views

This workspace is an example of how to use filtered views to show "current state" and "future state" versions of the same diagram. Two filtered views are built on top of a single System Context diagram, each of which excludes elements and relationships with a specific tag. Layout information for common elements is shared between both diagrams.

GitHub FilteredViews.java FilteredViews.cs

Filtered views

Contoso University

This is a full C4 representation of the Contoso University ASP.NET/Entity Framework sample application. The system context and container levels of the software architecture model have been created manually using a few lines of code.

The component level model has been extracted automatically from the codebase using a combination of static analysis and reflection. All of the components in the component model are linked to a source code file on GitHub too. You can see this by double-clicking any of the components on the web application component diagram.

GitHub ContosoUniversity.cs

Contoso University

HTTP-based health checks

Structurizr's health checks feature allows you to supplement your deployment models with HTTP-based health checks to get an "at a glance" view of the health of your software systems.

When defining your software architecture model using the client library, HTTP-based health checks can be added to the Container Instances in your deployment model. Each health check is defined by a name, an endpoint URL, a polling interval (e.g. 60 seconds), a timeout (e.g. 1000 milliseconds), and optionally one or more HTTP headers. When the workspace is loaded into your web browser, the health checks are executed and the results are summarised by colour coding the diagram elements (red, amber, green) and indicating the percentage of the health checks that have passed for each element.

GitHub HttpHealthChecks.java HttpHealthChecks.cs

HTTP-based health checks

Client-side encrypted workspace

Although all workspace data is encrypted, customers on a paid plan can choose to client-side encrypt their workspace for additional peace of mind. The passphrase for this example workspace is password.

GitHub ClientSideEncryption.java ClientSideEncryptedWorkspace.cs

A client-side encrypted workspace