A real-time leaderboard that tracks open source contributions (PRs and issues) across your GitHub organization. Built with Node.js, Express, and vanilla frontend.
- Tracks open PRs, merged PRs, and issues per contributor across all repos in a GitHub org
- Updates automatically in the background — no manual refresh needed
- Contributors can be added before they've made their first contribution
- Built-in admin panel for managing the contributor list
- REST API for programmatic access to leaderboard data
You need: Node.js (v12+) and a GitHub personal access token.
# 1. Clone and enter the project
git clone https://github.com/RocketChat/Opensource-Contribution-Leaderboard.git
cd Opensource-Contribution-Leaderboard
# 2. Create your config
cp src/server/config-example.json src/server/config.json
cp src/server/.env.example src/server/.envEdit src/server/.env with your static settings:
AUTH_TOKEN=ghp_YOUR_GITHUB_TOKEN
ORGANIZATION=YourOrg
ORGANIZATION_HOMEPAGE=https://yourorg.com/
ORGANIZATION_GITHUB_URL=https://github.com/YourOrg
ADMIN_PASSWORD=pick-something-better
SERVER_PORT=62050Edit src/server/config.json with dynamic/runtime values:
{
"delay": "10",
"startDate": "2025-06-01",
"contributors": ["contributor1", "contributor2"],
"includedRepositories": ["Repo1", "Repo2"]
}Then:
# 3. Install everything
npm run add
# 4. Build and run
NODE_OPTIONS=--openssl-legacy-provider npm run build
cd dist/server
node app.jsOpen http://localhost:8080 — you're done.
Static settings live in .env:
| Env Variable | What it is |
|---|---|
AUTH_TOKEN |
GitHub personal access token (repo read access) |
ORGANIZATION |
Your GitHub org name |
ORGANIZATION_HOMEPAGE |
Org homepage URL |
ORGANIZATION_GITHUB_URL |
Org GitHub URL |
ADMIN_PASSWORD |
Password for the admin panel |
SERVER_PORT |
Internal backend port (default 62050) |
Dynamic settings live in config.json (modifiable via admin panel):
| Key | What it is |
|---|---|
delay |
Seconds between API calls per contributor (respect rate limits) |
startDate |
Filter contributions from this date onwards |
contributors |
Array of GitHub usernames to track |
includedRepositories |
Repos to include in contribution tracking |
Two terminals:
# Terminal 1 — frontend with hot reload
NODE_OPTIONS=--openssl-legacy-provider npm start
# Terminal 2 — backend server
npm run serveFrontend at http://localhost:8080. Backend data won't refresh without terminal 2.
To work on the admin panel, add a third terminal:
cd admin && npm startEndpoints for programmatic access:
GET /api/stats— total contributors, open PRs, merged PRs, issuesGET /api/rank— ranked contributor list (sortable bymergedprs,openprs,issues)GET /api/contributor— contributor details by username or rank
Full documentation in REST-API.md.
app.jsstarts Express on port 8080 and spawnsrefresh.jsas a background processrefresh.jsloops through yourcontributorslist, calling the GitHub API for each- Results are written to
src/assets/data/data.json— no database needed - The frontend and REST API both read from
data.json, so they're always in sync - Real-time updates are pushed to connected clients via socket.io
This project is set up for AI-assisted development. See:
- AGENTS.md — context for any AI coding agent (Copilot, Cursor, Windsurf, Cline, etc.)
- GEMINI.md — context for Google Gemini
These files give AI agents the full project layout, design decisions, and ground rules so they can help without breaking things.
This project is open source under the Licence MIT.
