Structurizr

Structurizr is a web-based publishing platform for software architecture diagrams and documentation; available as a free/paid cloud service and an on-premises installation - see pricing for details.

System Landscape diagram

System Landscape diagrams

System Context diagram

System Context diagrams

Container diagram

Container diagrams

Component diagram

Component diagrams

Dynamic diagram

Dynamic diagrams

Deployment diagram

Deployment diagrams

Software architecture diagrams as code

Unlike traditional modeling tools, Structurizr does not provide a "drag and drop" editor to create diagrams. Instead, you create a software architecture model using code and upload it as a JSON document via the web API.

public static void main(String[] args) throws Exception {
    Workspace workspace = new Workspace("Getting Started", "This is a model of my software system.");
    Model model = workspace.getModel();

    Person user = model.addPerson("User", "A user of my software system.");
    SoftwareSystem softwareSystem = model.addSoftwareSystem("Software System", "My software system.");
    user.uses(softwareSystem, "Uses");

    ViewSet viewSet = workspace.getViews();
    SystemContextView contextView = viewSet.createSystemContextView(softwareSystem, "SystemContext", "An example of a System Context diagram.");
    contextView.addAllSoftwareSystems();
    contextView.addAllPeople();

    Styles styles = viewSet.getConfiguration().getStyles();
    styles.addElementStyle(Tags.SOFTWARE_SYSTEM).background("#1168bd").color("#ffffff");
    styles.addElementStyle(Tags.PERSON).background("#08427b").color("#ffffff").shape(Shape.Person);

    StructurizrClient structurizrClient = new StructurizrClient("key", "secret");
    structurizrClient.putWorkspace(25441, workspace);
}

And here's the resulting diagram when you open it in Structurizr, where the layout of the diagrams can be modified.

A simple diagram
A simple diagram
A diagram key is automatically generated for you, based upon the styles and shapes defined in the model.

The code used to create the software architecture model can be thought of as an executable domain specific language, or an executable architecture description language. This offers a number of opportunities over using a static textual description, such as the ability to use the programming language's reflection and static analysis capabilities to find and extract components from the codebase being documented. There are currently two client libraries; Structurizr for Java and Structurizr for .NET, both of which are open source. The web API is open and documented too, providing you the ability to create your own tooling if desired.

Shareable

Share your software architecture diagrams and documentation via sharing links or role-based access.

Embeddable

Embed your software architecture diagrams in web pages and wikis, including Atlassian Confluence.

Exportable

Export your software architecture diagrams to 300dpi PNG images, for printing or inclusion in slide decks. A single HTML page export is also available for offline use.

Secure

Data is stored encrypted on the cloud, but client-side encryption and the on-premises installation provide extra peace of mind for the security of your data.

Documentation as Markdown or AsciiDoc

Because the code doesn't tell the whole story, Structurizr also provides support for lightweight supplementary technical documentation, based upon a number of popular templates such as arc42. You can also create your own custom template.

The documentation is a collection of Markdown or AsciiDoc documents, one per section, which are rendered in the web browser. This content is uploaded in a workspace along with the software architecture model, which makes it easy to embed diagrams from that workspace.

Structurizr documentation screenshot

Explore your software architecture model

Once you have a model of your software system, extracted from your code using reflection and static analysis techniques, you can additionally visualise the model in a number of different ways. Structurizr provides some explorations to help you explore the elements and their relationships in the model.

Static Structure - Tree

Explore the software systems, containers and components defined in the model.

Static Structure - Size - Circles

View model elements ranked by size.

Dependencies - Components

Explore the afferent, efferent and cyclic dependencies between components.

Dependencies - Components and Code

Explore the dependencies between components and code.

Far too many teams allow their codebases to grow without having an insight into the structure of the code. The result is often the proverbial "big ball of mud"; a codebase that is tangled, hard to understand, hard to work with and hard to change. Visualising the structure of your code is the first step towards improving it.

Software architecture diagrams as text

Structurizr also provides an "Express" feature that allows you to create a single diagram without creating and uploading a workspace via the API. This is useful if you need to quickly create a simple software architecture diagram.

To use this feature, simply head to Structurizr Express where you'll find a regular diagram editing page along with some controls on the left to define the diagram.

Structurizr Express

About Structurizr

It's been said that "software is eating the world", yet software development teams waste time and money because they struggle to communicate software architecture. Existing CASE/modelling tools are complex and have become unfashionable after the "agile" movement started in 2001. Teams now tend to favour whiteboards and general purpose tooling instead. The resulting diagrams, however, are typically ad hoc and confusing, which slows communication and learning. The diagrams are also disconnected from the code, which limits their usefulness for architectural improvement.

Software architecture diagrams are a great way to explain and document how a software system works. Static diagrams, whether drawn on a whiteboard or with a general purpose diagramming tool such as Microsoft Visio, tend to get out of date quickly and often don't reflect the real structure of the code. On the other hand, automatically generated diagrams, such as UML class diagrams created by reverse-engineering the code, typically show far too much detail, limiting their usefulness.


This is a recording of the "Visualise, document and explore your software architecture" presentation from the OpenSlava conference in Bratislava, Slovakia during October 2017 (35 minutes). In this talk, Simon Brown (Structurizr's founder) discusses the problems with typical software architecture diagrams, and introduces the C4 model.

The goal of Structurizr is to allow software developers to easily create software architecture diagrams that reflect the code. Structurizr combines the power and richness of a model, with the ease of use we get from text-based tools such as PlantUML and WebSequenceDiagrams. Our team-based pricing ensures that everybody on your team has access to diagrams, documentation and explorations when they need it. Read more...

Simple

No more endless hours spent messing with drawing tools, manually drawing boxes and lines. You create a software architecture model using code, Structurizr visualises it for you.

Versionable

The software architecture model is created using code, so it can be easily versioned alongside your production code.

Consistent

Diagrams created from a single model are consistent, in terms of content and notation.

Up-to-date

Integration with your build process means your software architecture model can be continuously kept up-to-date.