Cloudflare Worker that merges the functionality of the original githubchart-api, githubchart, and deno-github-contributions-api projects into a single JavaScript service. It renders a GitHub-style contribution chart as an SVG without relying on CORS proxies.
Deploy the worker and access it with the following URL format:
https://gitchart.tanjunkiat.dev/<BASE-COLOR>/<BG-COLOR>/<USER>
BASE-COLORandBG-COLORare optional hexadecimal color strings (3 or 6 characters).- If both are omitted, the default GitHub-like palette is used.
- Preset names
default,halloween, andtealmirror the legacy API behavior.
The worker code lives in gh-contri-api/src/worker.js and renders the SVG by scraping public GitHub contribution data. Color schemes mirror the original Ruby API, including custom base/background combinations and preset palettes.
Below are some sample charts rendered through the worker using the jacktan-jk account. You can use these as references for color configuration.
https://gitchart.tanjunkiat.dev/jacktan-jk
https://gitchart.tanjunkiat.dev/teal/jacktan-jk
https://gitchart.tanjunkiat.dev/halloween/jacktan-jk
https://gitchart.tanjunkiat.dev/978934/393937/jacktan-jk
- Install dependencies
cd gh-contri-api
npm install- Validate the worker syntax
npm run check- Deploy with Wrangler (requires a Cloudflare account and authentication)
wrangler publishThis project combines ideas and behavior from:
githubchart-api– original Ruby API that returns GitHub-style contribution charts as SVG.githubchart(Ruby gem) – underlying chart-generation library used by the original API.deno-github-contributions-api– Deno-based API for fetching GitHub contribution data.
All trademarks and GitHub logos or styles are the property of their respective owners. This project is not affiliated with or endorsed by GitHub.