{"id":25969071,"url":"https://github.com/fullsoak/cloudflare-workers-examples","last_synced_at":"2026-04-20T07:01:44.522Z","repository":{"id":277903918,"uuid":"933801942","full_name":"fullsoak/cloudflare-workers-examples","owner":"fullsoak","description":"examples using FullSoak web framework on Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2025-02-27T03:10:53.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T04:21:08.737Z","etag":null,"topics":["cloudflare-workers","fullstack","nobuild","ssr","web-framework"],"latest_commit_sha":null,"homepage":"https://fullsoak-cloudflare-workers-examples.dklab.workers.dev","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/fullsoak.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}},"created_at":"2025-02-16T18:10:15.000Z","updated_at":"2025-02-27T03:10:56.000Z","dependencies_parsed_at":"2025-02-16T22:25:52.920Z","dependency_job_id":"163a2c33-d0ea-46fb-b6b3-41513e6e72c0","html_url":"https://github.com/fullsoak/cloudflare-workers-examples","commit_stats":null,"previous_names":["fullsoak/cloudflare-workers-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fullsoak/cloudflare-workers-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullsoak%2Fcloudflare-workers-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullsoak%2Fcloudflare-workers-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullsoak%2Fcloudflare-workers-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullsoak%2Fcloudflare-workers-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fullsoak","download_url":"https://codeload.github.com/fullsoak/cloudflare-workers-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fullsoak%2Fcloudflare-workers-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["cloudflare-workers","fullstack","nobuild","ssr","web-framework"],"created_at":"2025-03-04T22:38:59.157Z","updated_at":"2026-04-20T07:01:44.503Z","avatar_url":"https://github.com/fullsoak.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fullsoak examples on Cloudflare Workers\n\n## Intro\n\nFullSoak is a no-build TypeScript fullstack SSR-first framework. As we don't\nrely on a bundler, all files are served directly where they are. This can be\ntricky on Cloudflare Workers due to the lack of support for native file system\nAPIs.\n\nThis repo serves as a Proof of Concept that FullSoak framework is compatible\nwith Cloudflare Workers with the correct setup.\n\nWARNING: as the [FullSoak framework](https://jsr.io/@fullsoak/fullsoak) is still\nin an early development phase, breaking changes are expected. When in doubt,\nplease feel free to open a PR / discussion. Thank you for your interest!\n\n## Available commands\n\nThis repo is prepared for the Cloudflare Workers runtime. If you're familiar\nwith developing Cloudflare Workers apps, you will feel right at home. Please be\nsure to check the configuration files (e.g. `tsconfig.json`, `wrangler.jsonc`,\netc.) to get an idea of what is configured to make a FullSoak app deployable on\nCloudflare Workers environment.\n\n```bash\nnpm run dev\n```\n\n## Cloudflare Workers specific deep-dives\n\nThe topics below only apply when using FullSoak on Cloudflare Workers. For other\ndeploying destinations, we wouldn't face most of the challenges discussed here.\n\n### The pragma comments on HtmlShell are a must-have\n\nFullSoak provisions a battery-included JSX component known as `HtmlShell`. For\nit to work properly on certain platforms / setups, the following pragma comments\nare needed, so FullSoak ships this component with these comments on top:\n\n```ts\n/** @jsxRuntime automatic */\n/** @jsxImportSource preact */\n```\n\nThese comment get 'expanded' to the installation path of `preact` which is\ndefined by FullSoak. In Deno-compatible setups, everything resolves\nautomatically, but in environments like Cloudflare Workers, a bit of additional\nguidance is needed.\n\nThe general setup is to alias in `tsconfig.json` like so:\n\n```json\n{\n  \"paths\": {\n    \"npm:preact@10.25.4/jsx-runtime\": [\"./node_modules/preact/jsx-runtime\"]\n  }\n}\n```\n\nOn Cloudflare Workers, this is done via\n[Module Aliasing](https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing).\n\n(✓) so using the same approach, FullSoak framework should work for both\nCloudflare Workers and render.com (or similar non-Deno deployment envs).\n\n---\n\n### uglify-js is unsupported\n\nSomehow `uglify-js` refers to `__require.resolve` which is probably not\nunderstood in deployment environments like Cloudflare Workers (at least without\nspecial catering). FullSoak uses `uglify-js` itself as a fallback when\n`@swc/core` fails to load. So it may not be worth the efforts trying to\nprovision for `uglify-js`.\n\nIt's possible to\n[alias](https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing)\n`uglify-js` to something else that loads successfully\n\n```json\n{ \"uglify-js\": \"/path/to/something/else\" }\n```\n\nor use something else altogether. Either way, some room for improvements here.\n\n(✓) later versions of FullSoak no longer hard-rely on `uglify-js`.\n\n---\n\n### @swc is unsupported\n\nLatest FullSoak version (at writing time) still fails to start up on Cloudflare\nWorkers as `@swc/core` native binding is not supported. To unblock the process\nstartup, a workaround is to\n[alias](https://developers.cloudflare.com/workers/wrangler/configuration/#module-aliasing)\nlike so:\n\n```jsonc\n{\n  \"@swc/wasm\": \"./node_modules/@swc/core\",\n  \"@swc/core-darwin-arm64\": \"./node_modules/@swc/core\" // platform dependent - your mileage might vary\n}\n```\n\nbut that means `@swc/core` native binding itself is not usable, rendering the\nlibrary useless =\u003e a drop-in replacement is required anyways.\n\n(✓) later versions of FullSoak employs `typescript` as a fallback.\n\nAnother improvement opportunity: make it work without the aliasing trick above,\ntoo.\n\n---\n\n### fs.readFile is unsupported\n\nFullSoak uses `fs.readFile` to serve `.css` and `.tsx` files for the components.\nThat is also not yet supported by Cloudflare Workers `uenv`.\n\n(✓) resolved using a patch on `app.fetch` so `.css` and `.t|jsx` files are\nloaded via Cloudflare Workers Static Assets instead of file system.\n\n(❌) css content that is Server-side-rendered together with the initial HTML\ncontent is not yet supported. A workaround is to inline CSS into the components,\nor placing `\u003clink\u003e` elements. Whether it's possible to provide the same level of\nsupport for this feature as it is on the other deployment platforms (Deno Deploy\n/ render.com / self-host) is unknown at the moment.\n\n---\n\n## Other platforms\n\n- Examples for Node.js runtime: https://github.com/fullsoak/nodejs-examples\n- Examples for Deno runtime: https://github.com/fullsoak/deno-examples\n- Examples for Bun runtime: https://github.com/fullsoak/bun-examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullsoak%2Fcloudflare-workers-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffullsoak%2Fcloudflare-workers-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffullsoak%2Fcloudflare-workers-examples/lists"}