A self-hosted, zero-dependency serverless API that generates dynamic SVG streak cards for your GitHub profile README.
π Deploy Now Β· π API Docs Β· π¨ Templates Β· βοΈ Setup
GitHub Streak Tracker is a serverless API you deploy once on Vercel. It:
- Fetches your contribution data from GitHub's GraphQL API
- Calculates your current streak, longest streak, and total contributions
- Renders a fully custom SVG card β no external fonts, no dependencies, instant load
Drop the URL in your README.md and it updates live.
- π¨ 3 templates β Ember, Frost, Neon
- π 5 color palettes β Dark, Dracula, Catppuccin, Nord, Light + fully custom hex
- π 3 layouts β Row, Stacked, Hero
- βοΈ 4 font stacks β Inter, JetBrains Mono, Space Grotesk, Mono
- β‘ In-memory cache β zero repeated API calls, 1-hour TTL
- π€ GitHub Actions automation β daily SVG commit, zero extra secrets
- π Zero scopes β GitHub token needs no permissions for public data
Or manually:
git clone https://github.com/SAPTARSHI-coder/github-streak-tracker.git
# Import the repo on vercel.com/newVercel Dashboard β Settings β Environment Variables:
GITHUB_TOKEN = ghp_xxxxxxxxxxxx
Get a free token at github.com/settings/tokens β no scopes needed.
| Parameter | Options | Default | Description |
|---|---|---|---|
username |
your GitHub login | β | Required |
template |
ember frost neon |
ember |
Card design |
palette |
dark dracula catppuccin nord light custom |
dark |
Color theme |
layout |
row stacked hero |
row |
Stat arrangement |
font |
inter jetbrains spacegrotesk mono |
inter |
Font family |
bg |
%23RRGGBB |
β | Custom background (palette=custom only) |
accent |
%23RRGGBB |
β | Custom streak color (palette=custom only) |
border |
%23RRGGBB |
β | Custom border color (palette=custom only) |
Note: URL-encode
#as%23in query strings.
# Frost template, Dracula palette, hero layout
/streak?username=SAPTARSHI-coder&template=frost&palette=dracula&layout=hero
# Neon template, JetBrains font
/streak?username=SAPTARSHI-coder&template=neon&font=jetbrains
# Custom colors
/streak?username=SAPTARSHI-coder&palette=custom&bg=%230d1117&accent=%23ff79c6&border=%236272a4
# Stacked layout, Nord palette
/streak?username=SAPTARSHI-coder&layout=stacked&palette=nord
ember |
frost |
neon |
|
|---|---|---|---|
| Background | Dark gradient | Navy flat | Pure black |
| Accent | Coral top bar | Gradient fade bar | Glowing border |
| Dividers | Subtle lines | Dashed accent | Dark lines |
| Icons | SVG paths | SVG paths | SVG paths + glow |
| Best with | dark, dracula |
nord, catppuccin |
dracula, custom |
The included workflow runs at 00:10 UTC daily. It regenerates streak.svg and commits it automatically β no extra secrets required.
One-time setup:
- Settings β Actions β General β "Read and write permissions" β Save
- Optionally set repository variables (Settings β Secrets and variables β Actions β Variables):
| Variable | Default | Example |
|---|---|---|
STREAK_USERNAME |
repo owner | SAPTARSHI-coder |
STREAK_TEMPLATE |
ember |
neon |
STREAK_PALETTE |
dark |
dracula |
STREAK_LAYOUT |
row |
hero |
STREAK_FONT |
inter |
jetbrains |
Then embed the static SVG:
git clone https://github.com/SAPTARSHI-coder/github-streak-tracker.git
cd github-streak-tracker
npm install
cp .env.example .env # add your GITHUB_TOKEN
npm run dev # starts on http://localhost:3000
# Test endpoints
curl http://localhost:3000/streak?username=SAPTARSHI-coder
curl http://localhost:3000/health
# Generate a local SVG file
node src/generate.js SAPTARSHI-coder streak.svg ember dark rowgithub-streak-tracker/
βββ api/
β βββ streak.js β Vercel serverless function (main endpoint)
β βββ health.js β Health check
βββ src/
β βββ github.js β GitHub GraphQL API client
β βββ streak.js β Streak calculation engine
β βββ cache.js β In-memory TTL cache
β βββ server.js β Express dev server
β βββ generate.js β CLI for local/CI SVG generation
β βββ icons.js β SVG path icons (no emojis)
β βββ templates/
β βββ index.js β Template registry
β βββ ember.js β Warm dark card
β βββ frost.js β Cool navy card
β βββ neon.js β Neon glow card
βββ docs/ β Full documentation
βββ .github/
β βββ workflows/
β β βββ update-streak.yml β Daily automation
β βββ ISSUE_TEMPLATE/
βββ .env.example β Environment variable reference
βββ vercel.json β Vercel route config
βββ package.json
| Doc | Description |
|---|---|
| Setup Guide | Prerequisites, install, local dev |
| API Reference | Every parameter with examples |
| Templates & Palettes | Design tokens, layouts |
| Deployment | Vercel + GitHub Actions |
| How It Works | Architecture & data flow |
| Contributing | Add templates, palettes, PRs |
MIT License with Attribution Requirement β see LICENSE.
You are free to use, fork, and modify this project. If you deploy it publicly or build on top of it, you must include a visible credit:
Based on GitHub Streak Tracker by SAPTARSHI SADHU
Made with β₯ by SAPTARSHI SADHU
If this helped you, please consider β starring the repo β it means a lot!