Home/Features/Architecture diagrams generated from your codebase

generate architecture diagram from code

Architecture diagrams generated from your codebase

Most architecture diagrams are assertions. Yantra Studio imports the Archify JSON model of a repository, so every box on the canvas can point at the code that proves it exists — and re-importing after a release updates the diagram instead of replacing it.

Import the model, review it before it lands

Archify reads a repository and emits an open JSON intermediate representation: components, connections, boundaries, and the source references behind each one. Yantra Studio imports that file through a review screen rather than dropping shapes straight onto the page.

The review screen counts what arrived — components, connections, boundaries, evidence records, guided views — and tells you how many component roles it was unsure about, instead of guessing quietly. You can override any role from your own catalogue before the import commits, and the choice is recorded as yours.

  • Repository URL and the exact revision the model was built from
  • Component, connection, boundary, evidence and view counts
  • An explicit “unsure roles” count you can correct in place
  • Sequence-diagram documents import the same way

Every component carries its evidence

Select any imported shape and the Trace tab shows the evidence behind it: the file and line range, the source type, the commit SHA, a verification status and a confidence figure. Where the repository is on GitHub or GitLab, an “Open at this commit” link takes you to those exact lines at the revision the claim was captured from.

Links are only offered when the evidence carries a commit. A link to a branch tip would show code that has moved on since the claim was made, which is the failure that pinning to a SHA exists to prevent — so a claim without a commit says so rather than linking somewhere plausible.

Re-import without losing your layout

The second import of a document is the one that matters. Yantra Studio recognises that the document is already on the page and merges it: existing shapes are updated in place, new components are added and parented into the right boundary, and nothing is duplicated.

You choose whether to keep the layout you arranged or take the document’s. Components the codebase no longer has are counted and reported — never deleted. Removing something from your architecture is a decision for an architect, not for an importer.

What this covers in the product

Every capability below is part of this area of Yantra Studio.

  • Import Archify (.json)
  • Export ▸ Archify (.json)
  • Architecture model…
  • Trace ▸ Evidence

Questions

Does re-importing overwrite the layout I arranged?

No, unless you choose to. The merge screen offers keep-the-canvas-layout or take-the-document’s, and keep is the default.

What happens to shapes I drew by hand?

They are left alone. Merging only applies to shapes an Archify import created, matched by their external id, so hand-drawn annotations and notes are never touched.

Can I export back to Archify?

Yes. File ▸ Export ▸ Archify (.json) writes the page back out in the same format, so the model is not trapped in the tool.

Put your architecture under version control

Model it, govern it, and keep it true to the system it describes.