A static Astro site for ranking GitHub creators by programming-language-specific repository stars.
Phase 1 focuses on TypeScript and keeps the architecture extensible for more languages and countries.
npm install
npm run data:generate
npm run data:sync-user-ranks
npm run build
npm run devDeploy static sitebuilds and deploys the committedpublic/datafiles to GitHub Pages. It runs on pushes tomainand manual dispatch.Refresh ranking dataruns twice daily at Beijing 06:17 and 18:17. It runs the GitHub crawler, syncs user profile ranks from the generated ranking JSON, commits those data files back tomain, and dispatches the deploy workflow when data changes.
Generated static JSON lives in public/data/:
meta.jsonlists available languages and countries.languages/<language>.jsoncontains global rankings.countries/<country>/<language>.jsoncontains country rankings.users/<login>.jsoncontains creator profile pages.
The crawler uses the GitHub public API. Set GITHUB_TOKEN for higher rate limits.
Useful environment variables:
GITHUB_TOKEN=...
LANGUAGES=TypeScript
TARGET_USERS=formulahendry
MIN_STARS=100
MAX_STARS=250000
DISCOVER_RANKINGS=true
SEARCH_PAGES=10
SEARCH_BUCKET_LIMIT=50
OWNER_PROFILE_LIMIT=1000
GLOBAL_LIMIT=500
COUNTRY_LIMIT=200The crawler splits GitHub Search by star buckets when a query exceeds GitHub's 1,000-result search cap. API responses are cached in .cache/github-api/, and refresh checkpoints are stored in .cache/state/, so interrupted runs can resume without re-fetching completed requests or reprocessing completed buckets.
Set DISABLE_GITHUB_CACHE=true to bypass the API cache, or RESET_REFRESH_STATE=true to restart bucket processing from scratch. The refresh workflow restores .cache/ with GitHub Actions cache and retries rate-limited API requests with backoff.
The country ranking uses public GitHub profile location text and is therefore approximate.