{"id":27949387,"url":"https://github.com/comfy-org/download-data","last_synced_at":"2025-08-26T12:13:07.490Z","repository":{"id":290128917,"uuid":"973307286","full_name":"Comfy-Org/download-data","owner":"Comfy-Org","description":"A simple dashboard to track daily download counts for the portable version of ComfyUI.","archived":false,"fork":false,"pushed_at":"2025-08-25T10:53:21.000Z","size":410,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T12:41:36.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://comfyui-download-statistics.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Comfy-Org.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}},"created_at":"2025-04-26T17:52:17.000Z","updated_at":"2025-08-25T10:53:24.000Z","dependencies_parsed_at":"2025-05-03T22:26:58.517Z","dependency_job_id":"f3706b01-ee51-43d2-9b77-f2bf8eab7976","html_url":"https://github.com/Comfy-Org/download-data","commit_stats":null,"previous_names":["benceruleanlu/comfyui-download-data","comfy-org/download-data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Comfy-Org/download-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comfy-Org%2Fdownload-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comfy-Org%2Fdownload-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comfy-Org%2Fdownload-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comfy-Org%2Fdownload-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comfy-Org","download_url":"https://codeload.github.com/Comfy-Org/download-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comfy-Org%2Fdownload-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272219584,"owners_count":24894454,"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-08-26T02:00:07.904Z","response_time":60,"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":[],"created_at":"2025-05-07T15:27:21.006Z","updated_at":"2025-08-26T12:13:07.443Z","avatar_url":"https://github.com/Comfy-Org.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ComfyUI Download Data\n\nA simple dashboard to track, log, and visualize daily download counts for the portable version of **ComfyUI**.\n\n## Overview\n\nThis project fetches release and asset download data from the ComfyUI GitHub repository, stores it in a local SQLite database, aggregates daily download totals, and presents interactive charts through a Next.js dashboard.\n\n## Features\n\n- **Automated Data Fetching**: Retrieve GitHub release and asset download counts via a Node.js script.\n- **Local Persistence**: Store raw data in SQLite (`data/downloads.db`) and maintain a `daily_summary` table for easy trend analysis.\n- **Interactive Dashboard**: Visualize download metrics with a responsive React interface using Recharts.\n- **Scheduled Updates**: Leverage GitHub Actions to run the fetch script daily at 10:49 UTC and commit updates.\n- **No External Dependencies**: Everything runs locally without requiring external database services.\n\n## Tech Stack\n\n- **Next.js 15** (App Router) + **React** + **TypeScript**\n- **Tailwind CSS** for styling\n- **Recharts** for data visualization\n- **Better-SQLite3** for database interactions\n- **GitHub Actions** for scheduled data updates\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js v22 or newer (tested with v22)\n- npm, yarn, or pnpm as package manager\n\n### Installation\n\n```bash\ngit clone https://github.com/comfyanonymous/comfy-download-data.git\ncd comfy-download-data\nnpm install\n# or yarn install\n# or pnpm install\n```\n\n### Fetching Data\n\nRun the data fetching script to create or update the SQLite database:\n\n```bash\nnpm run getdata\n# or node scripts/fetch-data.mjs\n```\n\nThis populates `data/downloads.db` and updates daily summaries.\n\n### Running the Dashboard\n\nStart the development server:\n\n```bash\nnpm run dev\n# or yarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to view the dashboard.\n\n### Building for Production\n\n```bash\nnpm run build\nnpm run start\n```\n\n## Database Schema\n\n### asset_daily_stats\n\nThe `asset_daily_stats` table tracks daily download counts for each GitHub asset, including flags for draft and prerelease status.\n\nColumn | Type | Description\n--- | --- | ---\nasset_id | INTEGER | The GitHub asset ID.\nasset_name | TEXT | The name of the asset.\ndate | TEXT | Date in `YYYY-MM-DD` format.\ndownload_count | INTEGER | Number of downloads for the asset on that date.\ndraft | INTEGER | 1 if the release is a draft, 0 otherwise.\nprerelease | INTEGER | 1 if the release is a prerelease, 0 otherwise.\nfetch_timestamp | TEXT | ISO 8601 timestamp when the data was fetched (default to current time).\n\n```sql\nCREATE TABLE IF NOT EXISTS asset_daily_stats (\n  asset_id INTEGER NOT NULL,\n  asset_name TEXT NOT NULL,\n  date TEXT NOT NULL,\n  download_count INTEGER NOT NULL,\n  draft INTEGER NOT NULL,\n  prerelease INTEGER NOT NULL,\n  fetch_timestamp TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),\n  PRIMARY KEY (asset_id, date)\n);\n```\n\n### daily_summary\n\nThe `daily_summary` table summarizes daily total and delta of downloads.\n\nColumn | Type | Description\n--- | --- | ---\ndate | TEXT | Date in `YYYY-MM-DD` format.\ndownloads_total | INTEGER | Total downloads for all assets on that date.\ndownloads_delta | INTEGER | Difference in downloads compared to the previous day.\nfetch_timestamp | TEXT | ISO 8601 timestamp when the summary was fetched (default to current time).\n\n```sql\nCREATE TABLE IF NOT EXISTS daily_summary (\n  date TEXT PRIMARY KEY,\n  downloads_total INTEGER NOT NULL,\n  downloads_delta INTEGER NOT NULL,\n  fetch_timestamp TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))\n);\n```\n\n## GitHub Actions Workflow\n\nA workflow in `.github/workflows/fetch-data.yml` is configured to:\n\n1. Run the fetch script daily at 10:49 UTC.\n2. Commit changes to `data/downloads.db` if new data is fetched.\n\n## Contributing\n\nContributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the [GPL-3.0 license](LICENSE).\n\n## Acknowledgments\n\n- Built with Next.js, React, Tailwind CSS, and Better-SQLite3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfy-org%2Fdownload-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomfy-org%2Fdownload-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomfy-org%2Fdownload-data/lists"}