Skip to content

Add C4 Analyzer #29

@jgquiroga

Description

@jgquiroga

Hello,

I am creating an analyzer for C4 models using "json" files created by structurizr:

https://structurizr.com/

Example:

big-bank-plc

structurizr-SystemLandscape

After I finished all the development and the test units, I think it will be a good thing to have in the main repository.

Steps to generate the diagram

Preconditions

  • Docker installed (docker desktop or rancher desktop)
  • Structurizr cli

Getting the structurizr cli

docker pull structurizr/cli:latest

Executing the structurizr cli in the current folder

docker run -it --rm -v ${PWD}:/usr/local/structurizr structurizr/cli export -workspace workspace.dsl -format json
  • Generate the Settings
DsmSuite.Analyzer.C4.exe AnalyzerSettings.xml
  • Set "workspace.json" as the workspace to analyze
<?xml version="1.0" encoding="utf-8"?>
<AnalyzerSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <LogLevel>Error</LogLevel>
  <Input>
	<Workspace>workspace.json</Workspace>
  </Input>
  <Transformation />
  <Output>
    <Filename>Output.dsi</Filename>
    <Compress>true</Compress>
  </Output>
</AnalyzerSettings>
  • Execute the analyzer:
DsmSuite.Analyzer.C4.exe AnalyzerSettings.xml

Example of Output:

output.dsi
Output.zip

output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions