Skip to content

feat(web): add contributor leaderboard page#592

Merged
Harxhit merged 4 commits into
Dev-Card:mainfrom
Harxhit:feat/contributor-leaderboard
Jun 23, 2026
Merged

feat(web): add contributor leaderboard page#592
Harxhit merged 4 commits into
Dev-Card:mainfrom
Harxhit:feat/contributor-leaderboard

Conversation

@Harxhit

@Harxhit Harxhit commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a Contributor Leaderboard to the web app (apps/web) as a new /leaderboard route and references it from the README Contributors section.

The leaderboard is now generated automatically via a GitHub Actions workflow and served as a static JSON file, eliminating GitHub API rate-limit issues in the client.

The page displays:

  • Contributor avatar image and GitHub username
  • Issues created
  • Merged PRs
  • Open PRs
  • Ranking by merged PRs → issues → open PRs

Maintainer accounts (@ShantKhatri, @Harxhit, @blankirigaya) and bot accounts are excluded from the leaderboard.

Changes

  • apps/web/src/pages/LeaderboardPage.tsx

    • Added leaderboard page
    • Switched from direct GitHub API requests to consuming generated leaderboard data from /leaderboard.json
  • apps/web/src/App.tsx

    • Added /leaderboard route
  • apps/web/public/leaderboard.json

    • Generated leaderboard data consumed by the frontend
  • .github/workflows/update-leaderboard.yml

    • New workflow to regenerate leaderboard data on a schedule and on demand
  • .github/scripts/generateLeaderboard.js

    • Aggregates contributor statistics and writes leaderboard data
  • README.md

    • Added leaderboard reference in the Contributors section

Notes

  • Leaderboard data is generated by GitHub Actions instead of being fetched from the GitHub API in the browser.
  • This removes GitHub Search API rate-limit issues and reduces page load time.
  • The workflow can be triggered manually using workflow_dispatch and also runs automatically on a schedule.

Testing

Local

  1. Create or generate:

    apps/web/public/leaderboard.json
[
  {
    "login": "Harxhit",
    "avatarUrl": "https://github.com/Harxhit.png",
    "profileUrl": "https://github.com/Harxhit",
    "mergedPrs": 42,
    "openPrs": 3,
    "issues": 12
  },
  {
    "login": "octocat",
    "avatarUrl": "https://github.com/octocat.png",
    "profileUrl": "https://github.com/octocat",
    "mergedPrs": 10,
    "openPrs": 2,
    "issues": 5
  }
]
  1. Start the web app:

    npm dev
  2. Verify:

    http://localhost:5173/leaderboard.json

    returns valid JSON.

  3. Verify:

    http://localhost:5173/leaderboard

    renders the leaderboard correctly.

GitHub Actions

  1. Open the Actions tab.
  2. Run Update Leaderboard manually.
  3. Confirm the workflow completes successfully.
  4. Verify apps/web/public/leaderboard.json is updated and committed.
  5. Verify the deployed leaderboard reflects the updated data.

Proof

2026-06-22_09-41-43

Note:

This is not an actual representation(fake data).

Add a /leaderboard route to apps/web that ranks repo contributors by
merged PRs, issues created, and open PRs (data from the GitHub API),
showing each contributor's avatar and GitHub username. Mention the
route in the README Contributors section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

@Harxhit is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. web labels Jun 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Harxhit,

Thanks for opening this pull request.

This PR has been automatically classified based on the files modified.

Applied Labels

  • gssoc:approved
  • web

Primary Review Area

  • web

Reviewer

@ShantKhatri has been identified as the primary reviewer for this pull request.

If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer.

Thank you for your contribution!

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

CI — All Checks Passed

Backend — SKIP

Check Result
Lint -
Test -
Typecheck -

Mobile — SKIP

Check Result
Lint -
Test -

Web — PASS

Check Result
Build PASS

Last updated: Mon, 22 Jun 2026 04:16:01 GMT

@ShantKhatri ShantKhatri self-requested a review June 18, 2026 18:14
@ShantKhatri

Copy link
Copy Markdown
Collaborator

Hi @Harxhit , the API is not rate limiting most of the time:
image

Comment thread apps/web/src/pages/LeaderboardPage.tsx Outdated
Comment thread apps/web/src/pages/LeaderboardPage.tsx Outdated
@Harxhit Harxhit requested a review from ShantKhatri June 22, 2026 04:13
@Harxhit Harxhit removed the request for review from ShantKhatri June 23, 2026 07:13
@Harxhit Harxhit dismissed ShantKhatri’s stale review June 23, 2026 07:14

Changes are already addressed.

@Harxhit Harxhit merged commit b326f06 into Dev-Card:main Jun 23, 2026
5 of 6 checks passed
@Harxhit Harxhit added documentation Improvements or additions to documentation level:critical High-impact or difficult contribution affecting core functionality. (+80 pts) quality:exceptional Outstanding contribution with excellent implementation quality. (×1.5 multiplier) type:design UI/UX or design improvements (+10 pts) type:devops CI/CD, infra, deployment, workflow work (+15 pts) type:performance Performance optimization (+15 pts) type:docs Documentation-related contribution (+5 pts) labels Jun 23, 2026
ShantKhatri pushed a commit to ShantKhatri/DevCard that referenced this pull request Jun 23, 2026
* feat(web): add contributor leaderboard page

Add a /leaderboard route to apps/web that ranks repo contributors by
merged PRs, issues created, and open PRs (data from the GitHub API),
showing each contributor's avatar and GitHub username. Mention the
route in the README Contributors section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: generate leaderboard data via GitHub Actions

* feat: Leaderboard yaml

* fix: Updated leaderboard script

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. level:critical High-impact or difficult contribution affecting core functionality. (+80 pts) quality:exceptional Outstanding contribution with excellent implementation quality. (×1.5 multiplier) type:design UI/UX or design improvements (+10 pts) type:devops CI/CD, infra, deployment, workflow work (+15 pts) type:docs Documentation-related contribution (+5 pts) type:performance Performance optimization (+15 pts) web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants