{"id":48245252,"url":"https://github.com/meugenom/github-leetcode-stats","last_synced_at":"2026-04-04T20:33:56.292Z","repository":{"id":65408742,"uuid":"590036649","full_name":"meugenom/github-leetcode-stats","owner":"meugenom","description":"GitHub and LeetCode Stats Generator for README.md","archived":false,"fork":false,"pushed_at":"2026-03-26T00:19:02.000Z","size":2964,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-26T22:33:31.696Z","etag":null,"topics":["generated","github-stats","readme"],"latest_commit_sha":null,"homepage":"https://github.com/meugenom/github-leetcode-stats","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meugenom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-17T14:18:16.000Z","updated_at":"2026-03-26T00:19:06.000Z","dependencies_parsed_at":"2025-12-16T07:00:30.082Z","dependency_job_id":null,"html_url":"https://github.com/meugenom/github-leetcode-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meugenom/github-leetcode-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fgithub-leetcode-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fgithub-leetcode-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fgithub-leetcode-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fgithub-leetcode-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meugenom","download_url":"https://codeload.github.com/meugenom/github-leetcode-stats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meugenom%2Fgithub-leetcode-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generated","github-stats","readme"],"created_at":"2026-04-04T20:33:55.650Z","updated_at":"2026-04-04T20:33:56.276Z","avatar_url":"https://github.com/meugenom.png","language":"JavaScript","readme":"[![README build](https://github.com/meugenom/github-leetcode-stats/actions/workflows/main.yml/badge.svg)](https://github.com/meugenom/github-leetcode-stats/actions/workflows/main.yml)\n\n### GitHub and LeetCode Stats Generator\n\nThis repository contains a tool that generates dynamically updated statistics \nfor your GitHub profile and LeetCode account.\n\nlast automatic update: Saturday, 4 April at 02:17 CEST\n\n![chart-bar](/assets/github-total-bicycle.svg)\n\n![chart-bar](/assets/github-languages-pie-chart.svg)\n\n![chart-bar](/assets/github-languages-sledge.svg)\n\n![chart-bar](/assets/leetcode-total-info-circle.svg)\n\n-----------------------\n\n## About this project\nThe idea of this project was to write a script that could display statistics about projects on GitHub and statistics from Leetcode. The challenge was to present this information in the form of a graph in the README.md file. In reality, README.md supports embedding HTML code, but it can be quite cumbersome when trying to create a graph and insert it into the documentation file. Therefore, an alternative approach was chosen where the script would periodically retrieve the latest statistics using API requests and generate an SVG file, which can be displayed nicely in the README.md file.\n\n-----------------------\n\n### Features:\n\n- Generates a chart showing your GitHub contributions\n- Generates a chart showing your GitHub language usage\n- Generates a chart showing your LeetCode statistics\n- Runs automatically every 6 hours through a GitHub Action\n- Supports generated color\n\n### Code Structuring:\n\n- Entry point in the file `src/index.js`.\n- The file `simple.env` is used to run the script locally. It needs to be renamed to `.env` and requires the addition of a GitHub token from step 2 of \"How to Use:\"\n- The file `main.mustache.simple` needs to be renamed to `main.mustache`.\n- The file `src/config.js` contains a set of colors and parameter names for searching information on GitHub and LeetCode.\n- The file `utils/utils.js` contains a set of utility functions.\n- The files `src/generators/*.js` contain builders that assemble the code of SVG files.\n- The files `src/services/*.js` use requests to the GitHub and LeetCode websites to retrieve up-to-date information.\n- The files in `src/templates/` serve as static components for constructing SVG files.\n\n### How to Use:\n\n1. Fork this repository.\n\n2. Generate a new Personal Access Token (classic) on GitHub and name it `GH_TOKEN`. Save the token for later use.\n\n    2.1 We're on the GitHub website, and at the top left, you see your avatar. Click and select `Settings`;\n    2.2 In the right sidebar choose `Developer Settings`, click on it;\n    2.3 Select \"Personal access tokens,\" and then \"Tokens (classic).\";\n    2.4 Click `Generate new token`    \n    \u003cimg width=\"1268\" alt=\"Screenshot 2023-06-19 at 10 32 39\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/9a2a9459-d549-447c-bc01-0434e1c27e4b\"\u003e\n    2.5 Name this token as GH_TOKEN and choose settings:\n        - repo (all)\n        - workflow\n        - write: packages\n        - notifications\n        - user: read:user\n        \u003cimg width=\"1221\" alt=\"Screenshot 2023-06-19 at 10 34 41\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/59ae0b89-3838-4fac-9ef9-8ece6500d8d5\"\u003e\n        \u003cimg width=\"1168\" alt=\"Screenshot 2023-06-19 at 10 34 58\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/ea560b04-5162-4aae-b585-5b109d01e172\"\u003e\n    2.6 Save this new created token in the memory or localy \n    \u003cimg width=\"1197\" alt=\"Screenshot 2023-06-19 at 10 35 44\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/dc76533f-54c8-4877-a63f-abb86d38002b\"\u003e    \n    2.7 Finally you can see your token in the tokens list\n    \u003cimg width=\"1190\" alt=\"Screenshot 2023-06-19 at 10 36 25\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/d21cce0e-47d2-4276-be86-5f840d5d2819\"\u003e\n\n3. Create a new secret named `GH_TOKEN` in your repository's settings under \"Secrets and Variables\" with your `GH_TOKEN` value.\n\n    3.1 Open page on your repo and choose Settings\n    \u003cimg width=\"1267\" alt=\"Screenshot 2023-06-19 at 10 36 42\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/1e36402b-67c2-48e3-b6f1-712e99e41270\"\u003e\n    3.2  In opened page  please see right sidebar and choose `Secrets and Variables`\n    \u003cimg width=\"1227\" alt=\"Screenshot 2023-06-19 at 10 36 54\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/af1c216a-bb46-4d81-9050-2f2388bd74d0\"\u003e\n    3.3 Create new secret\n    \u003cimg width=\"1241\" alt=\"Screenshot 2023-06-19 at 10 37 08\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/dfc9b859-fefc-4b96-b611-15d6aab05424\"\u003e\n    3.4 Name this secret as GH_TOKEN and put you saved token ghp_HY....... to the Secret... and click \"Add Secret\"\n    \u003cimg width=\"1252\" alt=\"Screenshot 2023-06-19 at 10 38 02\" src=\"https://github.com/meugenom/github-leetcode-stats/assets/26843480/e32a6d12-f49a-41c6-ba3b-6f66fb8ad207\"\u003e\n\n4. Edit the `./src/config.js` file to include your GitHub and LeetCode usernames.\n\n5. Delete my template mustache file `main.mustache` and rename `main.mustache.simple` to `main.mustache`. \n`main.mustache.simple` presents Date values and generated svg charts: bicycle, sledge, circles. You can edit this file as you see fit.\n\n6. The actions will run automatically every 6 hours. You can see it in `.github/workflows/mail.yml`\n\n! When you want to start this script locally, need to create a `.env` file in your forked repository and copy the contents from `simple.env`. Add the `GH_TOKEN`, that generated in step 2 to the `.env` file.\n\n### Dependencies:\n- [Node v16.14.2 (LTS)](https://nodejs.org/en/blog/release/v16.14.2/)\n- [Javascript v. ES5](https://262.ecma-international.org/5.1/)\n- [Mustache Template System v.4.2.0.](https://www.npmjs.com/package/mustache)\n- [Promise based HTTP and GraphQL client axios v.0.27.2](https://www.npmjs.com/package/axios)\n- [Zero-dependency module that loads environment variables from a .env file into process.env v.16.0.3](https://www.npmjs.com/package/dotenv)\n- [Github Action Workflow Script YML](https://docs.github.com/en/actions/learn-github-actions/essential-features-of-github-actions)\n\n\n### Future Plans:\n- Adding more animated SVG and statistics\n- Support more color palletes\n\n### Author\n\nThis project was created by [meugenom](https://meugenom.com)\n\n-----------------------\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeugenom%2Fgithub-leetcode-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeugenom%2Fgithub-leetcode-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeugenom%2Fgithub-leetcode-stats/lists"}