This GitHub repository is a collection of tooling to help you visualise, document and explore the software architecture of a software system. In summary, it allows you to create a software architecture model based upon Simon Brown's C4 model using C# code, and then export that model to be visualised using tools such as:
- Structurizr: a web-based software as a service and on-premises product to render software architecture diagrams and supplementary Markdown/AsciiDoc documentation.
- PlantUML: a tool to create UML diagrams using a simple textual domain specific language.
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 });
If using Structurizr, the end-result, after adding some styling and positioning the diagram elements, is a system context diagram like this:
You can see the live workspace at https://structurizr.com/share/25441.
- Introduction
- Getting started
- About Structurizr and how it compares to other tooling
- Basic concepts (workspaces, models, views and documentation)
- C4 model
- Binaries
- API Client
- Usage patterns
- Diagrams
- Documentation
- Extracting software architecture information from code
- Exporting and visualising with other tools
- Other
- Related projects
- dotnet-core-quickstart: A quickstart for .NET Core
- dotnet-framework-quickstart: A quickstart for .NET Framework
- structurizr-java: Structurizr for Java
- changelog