generated from just-the-docs/just-the-docs-template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b85b98
commit 09c910a
Showing
17 changed files
with
251 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
layout: default | ||
title: Architecture Decision Records (ADRs) | ||
parent: Structurizr DSL | ||
nav_order: 9 | ||
permalink: /dsl/adrs | ||
--- | ||
|
||
# Architecture decision records (ADRs) | ||
|
||
The `!adrs` keyword can be used to attach Markdown/AsciiDoc ADRs to the parent context (either the workspace, a software system, or a container). | ||
|
||
``` | ||
!adrs <path> [fully qualified class name] | ||
``` | ||
|
||
The path must be a relative path, located within the same directory as the parent file, or a subdirectory of it. For example: | ||
|
||
``` | ||
!adrs subdirectory | ||
``` | ||
|
||
By default, the [com.structurizr.documentation.importer.AdrToolsDecisionImporter](https://github.com/structurizr/documentation/blob/main/src/main/java/com/structurizr/documentation/importer/AdrToolsDecisionImporter.java) class will be used to import ADRs as follows: | ||
|
||
- All Markdown files in this directory will be imported, alphabetically according to the filename. | ||
- The files must have been created by [adr-tools](https://github.com/npryce/adr-tools), or at least follow the same format. | ||
- All images in the given directory (and sub-directories) are also imported into the workspace. | ||
|
||
The above behaviour can be customised by specifying the fully qualified class name of your own implementation of [DocumentationImporter](https://github.com/structurizr/documentation/blob/main/src/main/java/com/structurizr/documentation/importer/DocumentationImporter.java), which needs to be on the DSL classpath or installed as a JAR file in the `plugins` directory next to your DSL file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
layout: default | ||
title: Cookbook | ||
nav_order: 13 | ||
parent: Structurizr DSL | ||
has_children: true | ||
permalink: /dsl/cookbook | ||
--- | ||
|
||
# Structurizr DSL cookbook | ||
|
||
Creating software architecture diagrams from a textual definition ("diagrams as code") is becoming more popular, | ||
but if you have a collection of related diagrams, it's easy to introduce inconsistencies if you don't keep the many | ||
diagram source files in sync. | ||
|
||
This cookbook is a tutorial guide to the Structurizr DSL, an open source tool for creating diagrams as code from | ||
a single consistent model. This cookbook assumes that you're using the diagram renderer provided by the | ||
[Structurizr cloud service](https://structurizr.com/help/cloud-service), | ||
the [Structurizr on-premises installation](https://structurizr.com/help/on-premises), | ||
or [Structurizr Lite](https://structurizr.com/help/lite). | ||
Please note that some features (e.g. perspectives, element style shapes/icons, etc) may not be supported if you're | ||
using one of the PlantUML/Mermaid/D2/DOT/etc export formats provided by the | ||
[Structurizr CLI](https://github.com/structurizr/cli) and the [structurizr-export library](https://github.com/structurizr/export). | ||
|
||
## Table of contents | ||
|
||
- [Workspace](workspace) | ||
- [Workspace extension](workspace-extension) | ||
- [Implied relationships](implied-relationships) | ||
- [System Context view](system-context-view) | ||
- [Container view](container-view) | ||
- [Container view (spanning multiple software systems)](container-view-for-multiple-software-systems) | ||
- [Component view](component-view) | ||
- [Shared components](shared-components) | ||
- [Image view](image-view) | ||
- [Filtered view](filtered-view) | ||
- [Dynamic view](dynamic-view) | ||
- [Dynamic view with parallel sequences](dynamic-view-parallel) | ||
- [Deployment view](deployment-view) | ||
- [Amazon Web Services](amazon-web-services) | ||
- [Deployment groups](deployment-groups) | ||
- [Element styles](element-styles) | ||
- [Relationship styles](relationship-styles) | ||
- [Themes](themes) | ||
- [Groups](groups) | ||
- [Perspectives](perspectives) | ||
- [Scripts](scripts) | ||
- [DSL and code (hybrid usage pattern)](dsl-and-code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
workspace "Name" "Description" { | ||
|
||
model { | ||
} | ||
|
||
views { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
layout: default | ||
title: Workspace | ||
nav_order: 1 | ||
parent: Cookbook | ||
grand_parent: Structurizr DSL | ||
has_children: true | ||
permalink: /dsl/cookbook/workspace | ||
--- | ||
|
||
# Workspace | ||
|
||
In Structurizr terminology, a "workspace" is a wrapper for a software architecture model (elements and relationships) and views. | ||
|
||
``` | ||
workspace "Name" "Description" { | ||
model { | ||
} | ||
views { | ||
} | ||
} | ||
``` | ||
|
||
A workspace can be given a name and description, although these are only used by the [Structurizr cloud service and on-premises installation](https://structurizr.com) - you don't need to specify a name/description if you're exporting views to one of the export formats (PlantUML, Mermaid, etc). | ||
|
||
## Links | ||
|
||
- [DSL language reference - workspace](/dsl/language#workspace) | ||
- [Example](http://structurizr.com/dsl?src=https://docs.structurizr.com/dsl/cookbook/workspace/example-1.dsl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
layout: default | ||
title: Markdown/Asciidoc Documentation | ||
parent: Structurizr DSL | ||
nav_order: 8 | ||
permalink: /dsl/docs | ||
--- | ||
|
||
# Documentation | ||
|
||
The `!docs` keyword can be used to attach Markdown/AsciiDoc documentation to the parent context (either the workspace, a software system, or a container). | ||
|
||
``` | ||
!docs <path> [fully qualified class name] | ||
``` | ||
|
||
The path must be a relative path, located within the same directory as the parent file, or a subdirectory of it. For example: | ||
|
||
``` | ||
!docs subdirectory | ||
``` | ||
|
||
By default, the [com.structurizr.importer.documentation.DefaultDocumentationImporter](https://github.com/structurizr/documentation/blob/main/src/main/java/com/structurizr/importer/documentation/DefaultDocumentationImporter.java) class will be used to import documentation as follows: | ||
|
||
- All Markdown and AsciiDoc files in the given directory will be imported, alphabetically according to the filename. | ||
- All images in the given directory (and sub-directories) are also imported into the workspace. | ||
- See [Structurizr - Documentation - Headings and sections](https://structurizr.com/help/documentation/headings) for details about how section headings and numbering are handled. | ||
|
||
The above behaviour can be customised by specifying the fully qualified class name of your own implementation of [DocumentationImporter](https://github.com/structurizr/documentation/blob/main/src/main/java/com/structurizr/importer/documentation/DocumentationImporter.java), which needs to be on the DSL classpath or installed as a JAR file in the `plugins` directory next to your DSL file. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
layout: default | ||
title: Example | ||
parent: Structurizr DSL | ||
nav_order: 1 | ||
permalink: /dsl/example | ||
--- | ||
|
||
# Structurizr DSL | ||
|
||
The Structurizr DSL provides a way to define a software architecture model | ||
(based upon the [C4 model](https://c4model.com)) using a text-based domain specific language (DSL). | ||
The Structurizr DSL has appeared on the | ||
[ThoughtWorks Tech Radar - Techniques - Diagrams as code](https://www.thoughtworks.com/radar/techniques/diagrams-as-code) | ||
and is text-based wrapper around the [Structurizr for Java library](https://github.com/structurizr/java). | ||
|
||
## Example | ||
|
||
As an example, the following DSL 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 lr | ||
} | ||
} | ||
} | ||
``` | ||
|
||
![Example system context diagram](/assets/images/dsl/example.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.