Skip to content

Generate a software architecture diagram from a codebase

Usually a developer or an architect, for one repository first

Point the code plugin at a repository and read its architecture as a layered board: the parts, what they depend on, and the contracts between them.

Fig. 01Generate a software architecture diagram from a codebase

The problem

The architecture is in the code, and you cannot see it there. The services, layers and dependencies are written down in folders, project files and imports: thousands of lines and no shape.

So the diagram a team works from is one somebody drew from memory, and a newcomer learns the system by reading code for weeks. A coding agent is a newcomer in every session: it starts from the prompt and the files it opens, and finds the shape by exploring, or guesses it. Drawing the diagram by hand takes days, and a flat diagram cannot show what is inside a box.

How it goes

The same steps the product’s playbook walks. Each one shows the screen at that moment and opens the video there.

  1. Analyse the repository

    Make the system an app and connect the code plugin from the repository, in Claude Code, Codex or Cursor. It reads the code on your machine, plans a board for each part worth opening, and pushes only derived metadata.

  2. Read it from the top

    The top level shows the parts of the system and the dependencies between them. Open a box and it has a board of its own, with its own parts. The board map shows the whole tree.

  3. Find the contracts

    Extract what the code answers and calls: its endpoints by method and path, the events it publishes and listens for, the tables it stores, and the services it calls. The app hub draws them as its contract surface.

  4. Keep it current

    Run the analysis on a schedule and it refreshes only the boards whose files changed, so this diagram does not become the next stale one.

  5. Done

    End proofDone when the repository is a layered board you can open box by box, with its contracts beside it.

    Run this playbook

    Free account. Opens in ProvenMap as Setup guide, with the steps beside you.

Works with

Repositories
One per app; JavaScript and TypeScript, Python, Java, Go, C#, Ruby, Rust, PHP, Kotlin, Swift and Scala, with monorepos split into apps.
Hosts
Claude Code, Codex and Cursor on your machine. The analysis runs locally and pushes only derived metadata.
Boards
A landscape of the systems you run, with one app board per bound repository and a layer for each part worth opening.
Plans
Mapping and syncing a repository runs on the Free plan.

Where it stops

  • The board shows what the analysis can read: the languages and file types the plugin supports, within the files the repository holds.
  • A diagram drawn from code shows structure, not intent. Why it is shaped this way is a decision a person records.
  • The board is as current as the last analysis; keeping it current on a schedule is its own job.

Walk through it

  • Getting Started: Plugin or Chat

    Every command and decision in order, in the docs.

  • In the product this job runs as the playbook Setup guide. The board ticks each step when what it asked for exists, and the guide links back to this page.

Start with one system

Map a real system and see the architecture around it.

Open one repository and run the code plugin. No migration, no rollout, no diagramming.

No credit card · Analysis runs locally in your own session · Self-hosted available

See the four commands to your first board →

Or for writing on architecture that stays connected across systems.