76a730cba2
Because: * A devcontainer makes it easier to get a running environmentm. * We want to keep our diagrams up to date. This commit: * Adds a devcontainer file. * Updates the architecture diagram README. * Updates the architecture diagrams for SubPlat 3.0. |
||
---|---|---|
.. | ||
README.md | ||
fxa-subplat.dsl | ||
structurizr-1-workspace.json |
README.md
Mozilla accounts & Subscription Platform C4 Model
The software architecture diagrams in FxA and SubPlat use the c4 model to separate layers and structurizr to render them.
Editing / Creating C4 Model Diagrams Overview
For consistency in the exported workspace and diagram naming, ensure that the FxA/SubPlat workspace is the first one in structurizr (default if its the only/first workspace created).
- Run the structurizr docker container
- Import the
structurizr-workspace.json
file (restores DSL and manual adjustments) - Edit the
.dsl
file in this directory as needed - Copy the updated DSL content into the DSL editor in structurizr
- Make any manual layout changes needed in the UI
- Export the workspace JSON to save updates to this directory
- Create a PR with the new diagrams, workspace JSON, and DSL file
Running the Structurizr Container
The port used by default for structurizr overlaps with ports needed by the FxA stack. The FxA stack should be not running before starting structurizr.
- Create a local structurizr directory in your home directory:
$ mkdir -p ~/structurizr
- Configure structurizr to enable the DSL Editor:
$ echo 'structurizr.feature.ui.dslEditor=true' > ~/structurizr/structurizr.properties
- Run the docker container:
$ docker-compose up
- Create a new workspace if none exist
- Import the workspace file as noted above
Visiting http://localhost:8080/
will present the structurizr interface, the default credentials are:
username: structurizr
password: password
Exporting Diagrams
- In structurizr, click on
Diagrams
on the right side - In the top menu, click the
PNG
icon to export - Select the following options and click
Export all diagrams
with:- Include diagram title, description, and metadata
- Automatically download
- Copy images into
static/diagrams
directory