This GitHub repository is an official client library for the Structurizr cloud service and on-premises installation, both of which are web-based publishing platforms for software architecture models based upon the C4 model. The component finder, adr-tools importer, and alternative diagram export formats (e.g. PlantUML) can be found at Structurizr for .NET extensions.
As an example, the following C# code can be used to create a software architecture model that describes a user using a software system.
Workspace workspace = new Workspace("Getting Started", "This is a model of my software system.");
Model model = workspace.Model;
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.Views;
SystemContextView contextView = viewSet.CreateSystemContextView(softwareSystem, "SystemContext", "An example of a System Context diagram.");
contextView.AddAllSoftwareSystems();
contextView.AddAllPeople();
Styles styles = viewSet.Configuration.Styles;
styles.Add(new ElementStyle(Tags.SoftwareSystem) { Background = "#1168bd", Color = "#ffffff" });
styles.Add(new ElementStyle(Tags.Person) { Background = "#08427b", Color = "#ffffff", Shape = Shape.Person });
The view can then be exported to be visualised using the Structurizr service, or other formats including PlantUML, WebSequenceDiagrams and Graphviz via the Structurizr for .NET extensions.
- Introduction
- Getting started
- About Structurizr and how it compares to other tooling
- Why use code?
- Basic concepts (workspaces, models, views and documentation)
- C4 model
- Binaries
- API Client
- Usage patterns
- FAQ
- Model
- Views
- Documentation
- Other
- Related projects
- dotnet-extensions: A collection of Structurizr for .NET extensions; including the ability to extract software architecture information from code, export views to PlantUML, etc.
- dotnet-core-quickstart: A quickstart for .NET Core
- dotnet-framework-quickstart: A quickstart for .NET Framework
- structurizr-java: Structurizr for Java
- changelog