Create beautiful, real-time GitHub stats cards, badges, and contribution graphs that are easy to customize and perfect for your profile README or project docs.
Returns an SVG Statistic card or pie chart for a user.
Example:
GET https://stats.pphat.top/stats?username=pphatdev
Required query params:
- username
Optional query params:
| Param | Description |
|---|---|
theme |
Theme preset |
hide_title |
Hide title (true/false) |
hide_border |
Hide border (true/false) |
hide_rank |
Hide rank (true/false) |
show_icons |
Show icons (true/false) |
avatar_mode |
Avatar mode: none / avatar / radar |
show_avatar |
Legacy alias; true sets avatar_mode=avatar |
custom_title |
Custom card title |
data_border_style |
Border style: solid / frame |
data_border_frame |
Border frame position: in / out |
bgColor |
Background color |
borderColor |
Border color |
textColor |
Text color |
titleColor |
Title color |
format |
Output format: svg / webp |
Example:
GET https://stats.pphat.top/stats?username=pphatdev&avatar_mode=radar
Returns an SVG languages card or pie chart for a user.
Required query params:
- username
Optional query params:
| Param | Description |
|---|---|
theme |
Theme preset |
show_info |
Show extra language info |
top |
Limit number of top languages |
variant |
Card variant style |
type |
Output style: card / pie |
bgColor |
Background color |
borderColor |
Border color |
textColor |
Text color |
titleColor |
Title color |
format |
Output format |
Example:
GET https://stats.pphat.top/languages?username=pphatdev
Returns an SVG activity graph for a user for a specific year or the last 365 days.
Required query params:
username
Optional query params:
| Param | Description |
|---|---|
theme |
Theme preset (see Graph Themes) |
year |
4-digit year (default: last 365 days) |
animate |
Animation mode: glow (default), wave, pulse, none |
size |
Canvas preset: default, small, medium, large |
show_title |
Show/hide username + year heading |
show_total_contribution |
Show/hide contribution subtitle |
show_background |
Show/hide background gradient, stars, and grid |
as |
Output format: svg (default), gif, webp, png |
bgColor |
Background color |
borderColor |
Border color |
textColor |
Text color |
titleColor |
Title color |
Example:
GET https://stats.pphat.top/graph?username=pphatdev&year=2024
GET https://stats.pphat.top/graph?username=pphatdev&theme=aurora
GET https://stats.pphat.top/graph?username=pphatdev&theme=matrix&animate=pulse
GET https://stats.pphat.top/graph?username=pphatdev&theme=ocean&animate=wave
GET https://stats.pphat.top/graph?username=pphatdev&theme=aurora&animate=wave&as=gif
GET https://stats.pphat.top/graph?username=pphatdev&theme=matrix&animate=pulse&as=webp
GET https://stats.pphat.top/graph?username=pphatdev&as=png
Returns dynamic badge SVGs for various GitHub user metrics.
Available badge types:
| Endpoint | Description |
|---|---|
/badge/visitors |
Visitor counter (increments per unique IP/day) |
/badge/repositories |
Total public repositories |
/badge/organization |
Organizations count |
/badge/languages |
Number of programming languages used |
/badge/followers |
Follower count |
/badge/total-stars |
Total stars across all repositories |
/badge/total-contributors |
Total contributors |
/badge/total-commits |
Total commits |
/badge/total-code-reviews |
Total code reviews |
/badge/total-issues |
Total issues created |
/badge/total-pull-requests |
Total pull requests |
/badge/total-joined-years |
Years since joining GitHub |
Required query params:
username
Optional query params:
| Param | Description |
|---|---|
theme |
Badge theme: default, aurora, matrix, inferno, ocean, neon, solar, galaxy, github-dark |
customLabel |
Override label text |
labelColor |
Label text color (hex without #, e.g. ff5733) |
labelBackground |
Label background color (hex without #) |
iconColor |
Icon color (hex without #) |
valueColor |
Value text color (hex without #) |
valueBackground |
Value background color (hex without #) |
hideFrame |
Hide corner bracket frame (true/false, default false) |
hideIcon |
Hide badge icon (true/false, default false) |
Examples:
GET https://stats.pphat.top/badge/visitors?username=pphatdev
GET https://stats.pphat.top/badge/total-stars?username=pphatdev&theme=ocean
GET https://stats.pphat.top/badge/repositories?username=pphatdev&hideFrame=true
GET https://stats.pphat.top/badge/followers?username=pphatdev&hideIcon=true&theme=neon
GET https://stats.pphat.top/badge/total-commits?username=pphatdev&hideFrame=true&hideIcon=true
Returns dynamic badge SVGs for repository/project-specific metrics.
Available project badge types:
| Endpoint | Description |
|---|---|
/project/stars |
Repository star count |
/project/forks |
Repository fork count |
/project/watchers |
Repository watcher count |
/project/issues |
Open issues count |
/project/prs |
Open pull requests count |
/project/contributors |
Contributors count |
/project/size |
Repository size |
Required query params:
repoβ Repository in formatowner/repo(e.g.,pphatdev/github-stats)
Optional query params:
| Param | Description |
|---|---|
theme |
Badge theme: default, aurora, matrix, inferno, ocean, neon, solar, galaxy, github-dark |
customLabel |
Override label text |
labelColor |
Label text color (hex without #, e.g. ff5733) |
labelBackground |
Label background color (hex without #) |
iconColor |
Icon color (hex without #) |
valueColor |
Value text color (hex without #) |
valueBackground |
Value background color (hex without #) |
hideFrame |
Hide corner bracket frame (true/false, default false) |
hideIcon |
Hide badge icon (true/false, default false) |
Examples:
GET https://stats.pphat.top/project/stars?repo=pphatdev/github-stats
GET https://stats.pphat.top/project/forks?repo=pphatdev/github-stats&theme=aurora
GET https://stats.pphat.top/project/issues?repo=pphatdev/github-stats&hideFrame=true
GET https://stats.pphat.top/project/contributors?repo=pphatdev/github-stats&hideIcon=true
Stats card:
Languages card:
Languages pie chart:
Activity graph:
Activity graph with theme and animation:
Visitor badge:
Other badges (stars, followers, commits, etc.):



Badges with theme and custom label:

Minimal badges (no frame, no icon):

Badges without frame (clean border):

Badges without icon (text focus):

Project/repository badges:




Use the theme query param. A few previews:
π¨ default |
π dark |
β‘ radical |
π tokyonight |
π§ dracula |
π monokai |
π gruvbox |
π€ onedark |
| Category | Themes |
|---|---|
| Dark | default, dark, radical, merko, gruvbox, tokyonight, onedark, cobalt, synthwave, highcontrast, dracula, prussian, monokai, vue, vue-dark, shades-of-purple, nightowl, buefy-dark, blue-green, algolia, great-gatsby, darcula, bear, solarized-dark, chartreuse-dark, nord, gotham, material-palenight, vision-friendly-dark, ayu-mirage, midnight-purple, calm, omni, react, jolly, maroongold, yeblu, blueberry, slateorange, kacho_ga, outrun, ocean_dark, city_lights, github_dark, discord_old_blurple, aura_dark, panda, noctis_minimus, cobalt2, swift, aura, apprentice, moltack, codeSTACKr, rose_pine |
| Light | solarized-light, graywhite, flag-india |
Full theme list is in src/utils/themes.
These themes are tuned for the /graph heatmap card β vivid iconColor cells against near-black backgrounds.
π aurora |
π matrix |
π₯ inferno |
π ocean |
All available themes: aurora Β· matrix Β· inferno Β· ocean Β· neon Β· solar Β· galaxy Β· github-dark
| Mode | Description |
|---|---|
glow |
Default β active cells pulse with a soft glow |
wave |
Cells ripple in a wave pattern across columns |
pulse |
~16 random cells flash independently |
none |
No animation β static render |
| Value | Canvas | Cell size |
|---|---|---|
default |
1200 Γ 600 | 14 px |
small |
800 Γ 400 | 9 px |
medium |
1000 Γ 500 | 12 px |
large |
1400 Γ 700 | 16 px |
Development setup was moved to: docs/how-to/DEVELOPMENT.md
Route-by-route demos with option examples: docs/how-to/routes/README.md
- API: GitHub REST + GraphQL APIs with intelligent batching
- Caching: Multi-tier (Memory β Redis β Source) with 2-hour default TTL
- Database: SQLite with Drizzle ORM for badge counters and visitor logs
- Server: Express.js with optional cluster mode for multi-core scaling
- Rendering: Server-side SVG generation with optional WebP/PNG/GIF export
- Responses are cached for 2 hours (configurable via
CACHE_DURATION) - Without a GitHub token, API rate limits are very low (~60 requests/hour)
- Set
GITHUB_TOKENto get 5,000 requests/hour - Redis is optional but recommended for production (enables distributed caching)
- Visitor badges use IP hashing for privacy-preserving unique visitor counting
MIT. See LICENSE.