# An architecture diagram generated from your code

https://gitmir.com/architecture-diagram-from-code · updated 2026-10-07

Not boxes someone drew once, and not a graph of every import: the areas of the product, what each one does, the customer paths through them and the rules between them — read from the repository and redrawn after every push.

## In short

To generate an architecture diagram from code, a tool has to read what the code does, not only what it imports. GitMir reads a repository into a model of its areas, screens, API routes, records, customer paths, status flows and rules, and draws it as a product map you can open down to a single rule. Because the model is updated on every push, the diagram stays current — and the same model answers questions, shows what a change reaches and gives coding agents their context.

## What each kind shows, and how long it stays true

| Kind | What it shows | How it stays current |
| --- | --- | --- |
| Drawn by hand | Boxes and arrows as somebody understood the system | It does not — every change after the drawing makes it a little less true |
| Dependency graph | Imports and calls between files and modules | Regenerated from code, but it shows how the code is wired, not what the product does |
| Product map from GitMir | Areas, screens, API routes, records, customer paths, status flows, rules and how they connect | Rebuilt from the repository on every push |

## Open-source products, read in full

Each row is a published GitMir model. Open the architecture page to see the areas, paths and rules behind the numbers.

| Product | Areas | Screens | API routes | Customer paths | Rules | Lines read |
| --- | --- | --- | --- | --- | --- | --- |
| Supabase Studio | 34 | 581 | 409 | 17 | 16 | 459,339 |
| OpenAI Codex | 30 | 420 | 237 | 30 | 12 | 603,461 |
| cal.com | 10 | 1,306 | 467 | 18 | 9 | 365,422 |
| Atlas | 4 | 917 | 1,129 | 28 | 16 | 173,995 |

- [Supabase Studio architecture](https://gitmir.com/models/supabase/architecture)
- [Codex architecture](https://gitmir.com/models/codex/architecture)
- [cal.com architecture](https://gitmir.com/models/cal-com/architecture)
- [All public models](https://gitmir.com/models)

## The same drawing answers four jobs

- **Onboarding** — Find where a feature lives and what it touches without a tour from whoever is free. On the projects GitMir has run, the time to a first accepted change went from 21 days to 4 days.
- **Planning a change** — Open the area, follow its connections and see what a change reaches before anyone estimates it.
- **Migration** — Know what depends on what before you move it — including the connections no import shows.
- **Review** — Changes shows the drawing at any commit: what appeared, what was removed and what changed.

## The diagram is one view of the model

- **GitMir Intelligence** — Connect a repository and get the product map, answers about it and change impact — current with every push. https://gitmir.com/products/intelligence
- **Public models** — Eight open-source products drawn from their code, open to anyone with no account. https://gitmir.com/models
- **GitMir Business Review** — What each push changed in the product, computed from two versions of the same model. https://gitmir.com/products/review

## Questions

### How do I generate an architecture diagram from code?

Connect the repository to GitMir. It reads the code into a model of the product and draws the areas, screens, API routes, records, customer paths, status flows and rules, with the connections between them, as a map you can open down to one rule.

### Which languages does GitMir read?

TypeScript, JavaScript, Python, Ruby, Go, Java, Kotlin, C#, Swift, PHP, Rust and Dart, plus Vue, Svelte and Astro files. It reads repositories from GitHub, GitLab and Bitbucket.

### How is this different from a dependency graph?

A dependency graph connects files and symbols and answers where something is used. A product map connects rules, customer paths, status flows and features and answers what the product does and what a change reaches.

### Does the diagram stay up to date?

Yes. Every push to the connected branch is read, and only what the push touched is read again; the drawing and every answer name the commit they are current to.

### Can I see an example without connecting my code?

Yes. Eight open-source products, Supabase Studio among them, are modelled in public at gitmir.com/models, each with an architecture page.

## Read next

- [Supabase Studio architecture](https://gitmir.com/models/supabase/architecture)
- [Change impact analysis](https://gitmir.com/change-impact-analysis)
- [Business rules extraction from code](https://gitmir.com/business-rules-extraction)
- [Document software architecture automatically](https://gitmir.com/blog/document-software-architecture-automatically)
- [Onboard engineers faster](https://gitmir.com/blog/onboard-engineers-faster)
