A comprehensive Next.js web application for visualizing GitHub repository activity across the Prebid ecosystem. Track contributors, companies, pull requests, issues, and development trends with interactive charts and real-time statistics.
- Real-time repository statistics for 6 Prebid repositories
- Interactive time-series charts with automatic granularity
- Dark/Light theme support with system preference detection
- Responsive design optimized for all screen sizes
- Repository cards showing Open PRs, Merged PRs, Opened Issues, and Contributors
- Time-series bar charts with merged PRs, contributors, and issues
- Automatic chart granularity based on time range selection
- Smart date filtering (no future dates shown)
- Dual Y-axes for better scale visualization
- Horizontal stacked bar charts showing top contributors
- Filter by repository, metric, and time range
- Adjustable result limit (5-1000 contributors)
- Metrics: Open PRs, Merged PRs, Reviewed PRs, Commits, Issues
- X-axis positioned at top for better visibility
- Company-level aggregation of contributor data
- Member/Non-member filtering
- Shows contributor count per company
- Same powerful filtering as Contributors page
- Automatic mapping from GitHub usernames to company affiliations
The dashboard aggregates data from multiple sources:
- GitHub API Data: Open PRs, merged PRs, issues stored in
store/repos/
- Contributor Statistics: Time-series data aggregated by week/month/year
- Company Mapping: GitHub username to company affiliation mapping
- Node.js 18+
- npm or yarn
- GitHub personal access token (for data fetching)
- Clone the repository:
git clone https://github.com/yourusername/repo-activity-dashboard.git
cd repo-activity-dashboard
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env.local
# Add your GitHub token and other configs
- Generate initial data:
npm run generate:stats
npm run process:mapping
- Start the development server:
npm run dev
Visit http://localhost:3000
to see the dashboard.
src/
โโโ app/ # Next.js App Router pages
โ โโโ page.tsx # Main dashboard
โ โโโ contributors/ # Contributors view
โ โโโ companies/ # Companies view
โโโ components/ # React components
โ โโโ HorizontalBarChart.tsx
โ โโโ layout/toolbar.tsx
โโโ scripts/ # Data processing scripts
โ โโโ generateContributorStats.ts
โ โโโ processGithubMapping.ts
โโโ services/ # GitHub API services
store/ # Data storage
โโโ repos/ # Repository data
โโโ sheets/ # Company mappings
- This Week/Last Week: Daily granularity
- This Month/Last Month: Weekly granularity
- This Year/Last Year: Monthly granularity
- All Time: Yearly granularity
- Open PRs: Currently open pull requests
- Merged PRs: Pull requests merged in the time period
- Opened Issues: Issues created in the time period
- Contributors: Unique contributors (PR authors + issue creators)
- Commits: Total commits in merged PRs
- Reviewed PRs: Pull requests reviewed by contributors
- Automatically maps GitHub usernames to companies
- Distinguishes between member and non-member organizations
- Aggregates statistics at the company level
npm run dev # Start development server with Turbopack
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run typecheck # TypeScript checking
# Data generation
npm run generate:stats # Generate contributor statistics
npm run process:mapping # Process company mappings
- Framework: Next.js 14 with App Router and Turbopack
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- Charts: Recharts with custom configurations
- State: React hooks
- Theme: next-themes
- Data Processing: Node.js scripts with csv-parse
- GitHub API data fetched and stored in JSON files
- Contributor statistics generated from stored data (tracks PR authors, not mergers)
- Company mappings processed from CSV (Google Sheets export)
- Dashboard reads and visualizes the processed data
- Time-series aggregation at weekly/monthly/yearly levels
store/
โโโ index.json # Master index
โโโ repos/
โโโ prebid-js/
โ โโโ open-prs.json # Currently open PRs
โ โโโ open-issues.json # Currently open issues
โ โโโ merged/ # Merged PRs by month
โ โ โโโ YYYY-MM.json
โ โโโ closed/ # Closed issues by month
โ โโโ YYYY-MM.json
โโโ [other-repos]/
- Automated data refresh via GitHub Actions
- Real-time updates via webhooks
- Database integration for better performance
- API endpoints for external consumption
- Set up automated data refresh (GitHub Actions or cron)
- Implement authentication for sensitive data
- Configure environment variables
- Set up monitoring and analytics
- Optimize data loading for large datasets
- Add caching layer for improved performance
- Vercel: Optimized for Next.js (recommended)
- AWS: Using Amplify or EC2
- Docker: Containerized deployment
GITHUB_TOKEN=your_github_token
NEXT_PUBLIC_API_URL=your_api_url
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Real-time Updates: Data requires manual regeneration
- Daily Data: Limited availability for recent periods
- Large Datasets: Performance optimization needed for repositories with 1000+ items
- โ Fixed contributor tracking (now tracks PR authors)
- โ Added company mapping integration
- โ Improved date handling and filtering
- Authentication system
- Automated data pipeline
- Performance optimizations
- Deployment configuration
- Caching implementation
- Real-time updates
- Advanced filtering
- Export functionality
- API for external access
- Multi-organization support
- Custom dashboards
- Alerting system
- Historical comparisons
This project is licensed under the MIT License - see the LICENSE file for details.
- Prebid.org community for the ecosystem
- Contributors and maintainers
- Open source libraries used in this project
For questions or support, please open an issue on GitHub.
Built with โค๏ธ for the Prebid community