Diagrams as code 2.0

Structurizr builds upon "diagrams as code", allowing you to create multiple diagrams from a single model, using a number of tools and programming languages. This Structurizr DSL example creates two diagrams, based upon a single set of elements and relationships.

workspace {

    model {
        user = person "User"
        softwareSystem = softwareSystem "Software System" {
            webapp = container "Web Application" {
                user -> this "Uses"
            }
            container "Database" {
                webapp -> this "Reads from and writes to"
            }
        }
    }

    views {
        systemContext softwareSystem {
            include *
            autolayout lr
        }

        container softwareSystem {
            include *
            autolayout lr
        }

        theme default
    }

}
Multiple diagrams from a single model
Multiple diagrams from a single model

Authoring tools

In Structurizr, a workspace is the wrapper for your software architecture model, views and supplementary documentation. There are a number of tools for creating a workspace; including a text-based DSL and code-based client libraries.

Create content using text

Diagrams as text

The Structurizr DSL (as mentioned on the ThoughtWorks Tech Radar - Techniques - Diagrams as code) allows you to create multiple diagrams from a single DSL source file. The DSL is designed to be used in conjunction with the Structurizr CLI and/or Structurizr Lite. The DSL is the recommended authoring option for most teams.

Demo

Create content using code

Diagrams as code

Java, .NET, TypeScript, PHP, Python, and Go via the JSON web API. This authoring option is recommended for teams who want to use code to help build their software architecture model (e.g. component discovery via static analysis, parsing distributed log files, etc).

Designed for the C4 model

Structurizr is specifically designed to support the C4 model for visualising software architecture, natively supporting diagram navigation and zoom in/out. A diagram key/legend is automatically generated for each diagram too.


System Landscape diagram

System Landscape diagram

System Landscape diagram key

System Context diagram

System Context diagram

System Context diagram key

Container diagram

Container diagram

Container diagram key

Component diagram

Component diagram

Component diagram key

Dynamic diagram

Dynamic diagram

Dynamic diagram key

Deployment diagram

Deployment diagram

Deployment diagram key

Document your cloud architecture

Use themes to help document your cloud architecture; with prebuilt themes for Amazon Web Services, Microsoft Azure, Google Cloud Platform, Oracle Cloud Infrastructure, and Kubernetes.

Visualise

Create software architecture diagrams based upon the C4 model. Diagrams are interactive, animatable, and embeddable.

Visualise

Document

Publish supplementary documentation using Markdown or AsciiDoc, all navigable and full-text searchable.

Document

Record

Publish architecture decision records (ADRs) to capture your significant design decisions, all full-text searchable.

Record

Review your diagrams

Structurizr's diagram review feature is designed to offer a quick and lightweight immutable review process for your diagrams; supporting general, risk-storming, and STRIDE reviews.

A diagram review of a hand-drawn software architecture diagram