A full-stack web application to analyze anyone's open source contributions on GitHub. See exactly which projects someone has contributed to, how many PRs they've merged, what languages they code in, and more.
- Profile Analysis: View user profile info, followers, join date, location, bio
- PR Breakdown: See total PRs, merged PRs, open PRs, and closed PRs across all external repos
- Issue Tracking: Count all issues filed on external repositories
- Repo List: Browse every repo the user has contributed to, sorted by contribution frequency
- Language Insights: See what programming languages they code in most
- Organization Tracking: Filter contributions by organization
- Real-time API Integration: Fetches latest data from GitHub API with pagination
- Shareable URLs: Direct results URLs like
/results/torvaldswork immediately - Dark Theme: Clean, minimal interface optimized for readability
- Frontend: Next.js 14 with App Router, React, Tailwind CSS
- Backend: Next.js API Routes (server-side)
- API: GitHub REST API v3
- Deployment: Vercel
- Security: GitHub token stored server-side only, never exposed to client
- Go to GitHub Settings → Personal Access Tokens
- Click "Generate new token (classic)"
- Give it a descriptive name (e.g., "GitHub Analyzer Token")
- Select only the
public_reposcope - Click "Generate token" at the bottom
- Copy the token immediately (you won't see it again!)
git clone https://github.com/yourusername/github-contribution-analyzer.git
cd github-contribution-analyzer
npm install# Copy the example file
cp .env.example .env.local
# Edit .env.local and paste your GitHub token
# GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxnpm run devOpen http://localhost:3000 in your browser.
-
Homepage: Paste any GitHub profile URL or username in the search bar:
https://github.com/torvaldsgithub.com/torvaldstorvalds
-
Results Page: View comprehensive contribution analysis with:
- Profile card with avatar, bio, follower count
- Statistics cards showing PR and issue counts
- Language breakdown chart
- Filterable & sortable repository list
-
Share Results: Copy the URL from results page (e.g.,
yoursite.com/results/torvalds)
.
├── app/
│ ├── page.js # Homepage with search bar
│ ├── layout.js # Root layout with Tailwind globals
│ ├── globals.css # Tailwind CSS directives
│ ├── results/
│ │ └── [username]/
│ │ └── page.js # Results page component
│ └── api/
│ └── github/
│ └── route.js # GitHub API proxy route
├── components/
│ ├── ProfileCard.js # User profile display
│ ├── StatCards.js # Stats grid (PRs, issues, repos)
│ ├── RepoList.js # Searchable, filterable repo list
│ └── LanguageBar.js # Language usage breakdown
├── public/ # Static assets
├── package.json
├── tailwind.config.js
├── next.config.js
├── .env.example # Template for environment variables
├── .env.local # Your actual token (never commit!)
├── .gitignore
└── README.md
Server-side proxy to GitHub API. Parameters:
endpoint:user,prs, orissuesusername: GitHub usernamepage: Page number (for PRs/issues, default: 1)
Example:
GET /api/github?endpoint=user&username=torvalds
GET /api/github?endpoint=prs&username=torvalds&page=1
The token is automatically added serverside, never exposed to the client.
- User enters GitHub username/URL on homepage
- Next.js extracts the username from the URL
/results/[username]page mounts and calls/api/githubroute- API route adds GITHUB_TOKEN and calls GitHub API
- Multiple API calls fetch:
- User profile data
- All public PRs (paginated)
- All public issues (paginated)
- Client-side filtering removes repos owned by the user
- Data aggregation calculates stats and language usage
- Results displayed with interactive, filterable components
Click the button at the top of this README or here.
- Push to GitHub: Commit your code to a GitHub repository
- Import to Vercel:
- Go to vercel.com
- Click "New Project"
- Select your GitHub repo
- Leave settings as default
- Click "Deploy"
- Add Environment Variable:
- Go to your project settings
- Select "Environment Variables"
- Add
GITHUB_TOKENwith your token value - Click "Save"
- Redeploy:
- Go to "Deployments"
- Click the three dots on the latest deployment
- Select "Redeploy"
Your app will be live at yourproject.vercel.app
The GitHub API has rate limits:
- Unauthenticated: 60 requests/hour
- Authenticated (with token): 5,000 requests/hour
A personal access token (included in your GITHUB_TOKEN) allows 5,000 requests/hour. One analysis can use 10-20+ API calls depending on the user's contribution history.
Set in Vercel project settings:
GITHUB_TOKEN=your_personal_access_token
Create .env.local:
GITHUB_TOKEN=your_personal_access_token
.env.local to Git — it's in .gitignore
Make sure:
- You created
.env.localin the project root - It contains
GITHUB_TOKEN=your_actual_token - Your token is a valid GitHub personal access token
- On Vercel, check that the environment variable is set in project settings
- Each token has 5,000 API requests/hour
- Active contributors might exceed this
- Try again in an hour, or create additional tokens
- The GitHub username doesn't exist
- Check spelling and try again
If port 3000 is in use:
npm run dev -- -p 3001- Export data as CSV/JSON
- Compare two users' contributions
- Timeline of contributions over time
- Integration with GitHub GraphQL API
- Cache results for faster repeat lookups
- Dark/Light theme toggle
MIT
Found a bug or have a suggestion? Open an issue on GitHub!
- GitHub token is server-side only — never sent to the browser
- No data collection — we don't store user data
- API calls made on-demand — real-time data from GitHub
- No third-party tracking