Streak Stats

Deploy Your Own Instance

Take control of your GitHub stats by deploying this API to your own Vercel account. Guarantee 100% uptime with a dedicated GitHub token and Redis caching.

1Get a GitHub Personal Access Token

You need a GitHub PAT to allow the API to securely read contribution data without hitting global rate limits.

  1. Go to GitHub Developer Settings.
  2. Name the token (e.g., "Streak Stats Generator").
  3. You do not need to select any scopes (no permissions required for public profiles). If you want to include private commits, select the repo scope.
  4. Click Generate token and copy it.

2Set Up Upstash Redis

Redis caching ensures your API doesn't get blocked if your README gets thousands of views in a single day.

  1. Go to Upstash.com and sign in with GitHub.
  2. Click Create Database (name it whatever you like, e.g., "streak-cache").
  3. Once created, scroll down to the REST API section.
  4. Copy the UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.

3Deploy to Vercel

Deploying this codebase to Vercel is free and takes less than 2 minutes.

  1. Push this project to a new repository on your GitHub account.
  2. Log into Vercel and click Import Project.
  3. Select your newly pushed repository.
  4. In the Environment Variables section before deploying, add the following three variables:
GITHUB_TOKEN="ghp_your_token_here"
UPSTASH_REDIS_REST_URL="https://your-database.upstash.io"
UPSTASH_REDIS_REST_TOKEN="your_redis_token_here"

Click Deploy and you're done! You now have a 100% uptime, zero-maintenance API.