Deploy your dedicated PR statistics service instantly and start using it within 5 minutes!
Configure the following environment variables before deployment:
# GitHub API Token (required)
GITHUB_TOKEN=ghp_your_github_token_here
# Redis cache URL (optional but highly recommended)
REDIS_URL=redis://default:password@host:6379Note:
GITHUB_TOKENis required for accessing GitHub APIREDIS_URLis optional but highly recommended for better performance and reduced API calls
-
Visit GitHub Token Settings
-
Fill in Token information:
- Note: Enter
GitHub PR Stats - Expiration: Select
No expiration
- Note: Enter
-
Select permissions (minimal required):
- ✅
public_repo: Access public repositories (required) - ✅
read:user: Read user profile (for GraphQL)
- ✅
-
Click
Generate tokenbutton at the bottom of the page -
Important: Copy the generated Token immediately (only shown once)
-
Login to Vercel Console
-
Visit Vercel Storage page
-
Click
Create Database→ SelectRedis (Serverless Redis)→ Continue
-
Fill in database information:
- Name: Custom input
- Region: Choose your preferred region
-
After creation, enter the database details page and add the copied URL to environment variables:
REDIS_URL=redis://default:your_password@your_host:6379
# GitHub API Token (required)
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Redis cache URL (optional but highly recommended for performance)
REDIS_URL=redis://default:AbCdEf123456@redis-12345.upstash.io:6379- Frontend: React + TypeScript + Vite
- Backend: Vercel Serverless Functions
- Database: Redis (caching)
- API: GitHub GraphQL API
- Parameter Parsing → Validate query parameters
- Cache Check → Redis cache optimization
- Data Fetching → GitHub GraphQL API
- Data Processing → Filter, sort, aggregate
- Result Limiting → Select top limit records
- SVG Generation → Theme rendering
- Response Output → Standard SVG format
- Server-side Token isolation
- Read-only API access
- Smart caching strategy
- Modular design
