gitdiagram

Repository to architecture diagram

Every box points at a real file.

A generated diagram is only useful if you can click through it. Each linked path is validated against the actual repository before the diagram renders.

The shortcut

Replace hub with diagram in any GitHub URL to open that repository's diagram.

Illustrative graphShapes and paths are an example
client server page shell app/page.tsx diagram view components/ generate route api/generate/stream artifact store api/diagram-state

What happens before you see it

  1. Paths are checked against the real repository, and invalid output is retried with feedback.
  2. A deterministic compiler turns the validated graph into Mermaid, escaping all text.
  3. The browser sanitizes the source, renders in strict mode, and enforces the link allowlist again.

The graph above is drawn as an example of the output shape, not generated from a repository.
Copy the Mermaid source or export the rendered diagram as PNG. MIT licensed.

Where the work goes

Bounded reading

The tree, the README and selected source excerpts, with oversized inputs rejected before model work begins.

Streamed while planned

The explanation arrives as the graph is being worked out.

Private repositories

A token supplied in the browser, with private artifacts kept in a separate protected namespace.