https://github.com/midaksh/github-analyzer-api
<aside>
</aside>
Please make sure to go through the documentation in
README.mdfile.
A scalable, production-grade API that collects and analyzes publicly available GitHub profile data to generate meaningful developer insights.
The platform persists analyzed data in a MySQL database and exposes a versioned API that enables profile analysis, historical retrieval, developer comparison, trend exploration, and talent discovery. Designed with extensibility, reliability, and performance in mind, the service supports seamless integration with external applications, dashboards, and recruitment workflows.
flowchart LR
Client["Client\nBrowser · Postman · curl"]
API["Express API\nNode.js"]
MySQL["MySQL"]
GH_REST["GitHub REST\nusers · repos · search"]
GH_GQL["GitHub GraphQL\ncontributions · repos"]
Client -->|HTTP| API
API -->|SQL| MySQL
API -->|HTTPS| GH_REST
API -->|HTTPS + token| GH_GQL
flowchart TB
subgraph clients [Clients]
WEB[Browser]
PM[Postman]
CLI[curl / scripts]
end
subgraph render [Render — Web Service]
APP[Node.js Express\nStateless API]
end
subgraph railway [Railway — MySQL]
DB[(github_profiles)]
end
subgraph github [GitHub]
REST[REST API]
GQL[GraphQL API]
end
WEB & PM & CLI --> APP
APP --> DB
APP --> REST
APP --> GQL
note1[Scale horizontally:\nadd more app instances behind Render]
note2[DB connection pool · env-based config · upsert avoids duplicates]
| Requirement | How this project delivers it |
|---|---|
| Fetch public profile data from GitHub using username | POST /api/v1/profiles/analyze with { "username": "..." } — calls GitHub REST (GET /users/{username}, GET /users/{username}/repos) and GraphQL for extended analytics |
| Store useful insights (e.g. public repo count, followers count, etc.) | Persists followers, following, public_repo_count, total stars/forks, languages, account age, contribution metrics, recent repos, and more in MySQL |
| Store analysis results in MySQL | Table github_profiles with upsert on re-analyze; schema in schema.sql |
| API to fetch all stored analyzed profile list | GET /api/v1/profiles — returns all profiles from database (supports limit & offset) |
| API to fetch data of a single profile | GET /api/v1/profiles/:username — returns one stored record by GitHub login |
| # | Feature | Endpoint / detail |
|---|---|---|
| 1 | Contributions analytics | Last year, month, week totals (GitHub GraphQL) |
| 2 | Longest contribution streak | insights.contributions.longest_streak_days |
| 3 | Commits count | insights.contributions.commits_count |
| 4 | Recent repos (top 5) | insights.recent_repos_top_5 |
| 5 | Compare two profiles | GET /api/v1/profiles/compare?user1=&user2= |
| 6 | Search GitHub users | GET /api/v1/search/users?q= |
| 7 | Health check | GET /api/v1/health — API + MySQL status |
| 8 | Pagination | GET /profiles?limit=&offset= |
| 9 | Upsert on re-analyze | Same username updates row (no duplicates) |
| 10 | API versioning | All routes under /api/v1 |
| 11 | Structured errors | Consistent { success, error, code } responses |
| 12 | Pretty JSON | Readable indented API responses |
| 13 | Docker Compose | Local MySQL for development |
| 14 | Dual GitHub APIs | REST + GraphQL for richer insights |
| 15 | Production deploy | Render (API) + Railway (MySQL) |
| 16 | Export Profile | GET /api/v1/profiles/:username/export?format=csv |