Structurizr for Java
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Added a release date. Jan 3, 2019
gradle Upgraded httpclient to 5.0-beta2 to support Java 11. Fixes #111. Nov 19, 2018
structurizr-adr-tools Removed \r character from ADR content. Aug 14, 2018
structurizr-analysis Suppress some warnings when a component references types without cano… Jan 31, 2019
structurizr-annotations/src/com/structurizr/annotation Some tweaks to the annotations, plus an example. Jul 13, 2017
structurizr-client Copy last modified user and agent information when creating an encryp… Jan 31, 2019
structurizr-core Added some additional "last modified" details. Jan 31, 2019
structurizr-dot Tweaked some javadoc. Mar 28, 2018
structurizr-examples Updated the example to reflect the new workspace editor support for d… Dec 7, 2018
structurizr-javaee Tidy up, including exceptions and javadoc. Oct 11, 2017
structurizr-plantuml Fixes issue #113. Dec 7, 2018
structurizr-spring Addresses issue #110. Nov 12, 2018
structurizr-websequencediagrams Fixed compilation error (forgot to include this in previous commit). Apr 19, 2018
.gitignore Added a simple Java EE component finder, which can find Stateless ses… Jul 2, 2016
.travis.yml Enable more logging on Travis builds. Aug 11, 2018
LICENSE Initial commit Jun 9, 2014
README.md Fixed some links. Aug 14, 2018
build.gradle Provided a way to customize the sort order when displaying the list o… Dec 18, 2018
gradle.properties Added a dummy gradle.properties file to prevent builds from failing. Sep 12, 2017
gradlew Trimmed down the Gradle config and stopped tracking the IDEA project … Feb 7, 2015
gradlew.bat Gradle support Feb 6, 2015
settings.gradle Added support for ADRs, plus some changes to make documentation more … Aug 11, 2018

README.md

Structurizr

Structurizr for Java

This GitHub repository is primarily a client library for Structurizr, a web-based publishing platform for software architecture models based upon the C4 model. It can also be used to create software architecture diagrams that can be rendered with tools such as PlantUML, Graphviz and WebSequenceDiagrams.

In essence, Structurizr for Java is an implementation of an executable architecture description language; a domain-specific language to describe software architecture, using code. The key benefit of using code to create a software architecture model is that you can use the static analysis and reflection features of Java to help you extract components from the codebase you are modelling. Integration of this tooling with your continuous integration/build process helps your software architecture diagrams stay up to date.

A quick example

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

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 views = workspace.getViews();
    SystemContextView contextView = views.createSystemContextView(softwareSystem, "SystemContext", "An example of a System Context diagram.");
    contextView.addAllSoftwareSystems();
    contextView.addAllPeople();
}

The view can then be exported to be visualised in a number of different ways; e.g. PlantUML, Structurizr and Graphviz:

Views can be exported and visualised in many ways; e.g. PlantUML, Structurizr and Graphviz

Table of contents

Build Status