A React-based dashboard for visualizing pull request statistics and metrics for the Aboard project. Displays merged PRs, code changes, and trends over time with interactive charts and filters.
- 📊 PR Statistics: View total merged PRs, lines added, and lines removed
- 📈 Time-based Visualizations:
- Cumulative PRs over time (area chart)
- PRs per month (bar chart)
- Code changes (additions/deletions) over time
- ⏱️ Time Range Filters: Filter data by 7 days, 30 days, 6 weeks, 3 months, 6 months, 1 year, or all time
- 🔗 Recent PRs: Quick access to the 10 most recently merged PRs with links
- Node.js (v18 or higher)
- GitHub CLI (
gh) installed and authenticated - Access to the GitHub repository you want to query
- Install dependencies:
npm install- Ensure GitHub CLI is authenticated:
gh auth login- (Optional) Set the GitHub repository to query:
export GITHUB_REPO=owner/repoIf not set, defaults to Teamtailor/aboard.
Start both the API server and Vite dev server:
npm startOr run them separately:
# Terminal 1: API server (runs on http://localhost:3002)
# Set GITHUB_REPO environment variable if needed
GITHUB_REPO=owner/repo npm run server
# Terminal 2: Vite dev server (runs on http://localhost:5173)
npm run devBuild for production:
npm run buildPreview the production build:
npm run previewThe dashboard consists of two parts:
-
API Server (
server.js): A Node.js HTTP server that fetches PR data from GitHub using the GitHub CLI (gh pr list) and serves it as JSON athttp://localhost:3002/api/prs -
React Frontend: A Vite + React application that fetches PR data from the API and displays it using Recharts for visualizations
- React 19 - UI framework
- Vite - Build tool and dev server
- Recharts - Chart library for data visualization
- date-fns - Date formatting and manipulation
- GitHub CLI - Fetching PR data from GitHub
GITHUB_REPO- GitHub repository in formatowner/repo(default:Teamtailor/aboard)
Example:
export GITHUB_REPO=myorg/myrepo
npm run serverGET /api/prs- Returns JSON with PR data including number, title, URL, merge date, additions, and deletions