I built this project to help visualize the architecture of different GitHub repositories. You just paste a GitHub link, and it clones the repo locally, reads the files, and uses the Gemini API to draw a Mermaid diagram of how everything connects.
- Auto-analyzes repos: It downloads the repo and checks the folder structure and important config files (like
package.jsonorrequirements.txt). - AI diagrams: Uses Gemini to figure out the architecture and generate a Mermaid diagram, along with a short explanation of how the repo works.
- Different modes: You can generate a basic diagram for beginners or a more technical one if you want to see all the backend details.
- Codebase Chat: You can ask questions in real time about how the repo is structured, what packages it uses, or how the code works.
- History & Caching: Saves diagrams in local SQLite (
cache.db) and browserlocalStorageso you don't burn API calls re-analyzing repos. - Rate Limiting: Built-in rate limiter so you don't accidentally blow through your Gemini free tier quotas.
- Export options: You can copy the raw Mermaid code or download the diagram as an SVG.
- Diagram links: If a component in the diagram maps to a specific file, you can click it to jump straight to that file on GitHub.
- Python 3.10+
- Git
- A Google Gemini API Key
-
Set your API Key and Config Add your Gemini API key to
.envin the root folder:GEMINI_API_KEY=your_api_key_here
Alternatively, you can set it directly in your terminal:
# Windows (Command Prompt) set GEMINI_API_KEY=your_api_key_here # Windows (PowerShell) $env:GEMINI_API_KEY="your_api_key_here" # Mac/Linux export GEMINI_API_KEY="your_api_key_here"
-
Install the backend stuff Make sure you are in the project folder and run:
pip install -r requirements.txt
-
Start the backend
cd backend uvicorn main:app --reload --port 8010 -
Open the frontend You can just open
frontend/index.htmlin your browser, or start a simple python server:cd frontend python -m http.server 8080