Skip to content

shivanshu407/streak-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Streak Stats

Custom GitHub contribution streak card — accurate, private-repo-aware, and beautiful.

Uses the GitHub GraphQL API so it counts contributions from private repos too (unlike most streak widgets that only see public activity).

Streak Stats


✨ Features

  • Accurate streaks — fetches from GitHub's contribution calendar via GraphQL
  • Private repo contributions — included automatically when a GITHUB_TOKEN is provided
  • Animated SVG — fade-in columns, pulsing glow, flickering flame
  • Customizable — accent color, background, border radius
  • Fast — serverless on Vercel with smart caching (1h default)

🚀 Quick Start

Use it directly

![Streak Stats](https://streak-stats-sigma.vercel.app/api?user=YOUR_GITHUB_USERNAME)

Deploy your own

  1. Fork this repo
  2. Deploy to Vercel
  3. Add a GITHUB_TOKEN environment variable in Vercel project settings
  4. Use your deployment URL:
    https://YOUR-APP.vercel.app/api?user=YOUR_USERNAME
    

📐 Parameters

Parameter Description Default
user Required. GitHub username
hide_border Hide the card border false
border_radius Corner radius in pixels 6
accent Custom accent color (hex) #a500fd
background Custom background color (hex) #0d1117
cache_seconds Cache duration (1800–86400) 3600

Examples

<!-- Default -->
![Streak](https://streak-stats-sigma.vercel.app/api?user=shivanshu407)

<!-- No border -->
![Streak](https://streak-stats-sigma.vercel.app/api?user=shivanshu407&hide_border=true)

<!-- Custom accent color -->
![Streak](https://streak-stats-sigma.vercel.app/api?user=shivanshu407&accent=ff6b6b)

🛠 How It Works

  1. GraphQL API fetches the contribution calendar (last ~365 days, includes private repos)
  2. Current streak — walks backwards from today counting consecutive days with contributions
  3. Longest streak — scans the full calendar for the longest consecutive run
  4. SVG card — renders a clean card with the purple + white theme, animated flame, and glow effects

📄 License

MIT — built by @shivanshu407

Releases

No releases published

Packages

 
 
 

Contributors