{"id":26905148,"url":"https://github.com/jimdo/components-stats","last_synced_at":"2025-09-07T00:33:46.074Z","repository":{"id":61454365,"uuid":"535716039","full_name":"Jimdo/components-stats","owner":"Jimdo","description":"Collect stats about UI components usage across the GitHub org","archived":false,"fork":false,"pushed_at":"2025-08-04T07:33:56.000Z","size":1525,"stargazers_count":8,"open_issues_count":7,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-04T10:53:27.164Z","etag":null,"topics":["design-system","github-api","hacktoberfest","npm","owner-ux-platform","react","ui","ui-components"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jimdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-09-12T14:50:54.000Z","updated_at":"2025-08-04T07:30:13.000Z","dependencies_parsed_at":"2025-08-04T09:13:20.323Z","dependency_job_id":"8f03c136-4267-40ee-8eaf-509405b50402","html_url":"https://github.com/Jimdo/components-stats","commit_stats":{"total_commits":137,"total_committers":3,"mean_commits":"45.666666666666664","dds":"0.16788321167883213","last_synced_commit":"101fba86d3d666d1e174c62335fdf0f4ce5efade"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Jimdo/components-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fcomponents-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fcomponents-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fcomponents-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fcomponents-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jimdo","download_url":"https://codeload.github.com/Jimdo/components-stats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fcomponents-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273983017,"owners_count":25202092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["design-system","github-api","hacktoberfest","npm","owner-ux-platform","react","ui","ui-components"],"created_at":"2025-04-01T10:56:14.291Z","updated_at":"2025-09-07T00:33:46.030Z","avatar_url":"https://github.com/Jimdo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jimdo/components-stats\n\n[![npm package][npm-img]][npm-url]\n[![Build Status][build-img]][build-url]\n[![Downloads][downloads-img]][downloads-url]\n[![Issues][issues-img]][issues-url]\n[![Commitizen Friendly][commitizen-img]][commitizen-url]\n\nCollect usage statistics for any npm package exposing React UI components, across a GitHub organization.\nInspired by [Twilio.com blogpost](https://www.twilio.com/blog/insights-metrics-inform-paste-design-system).\n\n## Purpose\n\nThe aim is to provide better understanding of Design System or other shared UI libraries usage across the organization.\nThis tool will facilitate things such as: deprecation of unused components and props, detection of misuse, set-up of alerts.\n\n## Compiling \u0026 Running Locally\n\nCreate a **config.json** file based on `config.example`.\n\nA GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with scope `repo` is required, to access the `org` private repositories through GitHub APIs.\n\nUsage for `pkgName` will be analyzed across `org`, excluding repositories that did not receive any commit in the last `daysUntilStale` days.\nBe patient, this will take some time.\n\nThe list of repositories having `pkgName` as dependency is collected through the [**package-adoption**](https://github.com/Jimdo/package-adoption) npm module.\n\nOmit `components` to report all components.\n\n\u003e [!WARNING]\n\u003e The script will clone all the eligible repositories locally and use them as source for [react-scanner](https://github.com/moroshko/react-scanner). If a repository already exists locally, it will update it with a `git pull`.\n\n```bash\n\n# Install dependencies using npm\n$ \u003e npm i\n\n# Start\n$ \u003e npm start\n```\n\n## Results\n\nThe script outputs:\n\n- a `pkgAdoption.json` file with the list of repositories that include `pkgName` as a dependency.\n\n- two `reports_by_repo` folders with one `scanner-report_[repo_name_subdir].json` file for each repository. Each file is a report with the usage of React components exposed by the `pkgName` library.\n  [react-scanner](https://github.com/moroshko/react-scanner) is used to produce two kind of reports: one with the [count-components-and-props](https://www.npmjs.com/package/react-scanner#count-components-and-props) processor and one with the [raw-report](https://www.npmjs.com/package/react-scanner#raw-report) processor, reporting all the props values.\n\n## Install\n\n```bash\nnpm install @jimdo/components-stats\n```\n\n## Usage\n\n```ts\nimport { scanOrg } from '@jimdo/components-stats';\n\nconst config = {\n  org: 'github_org_name',\n  pkgName: '@org/package',\n  ghAuthToken: 'github_auth_token',\n  daysUntilStale: '730',\n  components: { Accordion: true, Button: true },\n};\n\nawait scanOrg(config);\n```\n\n[build-img]: https://github.com/jimdo/components-stats/actions/workflows/release.yml/badge.svg\n[build-url]: https://github.com/jimdo/components-stats/actions/workflows/release.yml\n[downloads-img]: https://img.shields.io/npm/dt/@jimdo/components-stats\n[downloads-url]: https://www.npmtrends.com/@jimdo/components-stats\n[npm-img]: https://img.shields.io/npm/v/@jimdo/components-stats\n[npm-url]: https://www.npmjs.com/package/@jimdo/components-stats\n[issues-img]: https://img.shields.io/github/issues/jimdo/components-stats\n[issues-url]: https://github.com/jimdo/components-stats/issues\n[commitizen-img]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg\n[commitizen-url]: http://commitizen.github.io/cz-cli/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fcomponents-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimdo%2Fcomponents-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fcomponents-stats/lists"}