
GitHub Stats API
Fast GitHub Stats Graph - Generate beautiful, real-time GitHub stats cards, badges, and contribution graphs for your README files.
โจ About Project
GitHub Stats is a high-performance API service that generates beautiful, customizable GitHub statistics cards, badges, and contribution graphs. Built for developers who want to showcase their GitHub activity in README files, portfolios, and documentation. The service features real-time data fetching from GitHub's REST and GraphQL APIs, multi-tier caching with Redis support, and 60+ built-in themes. With TypeScript, Express.js, and SQLite/Drizzle ORM for visitor tracking, it provides a robust and scalable solution for displaying GitHub statistics.
๐ ๏ธ Project Tech Stack
-
Core:
- Node.js
v18+ - TypeScript
v5 - Express.js
- Node.js
-
Data & Caching:
- GitHub REST API
- GitHub GraphQL API
- Redis (optional)
- SQLite
- Drizzle ORM
-
Rendering & Export:
- SVG Generation
- WebP, PNG, GIF Export
- Server-side Rendering
-
Development & Deployment:
- PM2 Cluster Mode
- Express Rate Limiting
- CORS Support
๐ Project Features
-
Stats Cards
- User statistics with customizable themes
- Avatar modes (none, avatar, radar)
- Custom titles and border styles
- 60+ built-in themes
-
Language Cards
- Top programming languages
- Pie chart visualization
- Detailed language statistics
-
Contribution Graphs
- Activity heatmaps by year or last 365 days
- Multiple animation modes (glow, wave, pulse)
- Size presets (small, medium, large)
- Multiple export formats (SVG, GIF, WebP, PNG)
-
Badges System
- User badges (visitors, followers, repos, stars, etc.)
- Project badges (stars, forks, issues, PRs, etc.)
- Customizable themes and colors
- Frame and icon toggle options
-
Icons Library
- Reusable SVG icons
- Color customization
- Glow effects
- Interactive demo gallery
-
Performance
- Multi-tier caching (Memory โ Redis โ Source)
- Intelligent batching
- 2-hour default TTL
- Cluster mode for multi-core scaling
-
Monitoring
- Health check endpoints
- Cache statistics
- Performance metrics
- Visitor tracking with IP hashing
๐ API Endpoints
Core Routes
GET /stats- User statistics cardGET /languages- Programming languages card/pieGET /graph- Contribution activity graph
Badge Routes
GET /badge/:type- User badges (visitors, repos, followers, stars, etc.)GET /project/:type- Project badges (stars, forks, issues, PRs, etc.)
Utility Routes
GET /icons- List all available iconsGET /icons/:name- Get specific icon SVGGET /icons/demo- Interactive icons gallery
Monitoring
GET /health- Health checkGET /cache/health- Cache health statusGET /cache/stats- Cache statistics
๐จ Themes
60+ built-in themes including:
- Dark: default, dark, radical, tokyonight, dracula, monokai, gruvbox, onedark
- Light: solarized-light, graywhite
- Graph Themes: aurora, matrix, inferno, ocean, neon, solar, galaxy, github-dark
๐ป Preview
Here are example outputs from the API:
๐ Usage
In Markdown



User Badges



Project Badges



๐ License
MIT License - See LICENSE