← c4studio · This site was generated by c4 publish from the model of c4studio itself.

Core Library – Components

Core Library – ComponentsCore Library [Container: Python 3.13]DSL Parser[Component: Python, recursivedescent]Tokenises and parses StructurizrDSL. Rewrites the source beforetokenising — !include flattened,!script stripped, constants…JSON Parser[Component: Python]Reads Structurizr workspace JSONinto the same model the DSL parserbuilds.Source Map[Component: Python]Maps positions in the flattenedsource back to the file and line theycame from, so a diagnostic namesthe fragment rather than the root.Expression Engine[Component: Python]Resolves include/excludeexpressions — tags, types, parents,relationship forms — with deferredresolution so forward references…Implied Relationships[Component: Python]Derives the relationships upstreamwould imply, deduplicated andlinked back to what implied them.Docs & ADR Reader[Component: Python]Loads the markdown behind !docsand !adrs.Domain Model[Component: Python dataclasses]Typed dataclasses for the wholeStructurizr metamodel: elements,views, deployment, documentation.View Graph[Component: Python]Workspace + view -> nodes andedges, with C4 visibility, boundarynesting and endpoint lifting applied.The one contract every renderer…Diagnostics Bridge[Component: TypeScript]Runs `c4 check --json` on saveand publishes the results into theProblems panel.Mermaid Generator[Component: Python]C4Context/C4Container/C4Comp…syntax, rendered from the viewgraph.…Flowchart Generator[Component: Python]Mermaid flowchart + subgraph,covering every view type includingdynamic and deployment.JSON Exporter[Component: Python]Writes Structurizr workspace JSONback out, round-tripping what wasread.Theme Loader[Component: Python]Fetches theme JSON and embedsservice icons as data URIs, so anexported file renders offline.Starter Templates[Component: Python]Four workspaces shipped aspackage data — valid DSL exactlyas they sit on disk, so the suite canparse each one directly.Web Backend[Container: Python, FastAPI]Serves the JSON API and the builtSPA. Holds all mutable state on oneinjected AppState rather than inmodule globals.VS Code Extension[Container: TypeScript, esbuild,.vsix]DSL highlighting, inline diagnostics,and a preview that draws one viewas an SVG beside the editor. Runswhatever c4studio is on the…Structurizr Theme CDN[Software System]Serves theme JSON and the serviceicons a themed diagram embeds.Records flattened positions inBuildsReports skipped constructs toLoads !docs and !adrs viaBuildsReadsResolves includes andexcludes withResolves element andrelationship styles withAdds derived relationships toRenders fromRenders fromSerialisesAre parse-tested byParses withReshapes the output ofWalksStarts on request, for Open inStudioFinds the same backendthroughFetches theme JSON andicons fromComponentContainerNetworkBoundaryRelationship