ahmedkhaleel2004 / gitdiagram
Free, simple, fast interactive diagrams for any GitHub repository
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing ahmedkhaleel2004/gitdiagram in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewGitDiagram Turn any GitHub repository into an interactive diagram for visualization in seconds. You can also replace with in any Github URL to access its diagram. 🚀 Features • 👀 **Instant Visualization**: Convert any GitHub repository structure into a system design / architecture diagram • 🎨 **Interactivity**: Click on components to navigate directly to source files and relevant directories • ⚡ **Fast Generation**: Powered by OpenAI GPT-5.2 (configurable) for quick and accurate diagrams • 🖼️ **Export Options**: Copy Mermaid code or download the generated diagram as PNG • 🌐 **API Access**: Public API available for integration (WIP) ⚙️ Tech Stack • **Frontend**: Next.js, TypeScript, Tailwind CSS, ShadCN • **Backend**: FastAPI (Railway), with Next.js Route Handlers available as a fallback path • **Database**: PostgreSQL (with Drizzle ORM) • **AI**: OpenAI GPT-5.2 (via ) • **Deployment**: Vercel (frontend) + Railway (backend) • **CI/CD**: GitHub Actions • **Analytics**: PostHog, Api-Analytics 🔄 Backend Architecture Update GitDiagram now runs its primary generation backend on FastAPI (deployed on Railway). Frontend calls are routed to the external backend by setting: • • The variable name contains "LEGACY" for backward compatibility, but it now points to the primary external backend in production. 🤔 About I created this because I wanted to contribute to open-source projects but quickly realized their codebases are too massive for me to dig through manually, so this helps me get started - but it's definitely got many more use cases! Given any public (or private!) GitHub repository it generates diagrams in Mermaid.js with OpenAI's GPT-5.2! (Previously Claude 3.5 Sonnet) I extract information from the file tree and README for details and interactivity (you can click components to be taken to relevant files and directories). Most of what you might call the "processing" of this app is done with prompt engineering and a 3-step streaming pipeline in the FastAPI backend under . 🔒 How to diagram private repositories You can simply click on "Private Repos" in the header and follow the instructions by providing a GitHub personal access token with the scope. You can also self-host this app locally (backend separated as well!) with the steps below. 🛠️ Self-hosting / Local Development • Clone the repository • Install dependencies • Set up environment variables (create .env) Then edit the file with your OpenAI API key and optional GitHub personal access token. • Start local database When prompted to generate a random password, input yes. The Postgres database will start in a container at • Initialize the database schema You can view and interact with the database using • Run frontend You can now access the website at . Run FastAPI backend (recommended if you want parity with production): To route frontend calls to the external backend, set: • • For a full machine setup guide (Node/Python/uv versions + verification), see . Quick validation: Railway backend docs: . Contributing Contributions are welcome! Please feel free to submit a Pull Request. Acknowledgements Shoutout to Romain Courtois's Gitingest for inspiration and styling 🤔 Future Steps • Implement font-awesome icons in diagram • Implement an embedded feature like star-history.com but for diagrams. The diagram could also be updated progressively as commits are made.