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

Web Backend – Components

Web Backend – ComponentsWeb Backend [Container: Python, FastAPI]Core Library[Container: Python 3.13]Parsing, the domain model, theview graph and the generators.Pure Python, no I/O beyond readingsource files.API Routes[Component: FastAPI]The HTTP surface: sources, views,graphs, layout, check, save, files,templates, capabilities.Capability Guards[Component: FastAPIdependencies]FastAPI dependencies that makeStudio/Viewer and the assistantenforceable — a route cannotforget them, so the guarantee hol…Workspace Loader[Component: Python]Loads a workspace and watches its!include fragments by mtime. Afailed reload keeps serving the lastgood one.Source Discovery[Component: Python]Walks the tree for loadablesources, revalidated by stat ratherthan re-read — the 8 KB probe percandidate was 79% of the…React Flow Reshape[Component: Python]Turns the view graph into thenode/edge payload the SPA draws,and attaches saved waypoints,labels and chrome.Model Graph[Component: Python]The whole static model as onegraph at a chosen abstraction level,for the Explorer.Layout Sidecar I/O[Component: Python]Reads and writes per-user UI state:positions, sizes, waypoints, labels,expansion, chrome. Additivesections, so an older sidecar still…Source Writer[Component: Python]Atomic writes with content-hashfingerprints, so an edit madeelsewhere is a conflict rather than asilent overwrite. Invalid DSL still…Assistant[Component: Python, anthropicSDK]The only component that opens anetwork connection at run time. Offunless asked for; reads its key fromthe environment at the moment of…Studio (SPA)[Container: TypeScript, React, Vite]The browser app: browse, read,edit, and watch the diagram followthe text.Workspace Sources[Container: Files on disk]The user's .dsl and .json files,including !include fragments. Thesource of truth; c4studio nevergenerates them from the model.Layout Sidecars[Container: JSON files]<source>.layout.json — per-user UIstate, gitignored, written next tothe source.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…Anthropic API[Software System]Answers the assistant's requestsfor a rewritten DSL file.Reports skipped constructs toIs guarded byLoads and reloadsworkspaces throughLists sources throughBuilds view payloads withBuilds the explorer graph withReads and writes UI statethroughSaves DSL throughForwards assistant requeststoParses withReshapes the output ofWalksWrites atomically toReads and watchesReads and writesCallsStarts on request, for Open inStudioOpens in a browser onrequestHighlightsAsks for a rewritten fileContainerComponentFile StoreNetworkBoundaryRelationship