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.
- Go to GitHub Developer Settings.
- Name the token (e.g., "Streak Stats Generator").
- You do not need to select any scopes (no permissions required for public profiles). If you want to include private commits, select the
reposcope. - 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.
- Go to Upstash.com and sign in with GitHub.
- Click Create Database (name it whatever you like, e.g., "streak-cache").
- Once created, scroll down to the REST API section.
- Copy the
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN.
3Deploy to Vercel
Deploying this codebase to Vercel is free and takes less than 2 minutes.
- Push this project to a new repository on your GitHub account.
- Log into Vercel and click Import Project.
- Select your newly pushed repository.
- 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.