{"id":31901100,"url":"https://github.com/timney/payload-cms-cf","last_synced_at":"2025-10-13T12:52:53.435Z","repository":{"id":317827996,"uuid":"1069000425","full_name":"timney/payload-cms-cf","owner":"timney","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-03T08:44:29.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T10:31:03.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/timney.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":"2025-10-03T08:44:05.000Z","updated_at":"2025-10-03T08:44:33.000Z","dependencies_parsed_at":"2025-10-06T09:02:27.259Z","dependency_job_id":null,"html_url":"https://github.com/timney/payload-cms-cf","commit_stats":null,"previous_names":["timney/payload-cms-cf"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/timney/payload-cms-cf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timney%2Fpayload-cms-cf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timney%2Fpayload-cms-cf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timney%2Fpayload-cms-cf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timney%2Fpayload-cms-cf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timney","download_url":"https://codeload.github.com/timney/payload-cms-cf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timney%2Fpayload-cms-cf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015087,"owners_count":26085644,"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-13T02:00:06.723Z","response_time":61,"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-10-13T12:52:48.669Z","updated_at":"2025-10-13T12:52:53.427Z","avatar_url":"https://github.com/timney.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Payload Cloudflare Template\n\n[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/payloadcms/payload/tree/main/templates/with-cloudflare-d1)\n\nThis template comes configured with the bare minimum to get started on anything you need.\n\n## Quick start\n\nThis template can be deployed directly to Cloudflare Workers by clicking the button to take you to the setup screen.\n\nFrom there you can connect your code to a git provider such Github or Gitlab, name your Workers, D1 Database and R2 Bucket as well as attach any additional environment variables or services you need.\n\n## Quick Start - local setup\n\nTo spin up this template locally, follow these steps:\n\n### Clone\n\nAfter you click the `Deploy` button above, you'll want to have standalone copy of this repo on your machine. Cloudflare will connect your app to a git provider such as Github and you can access your code from there.\n\n### Local Development\n\n## How it works\n\nOut of the box, using [`Wrangler`](https://developers.cloudflare.com/workers/wrangler/) will automatically create local bindings for you to connect to the remote services and it can even create a local mock of the services you're using with Cloudflare.\n\nWe've pre-configured Payload for you with the following:\n\n### Collections\n\nSee the [Collections](https://payloadcms.com/docs/configuration/collections) docs for details on how to extend this functionality.\n\n- #### Users (Authentication)\n\n  Users are auth-enabled collections that have access to the admin panel.\n\n  For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.\n\n- #### Media\n\n  This is the uploads enabled collection.\n\n### Image Storage (R2)\n\nImages will be served from an R2 bucket which you can then further configure to use a CDN to serve for your frontend directly.\n\n### D1 Database\n\nThe Worker will have direct access to a D1 SQLite database which Wrangler can connect locally to, just note that you won't have a connection string as you would typically with other providers.\n\n## Working with Cloudflare\n\nFirstly, after installing dependencies locally you need to authenticate with Wrangler by running:\n\n```bash\npnpm wrangler login\n```\n\nThis will take you to Cloudflare to login and then you can use the Wrangler CLI locally for anything, use `pnpm wrangler help` to see all available options.\n\nWrangler is pretty smart so it will automatically bind your services for local development just by running `pnpm dev`.\n\n## Deployments\n\nWhen you're ready to deploy, first make sure you have created your migrations:\n\n```bash\npnpm payload migrate:create\n```\n\nThen run the following command:\n\n```bash\npnpm run deploy\n```\n\nThis will spin up Wrangler in `production` mode, run any created migrations, build the app and then deploy the bundle up to Cloudflare.\n\nThat's it! You can if you wish move these steps into your CI pipeline as well.\n\n## Enabling logs\n\nBy default logs are not enabled for your API, we've made this decision because it does run against your quota so we've left it opt-in. But you can easily enable logs in one click in the Cloudflare panel, [see docs](https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs).\n\n## Known issues\n\n### GraphQL\n\nWe are currently waiting on some issues with GraphQL to be [fixed upstream in Workers](https://github.com/cloudflare/workerd/issues/5175) so full support for GraphQL is not currently guaranteed when deployed.\n\n### Worker size limits\n\nWe currently recommend deploying this template to the Paid Workers plan due to bundle [size limits](https://developers.cloudflare.com/workers/platform/limits/#worker-size) of 3mb. We're actively trying to reduce our bundle footprint over time to better meet this metric.\n\nThis also applies to your own code, in the case of importing a lot of libraries you may find yourself limited by the bundle.\n\n## Questions\n\nIf you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimney%2Fpayload-cms-cf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimney%2Fpayload-cms-cf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimney%2Fpayload-cms-cf/lists"}