Structurizr

Structurizr builds upon “diagrams as code”, allowing you to create multiple software architecture diagrams, in a variety of rendering tools, from a single model.

C4 model

Structurizr is specifically designed to support the C4 model for visualising software architecture, allowing you to reach the highest levels of maturity associated with creating software architecture diagramming.

Software architecture diagram maturity model

Model-based

Structurizr is a modelling tool, allowing you to create multiple diagrams from a single model. Here’s an example with the Structurizr DSL:

workspace {

    model {
        user = person "User"
        
        softwareSystem = softwareSystem "Software System" {
            webapp = container "Web Application"
            db = container "Database Schema"
        }

        user -> webapp "Uses"
        webapp -> db "Reads from and writes to"
    }

    views {
        systemContext softwareSystem "SystemContext" {
            include *
            autolayout lr
        }

        container softwareSystem "Containers" {
            include *
            autolayout lr
        }
        
        styles {
            element "Person" {
                shape person
            }
        }
    }

}

Authoring tool independent

The Structurizr DSL shown above is just one way to author your software architecture models. There are also a number of programming language libraries (e.g. Structurizr for Java, and ports for .NET, Python, PHP, TypeScript, etc) that can be used to create software architecture models. The open JSON data format defines the data format for a Structurizr compatible “workspace”, which is the wrapper for a software architecture model and views.

With this in mind, Structurizr workspaces can be created in the following ways:

  1. Manually authored:
  2. Reverse-engineered:
  3. Hybrid approach:
    • Use the Structurizr DSL to define software systems and containers, and reverse-engineer component level details via code.
    • Use code to reverse-engineer a system catalog from Backstage (example), ServiceNow, etc and have teams add container and component level detail via the Structurizr DSL.

Rendering tool independent

Unlike most modelling tools, and because of the open JSON data format, Structurizr is rendering tool independent. For example, here are a number of visualisations of the same model.

Structurizr cloud service, on-premises installation, and Lite - diagram with manual layout Structurizr - diagram with manual layout
Structurizr cloud service, on-premises installation, and Lite - diagram with automatic layout Structurizr - diagram with automatic layout
Structurizr cloud service, on-premises installation, and Lite - graph (interactive layout) Structurizr - graph
PlantUML via the Structurizr CLI (automatic layout only) PlantUML via the Structurizr CLI
C4-PlantUML via the Structurizr CLI (automatic layout only) C4-PlantUML via the Structurizr CLI
Mermaid via the Structurizr CLI (automatic layout only) Mermaid via the Structurizr CLI
Ilograph via the Structurizr CLI (interactive layout) Ilograph via the Structurizr CLI