Skip to content

Deploy the app builder with hosted installations - #235

Merged
tnkuehne merged 1 commit into
feat/template-installsfrom
feat/hosted-app-builder
Nov 20, 2026
Merged

tnkuehne merged 1 commit into
feat/template-installsfrom
feat/hosted-app-builder

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Hosted installations now deploy the app builder from #232 and bind it to the control plane, which turns on one-click template installs from #234.

deploy-hosted.ts deploys the same builder Worker twice, as <name>-app-builder for /bundle and <name>-app-documenter for /document, so each build phase runs in its own isolate. Both deploy before the control plane, which binds them as APP_BUILDER and APP_DOCUMENTER. They have no workers.dev or preview URLs and no routes, so only the control plane reaches them. The builder's base configuration is packages/app-builder/wrangler.jsonc: the prebuilt dist/builder.js with its two WebAssembly modules attached as compiled Wasm, and a CPU limit of 120 seconds for large dependency graphs.

The deployment stops with build instructions when the builder or its modules are missing. Hosted deployments therefore build the service documentation module (cargo build --profile wasm -p platform-service-docs-wasm --target wasm32-wasip1) and the builder (pnpm --filter @platform/app-builder build) before deploying.

Stacked on #234. Self-hosted installations follow in a separate change.

Validation: pnpm check; hosted-installation.test.ts (16 tests, including RUN_CLOUDFLARE_TESTS=1 after build:cloudflare) covers both builder configurations and the control plane's bindings. A Wrangler dry run uploads builder.js with both modules (25.6 MB, 6.6 MB gzip); CI repeats it in the Rust suite after building the builder.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issues were found.

Summary

Hosted installations now deploy separate Workers for app bundling and service documentation, enabling one-click template installs.

  • Hosted installs now run app bundling and documentation in separate Workers.

No actionable issues found. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  D[Hosted deployment] --> B[Deploy bundler Worker]
  B --> S[Deploy documentation Worker]
  S --> C[Deploy control plane]
  C -->|APP_BUILDER: /bundle| B
  C -->|APP_DOCUMENTER: /document| S
Loading

Reviews (8) · Last reviewed commit: "Deploy the app builder with hosted insta..." · Reviewed by Greptile

@tnkuehne
tnkuehne added this pull request to stack #233 November 19, 2026 21:01
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 505d9c6 Nov 19 2026, 11:38 PM

@tnkuehne
tnkuehne force-pushed the feat/hosted-app-builder branch from 807b8f2 to db5f563 Compare November 19, 2026 22:55
@tnkuehne
tnkuehne force-pushed the feat/hosted-app-builder branch 2 times, most recently from 3a97256 to 505d9c6 Compare November 19, 2026 23:37
@tnkuehne
tnkuehne force-pushed the feat/hosted-app-builder branch 2 times, most recently from 9a4bc09 to 6ac773d Compare November 19, 2026 23:44
@tnkuehne
tnkuehne force-pushed the feat/hosted-app-builder branch 3 times, most recently from 47778b6 to aa9a6e8 Compare November 19, 2026 23:51
Hosted installations deploy the builder twice, as <name>-app-builder and
<name>-app-documenter, without public URLs, and bind them to the control plane
as APP_BUILDER and APP_DOCUMENTER, which enables one-click template installs.
The deployment requires the built builder and its WebAssembly modules.
@tnkuehne
tnkuehne merged commit da1da7b into main Nov 20, 2026
17 checks passed
@tnkuehne
tnkuehne deleted the feat/hosted-app-builder branch November 20, 2026 00:32
tnkuehne added a commit that referenced this pull request Nov 20, 2026
Self-hosted installations get the app builder from #232 as a Compose
service, so one-click template installs (#234) work there as on hosted
installations (#235).

- The runtime image builds the service documentation module and the app
builder and ships them in `/opt/widefleet-builder`, with the tsrs
license. No new image or registry repository: the builder uses the
runtime image's celld.
- `packages/app-builder/build.ts` also writes `dist/wrangler.json`, a
celld project with the Worker's name and compatibility date. celld
rejects the hosted-only keys of `wrangler.jsonc` (`base_dir`, `limits`,
`observability` …); Wrangler does not upload the file.
- Compose runs the `builder` service with `celld dev --no-watch`: one
stateless node with local storage on a tmpfs, so the builder holds no
storage credentials. It runs read-only without capabilities, publishes
no port and shares the `builder` network only with the control plane. It
reaches the npm registry for dependencies. The control plane gets
`PLATFORM_APP_BUILDER_URL=http://builder:8080`.
- The local demo starts the builder too.

Tests:
- `compose.test.ts` checks that only the builder and the control plane
are on the builder network, that the builder has no ports, volumes or
credentials, and that the control plane finds it.
- `builder-container.test.ts` (packaged-runtime suite) starts the
Compose service from the runtime image and bundles, documents and
rejects a project.
- Locally, the container also built and documented the gmail, github and
onedrive templates with their npm dependencies.
















<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=113431912&amp;sig=9586ddbfc2a47758bc5d806944ebc5c4494de6abec908fc1a818e90f0202796d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F236&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge.

<details open><summary><h3>Summary</h3></summary>

Self-hosted installations and the local demo now run the app builder
from the runtime image.

- Self-hosted installs can build templates through a private app
builder.

The previously reported startup issue is fixed: starting the control
plane now starts the builder and waits for it to be healthy. No new
actionable issues were found. Container tests were inspected, not run.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  C[Control plane] -->|Private Compose network| B[Builder service]
  B --> N[npm registry]
  I[Runtime image] --> B
  I --> R[App runtime]
  B --> W[Bundled app and documentation]
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (8) · Last reviewed commit: ["Start the app builder with
the control
p..."](dc9785e)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant