{"id":31548700,"url":"https://github.com/balintbrews/canvas-cc-ssr","last_synced_at":"2026-04-11T19:31:49.470Z","repository":{"id":295807881,"uuid":"989731134","full_name":"balintbrews/canvas-cc-ssr","owner":"balintbrews","description":"Server-side rendering experiments for Drupal Canvas Code Components.","archived":false,"fork":false,"pushed_at":"2025-10-23T21:18:42.000Z","size":561,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T08:56:47.746Z","etag":null,"topics":["drupal","javascript","preact","react","ssr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balintbrews.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-24T17:53:48.000Z","updated_at":"2026-03-26T08:32:59.000Z","dependencies_parsed_at":"2025-05-27T13:39:02.308Z","dependency_job_id":"2d45ec04-a250-4a6d-82f8-ece3148f1142","html_url":"https://github.com/balintbrews/canvas-cc-ssr","commit_stats":null,"previous_names":["balintbrews/xbrew-render","xbrew-io/render","steepbase/render","steepbase/canvas-cc-ssr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/balintbrews/canvas-cc-ssr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balintbrews%2Fcanvas-cc-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balintbrews%2Fcanvas-cc-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balintbrews%2Fcanvas-cc-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balintbrews%2Fcanvas-cc-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balintbrews","download_url":"https://codeload.github.com/balintbrews/canvas-cc-ssr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balintbrews%2Fcanvas-cc-ssr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31693272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["drupal","javascript","preact","react","ssr"],"created_at":"2025-10-04T16:51:21.468Z","updated_at":"2026-04-11T19:31:49.437Z","avatar_url":"https://github.com/balintbrews.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `canvas-cc-ssr`\n\nServer-side rendering experiments for\n[Drupal Canvas](https://www.drupal.org/project/canvas) Code Components. POC\nDrupal module:\n[`drupal_canvas_cc_ssr`](https://github.com/balintbrews/drupal_canvas_cc_ssr).\n\n\u003e **Note:** The status of the project is experimental. It is unsafe for\n\u003e production use.\n\n## Plans\n\n- [ ] Settle approach: rendering vs. post-processing — see\n      [#4: Post-processing already rendered HTML](https://github.com/balintbrews/canvas-cc-ssr/issues/4)\n- [ ] Make the render function handle anything Drupal Canvas can do with code\n      components:\n  - [x] Props\n  - [ ] Slots\n  - [ ] First-party import of other Code Components\n  - [ ] First-party import of\n        [pre-bundled packages in Canvas](https://git.drupalcode.org/project/canvas/-/blob/1.x/ui/lib/astro-hydration/src/components/Stub.jsx)\n  - [ ] URL imports (e.g., from [esm.sh](https://esm.sh/))\n- [ ] Research if/how the render function can be made secure to run\n  - [ ] E.g., look into [`isolated-vm`](https://github.com/laverdet/isolated-vm)\n        or alternatives\n- [ ] Provide solution for running the rendering on a hosting provider with\n      ephemeral VMs/containers with fast booting, which could potentially\n      overcome the security challenges of executing user code\n  - [x] [Fastly Compute](https://www.fastly.com/documentation/guides/compute/)\n  - [ ] [Fly Machines](https://fly.io/docs/machines/guides-examples/functions-with-machines/)\n        by [Fly.io](https://fly.io) seem to be well-suited for this\n\n## Development status\n\nThere is a function implemented in `src/render.ts` which can render React/Preact\ncomponent code into HTML. This is exposed via an HTTP server in `src/server.ts`,\nand can also run on\n[Fastly Compute](https://www.fastly.com/documentation/guides/compute/) (see\n_Running on Fastly Compute_ below).\n\nThe best way to work on and experiment with this project is by adjusting/adding\ntest cases while running:\n\n```\n$ npm test\n```\n\nFix code linting and formatting issues:\n\n```\n$ npm run code:fix\n```\n\nIf you would like to test the server directly:\n\n```\n$ npm run build\n$ node dist/server.cjs\n```\n\n## Running on Fastly Compute\n\nThe render function can run on\n[Fastly Compute](https://www.fastly.com/documentation/guides/compute/) (entry\npoint is implemented in `src/fastly-compute`).\n\nYou can [sign up for a Fastly account](https://www.fastly.com/signup),\n[create an API token](https://manage.fastly.com/account/tokens), then set it in\nyour CLI by running `npx fastly profile create` inside the project directory.\nThen simply deploy:\n\n```\n$ npm run fastly:deploy\n```\n\nYou will be asked to create a\n[service](https://www.fastly.com/documentation/guides/getting-started/services/about-services/),\nor enter an existing service ID in the `fastly.toml` file.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalintbrews%2Fcanvas-cc-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalintbrews%2Fcanvas-cc-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalintbrews%2Fcanvas-cc-ssr/lists"}