sallar /github-contributions-chart

:octocat: Generate an image of all your Github contributions

★ 5,614⑂ 269👁 19⑃ 105● 73▤ 0
JavaScriptMITCreated 2018-04-29github-contributions.vercel.app
+2
Daily
5,614
stars
269
forks
19
watchers
105
prs
73
issues
0
releases

README

:octocat: GitHub Contribution Chart Generator 

Generates an image of all your GitHub contributions since you have signed up, so you can use it in social media.

The API for this project lives in the src/pages/api directory since GitHub doesn't provide a way to access user statistics through it's official API.

The drawing mechanism lives in the sallar/github-contributions-canvas repository.

 Requirements

- Node.js 24 (see .nvmrc) and Yarn 1.22.22.
- A valid github account.
- Open activity in setting (Settings  Public profile  Contributions & Activity).
  - [ ] Make profile private and hide activity

 Install

Enable Yarn with Corepack and install the locked dependencies:


$ corepack enable
$ yarn install --frozen-lockfile


 How to run

Running locally:


$ yarn dev


 Deployment

This project is deployed on Vercel. The Node.js runtime is
pinned to 24.x in package.json.

Build and run the production server locally:


$ yarn build
$ yarn start


 Tests

Browser checks cover responsive controls, keyboard theme selection, chart rendering,
PNG/JSON downloads, and missing profiles in Chromium and mobile WebKit, in light and dark mode.
Contribution responses are fixtures so the checks do not depend on GitHub availability.
API tests verify calendar date ranges and flat/nested JSON using HTML fixtures.


$ yarn playwright install --with-deps chromium webkit
$ yarn test:api
$ yarn build
$ yarn test


CI runs the same production build and browser checks on pull requests.

 Adding themes

Add your theme to sallar/github-contribution-canvas repo and also send a PR here to add the name of the theme to the list.

 Example


  


 Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

 Changelog

Every release, along with the migration instructions, is documented on the GitHub Releases page.

 License

MIT license

Top issues

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON