{"id":27976666,"url":"https://github.com/ssut/code-push-cloudflare-workers","last_synced_at":"2025-10-24T17:15:04.446Z","repository":{"id":274367983,"uuid":"916619140","full_name":"ssut/code-push-cloudflare-workers","owner":"ssut","description":"A serverless CodePush standalone implementation on Cloudflare Workers. A cost-effective, drop-in replacement for AppCenter CodePush.","archived":false,"fork":false,"pushed_at":"2025-01-19T15:16:24.000Z","size":267,"stargazers_count":41,"open_issues_count":3,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-13T11:36:30.150Z","etag":null,"topics":["code-push","code-push-server","codepush"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssut.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}},"created_at":"2025-01-14T13:04:51.000Z","updated_at":"2025-08-17T21:20:43.000Z","dependencies_parsed_at":"2025-01-26T22:04:05.980Z","dependency_job_id":"c1ca3e7a-5754-4ea7-984a-cf070f49b3d9","html_url":"https://github.com/ssut/code-push-cloudflare-workers","commit_stats":null,"previous_names":["ssut/code-push-cloudflare-workers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssut/code-push-cloudflare-workers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fcode-push-cloudflare-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fcode-push-cloudflare-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fcode-push-cloudflare-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fcode-push-cloudflare-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssut","download_url":"https://codeload.github.com/ssut/code-push-cloudflare-workers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fcode-push-cloudflare-workers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000960,"owners_count":26082973,"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-10-09T02:00:07.460Z","response_time":59,"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":["code-push","code-push-server","codepush"],"created_at":"2025-05-08T01:38:58.074Z","updated_at":"2025-10-09T07:37:04.931Z","avatar_url":"https://github.com/ssut.png","language":"TypeScript","readme":"# CodePush on Cloudflare Workers 🚀\n\n![main branch test status](https://github.com/ssut/code-push-cloudflare-workers/actions/workflows/test.yml/badge.svg?branch=main)\n\nA community-driven port of Microsoft's [CodePush Standalone](https://github.com/microsoft/code-push-server), designed for cost-effective and scalable over-the-air updates using Cloudflare Workers.\n\n**No Servers Needed!** You can now use CodePush Standalone without managing any infrastructure, **nor needing an understanding of it!**\n\n**Status: Alpha - Under Development 🧪** - Core functionality is **100% compatible ✅** with the official CodePush, but further testing and improvements are ongoing.\n\n**Important Note:** This project is not affiliated with, maintained, or endorsed by Microsoft or the CodePush team. It's a community initiative aimed at providing a more accessible and affordable alternative.\n\n## Why I Built This\n\nThis project addresses a crucial need for a reliable and cost-effective solution following Microsoft's planned shutdown of AppCenter CodePush in March 2025, without requiring migration to other solutions like EAS.\n\nThe official CodePush Standalone server:\n   - Is not readily deployable as a true *standalone* solution.\n   - Requires a complex setup with Azure infrastructure.\n   - Has a difficult-to-maintain codebase with a less-than-ideal TypeScript implementation.\n\nThis project provides **a seamless, drop-in replacement 🔌** using Cloudflare Workers, resolving these issues.\n\n## Cost Comparison (vs Azure Deployment)\n\nThis project significantly reduces operational costs by utilizing Cloudflare's infrastructure. Here's a detailed breakdown of the estimated monthly costs:\n\n| Service                  | Azure (Original)         | Cloudflare Workers (This Project)  |\n|--------------------------|--------------------------|-----------------------------------|\n| **Compute**             |                          |                                   |\n| Azure App Service       | $13.14 (Basic B1)         | $0 (Free Tier Handles 3M Requests)  |\n| **Caching**             |                          |                                  |\n| Azure Cache for Redis   | $16.43 (Basic C0)         | $0 (Using Cloudflare D1 as a cache, this is fast enough)    |\n| **Storage**            |                          |                                   |\n| Azure Blob Storage      | ~$2.88 (min usage, incl Queue \u0026 Table) | $0 (10GB Free, 1M Class A/10M Class B with R2)  |\n| Azure Key Vault    |$0.03 (10,000 operations)| $0 (integrated on R2)  |\n| **Total Estimated**      | **~$32.48**               | **$0** (Free Tier)                |\n\nTraditional deployments of the official CodePush Standalone on Azure require *an estimated ~$32.48 per month*, while this project can handle up to 1 million monthly API requests entirely for *free* within Cloudflare's generous free tier and using it's R2 storage and D1 database.\n\n**Note:** Network bandwidth cost is not included in the comparison. By using Cloudflare's infrastructure, network bandwidth cost is almost free for most use cases.\n\n## Key Benefits\n\n*   ✨ **Global, Serverless, Effortless:** Deliver updates globally with low latency, powered by Cloudflare's edge network, all without managing any servers.\n*   ☁️ **Integrated Cloudflare Infrastructure:**  Utilizes Cloudflare's D1 (SQLite-compatible) for data and R2 (S3-compatible) for package storage, eliminating the need for external services.\n*   💰 **Cost-Efficient:** Operates within Cloudflare's cost-optimized serverless environment, minimizing operational overhead.\n*   🚀 **Simple Deployment:** Deploy directly to Cloudflare Workers with a streamlined process.\n*   ✅ **100% API Compatible:** Functions seamlessly with existing applications using the official CodePush API.\n\n## Features\n\n-   ⚙️ **Fully Compatible API**: Implements the complete CodePush API.\n-   💾 **Cloudflare Storage**: Leverages D1 (SQLite) and R2 (S3) for data and package storage.\n-   🌐 **Edge Delivery**: Utilizes Cloudflare's edge network for fast updates.\n-   ⚡️ **Seamless Deployment:** Deploy your CodePush server to Cloudflare Workers with a streamlined and simplified process, reducing the setup time and effort\n\n## Implementation Status (Test Passes)\n\n### Server\n\n- [x] Auth: Handles user authentication and session management. (Admin API)\n  - [x] Github Auth: Supports authentication using GitHub OAuth.\n- [x] Acquisition: Provides update checks and download reports. (Client SDK API)\n  - [x] Update Check: Handles update checks, version matching, and diff delivery.\n  - [x] Metrics: Records deployment and download metrics and reports.\n- [x] Management: Handles app, deployment and release management. (Admin CLI API)\n  - [x] App Management: Handles app creation, modification, deletion, and transfer.\n  - [x] Deployment Management: Handles deployment creation, modification, and deletion.\n  - [x] Release Management: Handles package publishing, promoting, and rollback.\n  - [x] Collaborator Management: Handles collaborators addition, removal and listings.\n  - [x] Metrics Management: Retrieves and displays deployment metrics\n\n#### Real-world Testing\n\n- [ ] Test with real-world scenarios and edge cases.\n- [ ] Test with code-push-standalone CLI.\n\n### Web\n\nTo be implemented. Not a high proirity at the moment because I'm focusing on the server side, and the CLI is ready to use.\n\n### CLI\n\nWhile [the official CodePush Standalone CLI](https://github.com/microsoft/code-push-server/blob/main/cli/README.md) can be used, a custom CLI is planned for far future releases.\n\n## Getting Started\n\n**Base Guide:**\n - `apps/server`: CodePush Standalone Server (Cloudflare Workers)\n - `apps/web`: Admin UI for managing apps, deployments, and releases (optional, Cloudflare Pages)\n\n**Note:** Detailed instructions and commands for each step are **TBD** and will be added soon. Here's a high-level overview:\n\n1.  **Clone the Repository:**\n    ```bash\n    git clone https://github.com/your-repo/code-push-cloudflare-workers.git\n    cd code-push-cloudflare-workers\n    ```\n2.  **Install Dependencies:**\n    ```bash\n    corepack enable\n    pnpm install\n    ```\n3.  **Configure Cloudflare:**\n    -   Install the `wrangler` CLI.\n    -   Authenticate with your Cloudflare account.\n    -   Create a D1 database and an R2 bucket.\n    -   Update `wrangler.toml` with your Cloudflare credentials and other environment variables in the `apps/server` directory.\n4.  **Apply Database Migrations:**\n\n    ```bash\n    cd apps/server\n    pnpm apply\n    ```\n     or for production enviroment\n    ```bash\n    pnpm apply:production\n    ```\n\n5.  **Deploy the Backend:**\n    ```bash\n    cd apps/server\n    pnpm wrangler publish\n    ```\n6.  **Run the Admin UI:**\n    ```bash\n    cd apps/web\n    pnpm dev\n    ```\n\n\n## License\n\nLicensed under the **Apache License 2.0**. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssut%2Fcode-push-cloudflare-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssut%2Fcode-push-cloudflare-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssut%2Fcode-push-cloudflare-workers/lists"}