gitdiagram  by ahmedkhaleel2004

Interactive diagrams for GitHub repos

created 7 months ago
13,898 stars

Top 3.7% on sourcepulse

GitHubView on GitHub
Project Summary

GitDiagram transforms GitHub repositories into interactive Mermaid.js diagrams, aiding developers in understanding complex codebases. It targets open-source contributors and anyone needing to quickly grasp project architecture, offering instant visualization and direct navigation to source files.

How It Works

The tool leverages OpenAI's o4-mini model, processing file tree and README data to generate Mermaid.js diagrams. Prompt engineering is central to extracting and analyzing information, creating a workflow that results in interactive diagrams where components link to relevant files and directories.

Quick Start & Requirements

  • Install dependencies with pnpm i.
  • Self-hosting requires Docker for the backend (docker-compose up --build -d).
  • A PostgreSQL database is needed, started via ./start-database.sh.
  • Environment variables, including an OpenAI API key and optional GitHub token, must be configured in .env.
  • Frontend runs with pnpm dev, accessible at localhost:3000.
  • Official documentation and self-hosting instructions are available in the repository.

Highlighted Details

  • Generates interactive Mermaid.js diagrams from GitHub repositories.
  • Utilizes OpenAI o4-mini for diagram generation.
  • Allows clicking diagram components to navigate to source files.
  • Supports private repositories via GitHub personal access tokens.
  • Offers API access (WIP).

Maintenance & Community

The project is actively maintained by ahmedkhaleel2004. Contributions are welcome via pull requests.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial or closed-source integration.

Limitations & Caveats

The project is described as having a public API that is "WIP" (Work In Progress). Rate limits on the hosted version may change in the future.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
3
Star History
2,951 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.