← c4studio
· This site was generated by
c4 publish
from
the model of c4studio itself
.
c4studio
c4studio described in its own DSL, rendered by itself.
Start
Overview
Views
c4studio – System Landscape
systemLandscape
c4studio – System Context
systemContext
c4studio – Containers
container
Core Library – Components
component
Web Backend – Components
component
Studio SPA – Components
component
Diagram Core – Components
component
VS Code Extension – Components
component
Dynamic – typing a change and seeing it
dynamic
Dynamic – the same diagram, with no browser
dynamic
Developer machine – one process, one browser
deployment
CI – the same code, headless
deployment
c4studio – What works offline
filtered
Documentation
c4studio, described in its own DSL
Why Node appears exactly once
Decisions
Record architecture decisions
Accepted
The editor edits text, never the model
Accepted
Every renderer consumes one view graph
Accepted
Dynamic – typing a change and seeing it
Dynamic – typing a change and seeing it
Developer
[Person]
Keeps the model honest alongside
the code, usually in the same pull
request.
DSL Editor
[Component: CodeMirror 6]
CodeMirror 6 surface: highlighting,
completion and lint marks over the
buffer.
API Client
[Component: TypeScript]
One typed fetch wrapper per
endpoint, so error handling and the
URL scheme live in one place.
API Routes
[Component: FastAPI]
The HTTP surface: sources, views,
graphs, layout, check, save, files,
templates, capabilities.
Workspace Loader
[Component: Python]
Loads a workspace and watches its
!include fragments by mtime. A
failed reload keeps serving the last
good one.
Source Writer
[Component: Python]
Atomic writes with content-hash
fingerprints, so an edit made
elsewhere is a conflict rather than a
silent overwrite. Invalid DSL still…
Workspace Sources
[Container: Files on disk]
The user's .dsl and .json files,
including !include fragments. The
source of truth; c4studio never
generates them from the model.
App Shell
[Component: React]
Owns the loaded workspace, the
selected view, capabilities and the
live-reload poll.
React Flow Reshape
[Component: Python]
Turns the view graph into the
node/edge payload the SPA draws,
and attaches saved waypoints,
labels and chrome.
View Graph
[Component: Python]
Workspace + view -> nodes and
edges, with C4 visibility, boundary
nesting and endpoint lifting applied.
The one contract every renderer…
Graph Pane
[Component: React, React Flow]
The interactive diagram: drag,
zoom, drill in, align, export. Prop-
injected for its backend, which is
what lets it be embedded…
1. Types in the editor
2. Debounced check of the
unsaved buffer
3. POST /api/check
4. Parses the buffer in its
root's context
5. Presses Cmd+S
6. PUT /api/source
7. Writes atomically,
fingerprint checked
8. Replaces the file
9. Reloads synchronously and
returns the generation
10. Refetches the view
11. GET /api/views/{key}/graph
12. Rebuilds the payload
13. From the reparsed
workspace
14. Redraws
Person
Component
File Store
Relationship