{"id":50325751,"url":"https://github.com/atliq/payload-cms","last_synced_at":"2026-05-29T06:02:52.856Z","repository":{"id":349756267,"uuid":"1203769015","full_name":"atliq/payload-cms","owner":"atliq","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-26T14:20:10.000Z","size":465,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T15:29:28.982Z","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/atliq.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-07T11:07:51.000Z","updated_at":"2026-04-28T05:44:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/atliq/payload-cms","commit_stats":null,"previous_names":["atliq/payload-cms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atliq/payload-cms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atliq%2Fpayload-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atliq%2Fpayload-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atliq%2Fpayload-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atliq%2Fpayload-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atliq","download_url":"https://codeload.github.com/atliq/payload-cms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atliq%2Fpayload-cms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33639056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":"2026-05-29T06:02:51.848Z","updated_at":"2026-05-29T06:02:52.849Z","avatar_url":"https://github.com/atliq.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\n**This can only be deployed on Paid Workers right now due to size limits.** This 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\nYou can enable read replicas by adding `readReplicas: 'first-primary'` in the DB adapter and then enabling it on your D1 Cloudflare dashboard. Read more about this feature on [our docs](https://payloadcms.com/docs/database/sqlite#d1-read-replicas).\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### Logger Configuration\n\nThis template includes a custom console-based logger compatible with Cloudflare Workers. Payload's default logger uses `pino-pretty`, which relies on Node.js APIs not available in Workers and would cause `fs.write is not implemented` errors.\n\nThe custom logger in `payload.config.ts`:\n\n- Routes logs through `console.*` methods which Workers handles correctly\n- Outputs JSON-formatted logs for Cloudflare observability\n- Only active in production (development uses the default `pino-pretty` for better DX)\n\nYou can control the log level via the `PAYLOAD_LOG_LEVEL` environment variable (e.g., `debug`, `info`, `warn`, `error`).\n\n### Diagnostic Channel Errors\n\nIf you see \"Failed to publish diagnostic channel message\" errors in your observability logs, these typically come from the `undici` HTTP client library. The template includes `skipSafeFetch: true` in the Media collection to use native fetch instead of undici for file uploads, which helps reduce these errors.\n\nCloudflare Workers runs in an [isolated environment that cannot access private IP ranges](https://developers.cloudflare.com/workers-vpc/examples/route-across-private-services/) by default, providing built-in SSRF protection. This makes `skipSafeFetch` safe to use.\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%2Fatliq%2Fpayload-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatliq%2Fpayload-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatliq%2Fpayload-cms/lists"}