
gitdiagram
Turn any GitHub repo into an interactive architecture diagram
Replaces Codedashboard, Eraser Io

Who it's for
GitDiagram produces an architecture overview of a repository in one browser visit, no local checkout needed. Engineers starting a new job or picking up an inherited project can see how the major components connect before writing a single line of code.
Skip if the codebase is private and your organization restricts sharing tokens with external services. Also skip if the repository is very small (under 20 files); a directory listing is faster.
Before a planning session or architecture review, paste the repository URL and get a component diagram without pulling up the code. The diagram exports as PNG for use in slides or design documents.
Skip if you need an editable, collaborative architecture diagram with custom shapes and annotation layers. Eraser.io or Miro are better fits for that workflow.
Click any node in the generated diagram to jump directly to the relevant file on GitHub. When evaluating a project to contribute to, this provides faster orientation than navigating the repository tree manually.
Skip if the project already includes a well-maintained architecture diagram in its documentation; reading the existing diagram will be faster.
Diagram any public GitHub repository to quickly assess what a dependency or third-party library actually contains. The architecture view shows how a library is internally structured before committing to using it.
Skip if your security or compliance workflow requires air-gapped tools. GitDiagram sends repository content to an external AI API.
The problem
Understanding an unfamiliar codebase takes hours. A large repository may span hundreds of files across nested directories, and the README typically describes the project's purpose rather than mapping how its components interact. Engineers onboarding to a new team, reviewing a pull request touching many files, or contributing to an open source project for the first time often spend their first hours reading directory trees and tracing imports. Architecture diagrams, when they exist at all, go stale quickly. Teams document how a system works at launch, then stop updating as features are added. By the time a new contributor arrives, the diagram shows an older version of the system and the code tells a different story. There is no lightweight path to an accurate, current picture of how a repository is structured without actually reading through it.
How it works
Feeds the repository tree, README, and bounded source excerpts to a language model that returns a system-level graph with groups, nodes, edges, and shapes. Generates a structural overview rather than a folder tree, so the diagram shows how components relate rather than where files live.
Every node in the generated diagram links to the real file or directory on GitHub. Click a component to open its source in a new tab. Links are validated against the actual repository before the diagram renders, so every link points to something that exists.
The diagram generates progressively rather than waiting for the full result. A short architecture overview streams first, followed by the graph nodes and edges as they are produced. Successful diagrams are cached by repository, so repeat visits load the saved artifact without triggering another model call.
Provide a fine-grained GitHub personal access token in the browser header. The token is sent only with the relevant same-origin API request and is never embedded in public diagram links. Private diagrams are stored in a separate R2 namespace derived with a server-side secret.
Copy the raw Mermaid source to paste into any editor that supports Mermaid diagrams, or download the rendered diagram as a PNG image. Exporting the Mermaid source lets you version-control the diagram or edit individual nodes and edges manually.
The default managed cloud version uses OpenAI for generation. Self-hosted deployments can configure OpenRouter as the AI provider instead, which opens access to a wider range of models without requiring a direct OpenAI account. User-supplied API keys retain standard service tier.
Features
- Architecture-first diagram generation
- Clickable source links
- Streaming diagram generation
- Private repository support
- Mermaid export and PNG download
- OpenRouter for self-hosted AI provider
How to install
Local development setup uses Bun with Cloudflare R2, Upstash Redis, and an AI provider configured in the environment file.
git clone https://github.com/ahmedkhaleel2004/gitdiagram.git
cd gitdiagram
bun install
cp .env.example .env
bun run devRecommended for this setup
Strengths
- MIT license with no usage restrictions: The codebase is MIT licensed, which means you can fork it, modify it, run it internally, or build on it commercially with no restrictions. Unlike diagramming tools with proprietary licenses that prohibit redistribution or commercial use, MIT places no constraints on how you deploy or extend the code.
- Active development and strong community adoption: 16,469 GitHub stars and 1,255 forks signal widespread adoption for a tool created in December 2024. The repository received a push on 2026-09-18, indicating ongoing active maintenance. 40 open issues is a manageable queue for a tool at this scale.
- Path validation prevents broken diagram links: Every file path in the generated graph is checked against the actual GitHub repository before the diagram is finalized. Invalid paths trigger focused retries with feedback to the model. The result is that displayed nodes always correspond to files that actually exist in the repository.
- No account required for public repositories: Any public GitHub repository can be diagrammed immediately by entering the URL or replacing 'hub' with 'diagram' in an existing GitHub URL. No sign-up, no API key setup, and no configuration needed for the public use case.
Trade-offs
- Self-hosting requires multiple external services: Running your own instance requires accounts for Cloudflare R2 (diagram storage), Upstash Redis (quota and rate limiting), and an OpenAI or OpenRouter API key. The Dockerfile is documented as a disaster recovery path rather than a zero-config install, so self-hosting demands more infrastructure work than tools with a single Docker Compose file.
- Vercel is the only fully supported production runtime: The primary deployment is Vercel-only; the Docker image is retained as a failover path and is not a first-class self-hosted product. Teams that need to run the full stack on private infrastructure should expect configuration work beyond what the README covers in detail.
Tech stack
FAQ
Public repository diagrams on the hosted version at gitdiagram.com are free. The source code is MIT licensed, so running your own instance is also free, though you supply your own API keys for Cloudflare R2, Upstash Redis, and an AI provider. Heavy usage on the hosted version may be subject to rate limits.
Yes. Select Private Repos in the header and provide a fine-grained GitHub personal access token with read access to the target repository. The token is sent only with the relevant same-origin API request and is never stored in the diagram URL or public diagram links.
Yes. The repository includes a Dockerfile and Railway configuration. Self-hosting requires a Cloudflare R2 bucket for diagram storage, Upstash Redis for rate limiting, and an OpenAI or OpenRouter API key. The README describes the Docker path as a disaster recovery recipe; expect to configure multiple services before the full stack runs.
The managed cloud version uses GPT-5.6 Luna at medium reasoning by default. Self-hosted deployments can configure OpenRouter to use a different model. Users can also supply their own OpenAI API key, which uses standard service tier and their configured model.
Diagrams can be exported as raw Mermaid source or downloaded as a PNG image. The Mermaid source can be pasted into any tool that renders Mermaid diagrams, including GitHub markdown files, Notion, and popular diagramming editors.