Skip to content

Exc1D/github-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Stats Generator

A serverless GitHub statistics dashboard that displays your contribution metrics and activity graph.

Github-stats

Features

  • Real-time contribution data from GitHub API
  • Current and longest streak tracking
  • 90-day activity graph
  • Auto-updating every 4 hours
  • Automatic dark/light theme switching

Setup

  1. Install dependencies
   npm install
  1. Get GitHub Token (recommended)

  2. Deploy to Vercel

   npm i -g vercel
   vercel
  1. Add environment variable
    • Go to Vercel Dashboard → Your Project → Settings → Environment Variables
    • Add: GITHUB_TOKEN with your token value
    • Redeploy

Usage

https://your-project.vercel.app/api/stats?username=YOUR_USERNAME

Add to GitHub README

![GitHub Stats](https://your-project.vercel.app/api/stats?username=YOUR_USERNAME)

CHANGE your-project to specific vercel project name CHHANGE YOUR_USERNAME to your username

Troubleshooting

If you get a 404 error:

  • Ensure api/stats.js is in the correct location
  • Check URL format: /api/stats?username=...
  • Verify deployment logs in Vercel dashboard

How It Works

  • Fetches data from GitHub GraphQL API
  • Calculates streaks by analyzing contribution history
  • Generates SVG with embedded CSS for theme switching
  • Caches for 4 hours to reduce API calls

Rate Limits

  • Without token: 60 requests/hour
  • With token: 5,000 requests/hour

About

Generates Github stats that you can paste into your README.md profile intro.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors