bausteinsicht --version
Getting Started
About 20 minutes. You will create a sample architecture, look at it in draw.io, change it from the text side and from the draw.io side, and see how sync keeps the two together. Every command and every output shown here is run by a test against the current build; the screenshots are real draw.io exports.
Words you do not know are in the glossary. If something does not work, see Troubleshooting.
Install
You need the bausteinsicht program and, to look at the diagrams, the free draw.io desktop app. The installation page describes both for Linux, macOS and Windows. Afterwards this must work:
Create your first project
Make an empty directory and let Bausteinsicht fill it:
bausteinsicht init
Initialized Bausteinsicht project: - architecture.jsonc - template.drawio - architecture.drawio - .bausteinsicht-sync Next steps: 1. Edit architecture.jsonc to define your architecture 2. Run 'bausteinsicht sync' to update the draw.io diagram 3. Open architecture.drawio in draw.io to arrange elements
Four files appear, each with a clear job:
| File | Purpose |
|---|---|
|
Your model. JSON with comments — the single source of truth. This is the file you edit, review, and commit. |
|
The generated diagrams. One draw.io page per view. You arrange and fine-tune here; structural truth stays in the model. |
|
The visual style library. One styled shape per element kind. Copy it, restyle it, pass it with |
|
Sync memory. A checksummed snapshot of the last synced state, so the next sync knows what changed on which side. Commit it together with the other files. |
The scaffolded model is not empty — it ships a complete example: an online shop with a customer, a back-office user, web and mobile frontends, an API with components, database, cache, message queue, and two external systems (payment provider, e-mail service). That gives you something real to explore before you replace it with your own architecture.
Generate the diagram
init has already drawn the diagram once, so architecture.drawio exists. The command that keeps model and diagram together is sync; run it now:
bausteinsicht sync
Already in sync. No changes.
Nothing to do, because nothing changed since init. sync compares the model and the diagram with what the last sync saw and carries over only what is different; running it twice in a row does no harm. You will run it after every change, on either side.
Open the diagram in draw.io
Open architecture.drawio in draw.io. You find three pages (tabs at the bottom): System Context, Container View and API Components, each generated from a view of the model. This is the System Context page, as bausteinsicht export renders it:
Elements link to each other across pages: click a system in the context view to drill down into its container view; a generated back-navigation button takes you up again.
Change a title in the model
Now change the architecture from the text side. Rename the customer, add a new person, and put the person on the context page. The commands edit architecture.jsonc; you can also open that file and type, it is plain text with comments.
bausteinsicht update element --id customer --title "Client"
1 change(s) saved model.customer.title: Customer -> Client
bausteinsicht add element --id support --kind actor --title "Support Agent" --description "Answers customer questions"
Added element 'support' (kind: actor) to model.
bausteinsicht add view context --include support
View 'context' updated (include: +support) Includes: [customer backoffice-user onlineshop payment-provider email-service support]
The diagram does not know yet. Sync it:
bausteinsicht sync
Forward (model → draw.io): 1 added, 2 updated, 0 deleted
One shape added, two updated (the new title of the customer appears on two pages). Reload the file in draw.io:
The customer is called Client, and the new Support Agent has a red dashed border: that marks a shape that is new since the last sync. The shape is placed at the edge of the page; drag it to where you want it (in the picture it was moved to the empty space at the top right). Moving a shape changes nothing in the model, because layout belongs to the diagram. Remove the red border by editing the shape’s style once you have arranged the shape.
Change a title in draw.io
Now the other direction. In draw.io, double-click the title Client and type Buyer, then save the file (Ctrl+S). Then:
bausteinsicht sync
Reverse (draw.io → model): 0 added, 1 updated, 0 deleted
Reverse (draw.io → model): sync found the changed title in the diagram and wrote it into the model. Check that the model is still valid:
bausteinsicht validate
Model is valid.
If you change the same title on both sides before a sync, the model wins and sync warns; How sync works in 5 minutes says what happens to every kind of change.
Look around
The model is text, so the command line can answer questions about it. Show a single element with everything the model knows about it:
bausteinsicht show support
Element: support ================ Kind: actor Title: Support Agent Description: Answers customer questions Views: context
Search across the whole model (the output is shortened here):
bausteinsicht find shop
Search results for "shop" (27 matches) ====================================== Elements (11): onlineshop [system ] "Online Shop" score: 6 onlineshop.api [container ] "REST API" technology: Go score: 3 ...
Where you are now
You have a model and its diagram, and you have changed both from either side. Continue with 2. Modeling Your Architecture to build a model of your own.
Why it works this way
Architecture documentation rots. The diagram in the wiki drifts from the system, and nobody trusts it after a few months. Bausteinsicht attacks that from a specific angle: it splits what the architecture is from how it looks.
Humans and LLMs want different things from architecture. You want a picture — boxes and lines you can take in at a glance and point at in a review. An LLM wants structured text — something it can read precisely, reason about, and edit without misunderstanding a diagram’s pixels. Bausteinsicht gives each side what it’s good with and keeps them in lockstep:
-
The source of truth is a JSONC model — a structured text file that lives in git, diffs cleanly, validates against a schema, and is trivially readable and writable by an LLM.
-
From that one model, Bausteinsicht generates draw.io diagrams — the visual, human-facing view, in a tool you already know.
-
Synchronization runs both ways: change the model and the diagrams follow; rename or redraw in draw.io and the model follows.
That bridge is the point. An LLM can confidently restructure the model — add a service, rewire a dependency, validate the result — because it works in text, not pixels. You review and arrange the diagram, where humans are fast. Neither side has to work in the other’s awkward medium, and because the model is the single source of truth, the picture can’t quietly drift from reality. The model stays LLM-readable; the diagrams stay human-readable; the two never disagree.
The rest of this tutorial walks that loop end to end — model it, see it in draw.io, arrange it once, then let model and diagram evolve together.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.