GitIntel AI
GitHub Research & Developer Intelligence Platform: analyse any public repository or developer profile through the GitHub API, sign in with GitHub OAuth, and get explainable health scores, pull-request and issue analytics, README summaries and exportable reports.
Why this project exists
Choosing, reviewing or contributing to an open-source project means reading dozens of GitHub pages. GitIntel AI collects that information through the GitHub REST API, turns it into transparent metrics, and presents it in a dashboard and a documented REST API. It is built for students, researchers and developers.
Features
| Module |
What it does |
| Repository intelligence |
Search public repositories; stars, forks, topics, licence, language breakdown |
| Developer analytics |
Profile summary: total stars/forks, top languages, most-starred projects |
| Issues & pull requests |
Merge rate, mean time-to-merge, open-issue age, label distribution |
| Explainable README assistant |
Offline extractive summariser + repository-structure explainer (no third-party AI calls, every result explainable) |
| GitHub OAuth 2.0 |
Sign in with GitHub; signed state, encrypted tokens, minimal read:user scope |
| Reports |
Markdown / JSON report per repository, history stored in SQLite |
Repository health score (0-100, fully transparent)
| Component |
Max |
Based on |
| Popularity |
20 |
log-scaled star count |
| Activity |
25 |
days since the last push |
| Community |
30 |
licence, description, topics, contributor count |
| Maintenance |
25 |
PR merge rate, repository not archived |
Architecture
Streamlit dashboard ──┐
├──> service.py ──> github_client.py ──> GitHub REST API
FastAPI REST API ────┘ │
│ OAuth (auth.py) ├── analytics.py (pure functions)
└─ db.py + crypto.py └── summarizer.py (offline NLP)
(SQLite, Fernet)
More detail in docs/ARCHITECTURE.md.
Quick start (Windows, macOS, Linux)
git clone https://github.com/salikhussain71-code/gitintel-ai.git
cd gitintel-ai
python -m venv .venv
# Windows PowerShell: .venv\Scripts\Activate.ps1
# macOS / Linux: source .venv/bin/activate
pip install -r requirements-dev.txt
cp .env.example .env # Windows: copy .env.example .env
python -m pytest # 50 tests, no network needed
Run the dashboard
streamlit run app/dashboard.py
Run the REST API
# Windows PowerShell: $env:PYTHONPATH="src"
# macOS / Linux: export PYTHONPATH=src
uvicorn gitintel.api:create_app --factory --reload
Open http://localhost:8000 (landing page) or http://localhost:8000/docs (interactive Swagger UI).
Docker
docker compose up --build
Configuration
All settings come from environment variables (see .env.example).
| Variable |
Purpose |
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET |
Your GitHub OAuth App credentials |
OAUTH_REDIRECT_URI |
Must equal the Authorization callback URL registered on GitHub |
GITHUB_TOKEN |
Optional token for a higher API rate limit (5,000/h instead of 60/h) |
SECRET_KEY |
Signs OAuth state and encrypts stored tokens, change it |
COOKIE_SECURE |
Set to true when served over HTTPS |
API reference
| Method & path |
Description |
GET /health |
Service status |
GET /api/search?q= |
Search public repositories |
GET /api/repos/{owner}/{repo} |
Full analytics and health score |
GET /api/repos/{owner}/{repo}/summary |
README summary and headings |
GET /api/repos/{owner}/{repo}/structure |
Explained file layout and quality signals |
GET /api/repos/{owner}/{repo}/report?format=md|json |
Report (also saved to history) |
GET /api/users/{username} |
Developer profile analytics |
GET /api/reports |
Saved report history |
GET /auth/login → /auth/callback |
GitHub OAuth flow |
GET /auth/me, POST /auth/logout |
Session info / sign out |
Example:
curl http://localhost:8000/api/repos/fastapi/fastapi
Security
HMAC-signed, expiring OAuth state plus cookie matching (CSRF), tokens encrypted at rest with Fernet and never exposed to the browser, HTTP-only SameSite=Lax session cookie, validated path inputs, least-privilege scope. See SECURITY.md.
Testing
python -m pytest --cov=gitintel
ruff check .
The suite mocks all GitHub traffic (httpx.MockTransport), so it is fast and deterministic. CI runs on Python 3.10-3.12.
Project structure
gitintel-ai/
├── src/gitintel/ # application package (client, analytics, summarizer, auth, api, db, ...)
├── app/dashboard.py # Streamlit UI
├── tests/ # 50 pytest tests
├── docs/ # architecture, deployment, Developer Program guide
├── .github/ # CI workflow, issue and PR templates
├── Dockerfile, docker-compose.yml, Makefile, pyproject.toml
└── LICENSE (MIT), SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md
GitHub Developer Program
This project integrates with the GitHub API and is meant to be registered with the GitHub Developer Program. Step-by-step instructions: docs/DEVELOPER_PROGRAM.md.
Roadmap
- GraphQL queries for contribution calendars
- Refresh-token support when expiring user tokens are enabled
- PostgreSQL option for multi-instance deployments
- Optional LLM-based summaries (the offline summariser stays the default)
License
MIT © 2026 salikhussain71-code