Skip to content

CircuitVerse/community-dashboard

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub Activity Leaderboard

Build Status License Contributors


๐Ÿ“Š GitHub Stats

GitHub Stats


โœจ Features

  • ๐Ÿ“Š Weekly, Monthly, and Yearly leaderboards
  • ๐Ÿ” Search and filter contributors
  • ๐ŸŽจ Dark/Light mode support
  • ๐Ÿ“ฑ Mobile responsive
  • ๐Ÿ† Top contributors by activity type
  • ๐Ÿ“ˆ Activity trend charts

๐Ÿ“ธ Screenshots

Leaderboard View (Light Mode)

Leaderboard Light Mode

Leaderboard View (Dark Mode)

Leaderboard Dark Mode

Mobile Responsive View

Mobile View

Empty State UI

Empty State


๐Ÿ”— Quick Links


๐Ÿ Overview

This project powers the CircuitVerse Leaderboard, which ranks contributors based on their GitHub activity such as:

  • Pull Requests opened
  • Pull Requests merged
  • Issues opened

๐Ÿ‘‰ GitHub Actions periodically fetch GitHub data and generate static JSON files, which are then committed to the repository and served directly by the frontend.

This approach is:

  • Fast
  • Reliable
  • Rate-limit friendly
  • Easy to maintain

๐Ÿง  Key Design Decisions

  • โœ… Static JSON generated by GitHub Actions
  • โœ… Frontend only reads pre-generated data
  • โœ… Bots are excluded from scoring

๐Ÿงฑ Tech Stack

  • Next.js (App Router)
  • TypeScript
  • GitHub Actions
  • GitHub REST API
  • Tailwind CSS

๐Ÿ“ Project Structure (relevant parts)

app/
  leaderboard/
    page.tsx
    [period]/
      page.tsx
  api/
    people/
      route.ts
  layout.tsx

components/
  Leaderboard/
    LeaderboardView.tsx
    ActivityTrendChart.tsx
    stats-card/
      active-contributors.tsx
      activity-line-card.tsx
      activity-types.tsx
  people/
    ContributorCard.tsx
    ContributorDetail.tsx
    PeopleGrid.tsx
    SearchFilter.tsx

lib/
  leaderboard.ts
  db.ts
  utils.ts

public/
  leaderboard/
    week.json
    month.json
    year.json
    recent-activities.json

scripts/
  generateLeaderboard.ts
  get-theme.ts

types/
  db.ts

.github/
  workflows/
    leaderboard.yml

๐Ÿงฎ Scoring Model (current)

Activity Points
PR Merged 5
PR opened 2
Issue opened 1
PR reviewed 4

PR reviews and label triaging are intentionally excluded for now and will be added via separate issues.


โฑ Update & Refresh Model

The leaderboard is updated automatically using GitHub Actions.

  • Runs every 24 hours
  • Can be triggered manually

โš™๏ธ How It Works

GitHub Actions
      |
      v
Fetch GitHub API data
      |
      v
Generate JSON files
(public/leaderboard/*.json)
      |
      v
Commit JSON back to repo
      |
      v
Next.js frontend reads JSON

๐Ÿ“„ Generated JSON Format

{
  "period": "month",
  "updatedAt": 1734090000000,
  "entries": []
}

๐Ÿšซ Bot Filtering

Bot accounts such as dependabot[bot], github-actions[bot], and any user ending with [bot] are excluded.


๐Ÿ” Environment Setup (for local data generation)

Create a .env.local file in the project root and add:

GITHUB_TOKEN=ghp_your_token_here

This token is only required if you want to fetch and generate leaderboard data locally.


๐Ÿš€ Local Development

npm install
npm run dev

๐Ÿงช Generate Data Locally (optional)

export GITHUB_TOKEN=ghp_your_token_here
npx tsx scripts/generateLeaderboard.ts

๐Ÿค Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/xyz
  3. Commit with conventional messages
  4. Open a PR Please keep changes small and add context in PR description. For questions, Contact on slack.

Demo Site

https://cv-community-dashboard.netlify.app/

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.3%
  • CSS 1.6%
  • JavaScript 0.1%