GitDiagram is a TypeScript web application that converts any GitHub repository into an interactive visual diagram in seconds. You can use it by visiting gitdiagram.com and pasting a repo URL, or by replacing "hub" with "diagram" in any GitHub URL. The diagram shows the architecture and structure of the codebase, and each node in the diagram is clickable, clicking it takes you directly to the corresponding source file or directory on GitHub. Under the hood, the tool fetches the repository's file tree and README through the GitHub API, then uses GPT-5-family AI models to first write a plain-English architecture explanation and then convert that explanation into a structured diagram in Mermaid.js (a format for drawing diagrams as text). The diagram is validated against the actual file tree before being shown, with automatic retries if problems are found. Diagrams are cached in Cloudflare R2 storage so repeat visits are fast. Private repositories are supported by providing a GitHub personal access token. The frontend is built with Next.js and TypeScript and deployed on Vercel, while the backend runs as a FastAPI service on Railway. The project can also be self-hosted locally using Bun and Docker.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.