Need help with dsl?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

structurizr
375 Stars 81 Forks Apache License 2.0 281 Commits 4 Opened issues

Description

Structurizr DSL

Services available

!
?

Need anything else?

Contributors list

Structurizr

Structurizr DSL

This GitHub repository contains an implementation of the Structurizr DSL - a way to create Structurizr software architecture models based upon the C4 model using a textual domain specific language (DSL). The Structurizr DSL has appeared on the ThoughtWorks Tech Radar - Techniques - Diagrams as code.

Getting started

Reference

A quick example

As an example, the following text can be used to create a software architecture model and an associated view that describes a user using a software system.

workspace {

model {
    user = person "User"
    softwareSystem = softwareSystem "Software System"

    user -> softwareSystem "Uses"
}

views {
    systemContext softwareSystem {
        include *
        autolayout
    }

    theme default
}

}

(view this example)

Multiple output formats

The DSL can be rendered using a number of tools:

Convention over configuration, useful defaults

The DSL is designed to be as compact as possible. In conjunction with the Structurizr CLI, the following DSL fragment will automatically create the implied relationship between the

user
and
softwareSystem
elements, create three views with auto-layout enabled (1 x System Landscape, 1 x System Context, 1 x Container), and add some default element styles.
workspace {

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

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

views {
    theme default
}

}

Tooling support

Here are some tools designed to support the Structurizr DSL.

Examples

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.