Discover and analyze trending GitHub repositories with a beautiful, modern interface.
Live Demo · Report Bug · Request Feature
A modern web application for discovering trending GitHub repositories. Features real-time data fetching, multiple view modes, export capabilities, and a sleek dark theme interface.
| Feature | Description |
|---|---|
| Real-time Data | Live GitHub API integration for trending repositories |
| Dual View Modes | Table view for data analysis, Card view for visual browsing |
| Smart Filtering | Filter by categories, keywords, and 20+ attributes |
| Weekly & Monthly Snapshots | Curated top-20 pages refreshed on a rolling schedule, with week-over-week/month-over-month comparisons |
| Personalized Subscriptions | Pick topics of interest and submit them straight to a Google Sheet |
| Export Options | Download as CSV, JSON, or copy to clipboard |
| Dark Theme | Modern glassmorphism design with smooth animations |
| Bilingual | Full English and Chinese language support |
- Node.js 16+
- GitHub Personal Access Token (Get one here)
# Clone the repository
git clone https://github.com/encoreshao/github-trending.git
cd github-trending
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
- Navigate to Live Demo (
/demo) - Enter your GitHub token in the Settings panel
- Select the fields you want to display
- Click Fetch Data to load trending repositories
- Switch between Table and Card views
- Export your data as needed
| Route | Description |
|---|---|
/ |
Homepage with feature highlights |
/demo |
Interactive repository analysis tool |
/weekly |
Top 20 repos created in the last 30 days, refreshed every Monday |
/monthly |
Top 20 repos created in the last 90 days, refreshed on the 1st of each month |
/subscribe |
Category-based subscription setup, submits to Google Sheets |
* |
Custom 404 page for unmatched or explicitly blocked routes (see src/blockedRoutes.js) |
- Frontend: React 18, Vite, Ant Design 5
- Styling: CSS3 with glassmorphism effects
- API: GitHub REST API
- Data: axios, papaparse, file-saver
src/
├── api/ # GitHub API + Google Sheets integration
├── components/ # Reusable UI components
│ ├── Header # Navigation bar
│ ├── Footer # Site footer
│ ├── RepoTable # Table view component
│ ├── RepoCard # Card view component
│ ├── TrendingPeriodPage # Shared shell for Weekly/Monthly pages
│ └── Settings # Configuration panel
├── pages/ # Route pages
│ ├── HomePage
│ ├── DemoPage
│ ├── WeeklyPage
│ ├── MonthlyPage
│ ├── SubscriptionPage
│ └── NotFoundPage
├── blockedRoutes.js # Paths to force through the 404 page
├── locales/ # i18n translations
└── utils/ # Helper functions
For automated data collection:
# Set up environment
echo "GITHUB_TOKEN=your_token" > .env
# Run the script for a given period (defaults to daily)
node index.js --period=daily
node index.js --period=weekly
node index.js --period=monthly
# or via npm
npm run trending:daily
npm run trending:weekly
npm run trending:monthlyEach period saves a JSON + CSV snapshot named by the period's start date:
| Period | Output path | Filename |
|---|---|---|
daily |
docs/YYYY/MM/ |
YYYY-MM-DD (today) |
weekly |
docs/weekly/YYYY/MM/ |
YYYY-MM-DD (Monday of the current ISO week) |
monthly |
docs/monthly/YYYY/ |
YYYY-MM (current month) |
# Daily at 9 AM
0 9 * * * cd /path/to/github-trending && npm run trending:daily
# Weekly, Monday at 9 AM
0 9 * * 1 cd /path/to/github-trending && npm run trending:weekly
# Monthly, 1st of the month at 9 AM
0 9 1 * * cd /path/to/github-trending && npm run trending:monthlyReady-made wrappers for each cadence also live in scripts/ (run.sh, run-weekly.sh, run-monthly.sh).
Settings are automatically saved in localStorage:
- GitHub Token - Your personal access token (stored locally)
- Display Fields - Choose from 20+ repository attributes
- Page Size - Number of repos per page (1-100)
- Language - English or Chinese
The /subscribe form posts submissions to a Google Apps Script Web App, which appends them to a Google Sheet. Set the webhook URL in .env:
VITE_GOOGLE_SHEETS_WEBHOOK_URL=https://script.google.com/macros/s/.../execSee docs/subscribe-google-sheets-setup.md (local-only, not tracked in git) for the Apps Script deployment steps. Without this variable set, submissions fail with a clear error instead of silently doing nothing.
| Basic | URLs | Dates | Stats |
|---|---|---|---|
| Name | HTML URL | Created | Stars |
| Owner | Git URL | Updated | Forks |
| Avatar | SSH URL | Pushed | Issues |
| Description | Clone URL | Size | |
| Topics | SVN URL | Language | |
| License | Homepage |
| Issue | Solution |
|---|---|
| Rate limit exceeded | Ensure valid GitHub token with public_repo scope |
| No data returned | Verify token and network connectivity |
| Build errors | Run rm -rf node_modules && npm install |
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
Made with ❤️ by RanBOT Labs