Files
Dylan M. Taylor 896824e56f Build the webapp on Cloudflare without the website's signing keys (#407)
## Problem

app.getartcraft.com serves `Hello world`. Its `artcraft-webapp` Worker
builds this repository with `npm run build`, which always built
**artcraft-website-next** and failed on the website's
`LAUNCHER_CATALOG_SIGNING_KEY`. The Worker never got a successful
deploy, so it kept its placeholder.

## Change

- `npm run build` / `npm run deploy` choose the app from the
`ARTCRAFT_APP` build variable via `script/website/cloudflare_app.sh`.
The default, `artcraft-website`, is the old behaviour, so the website
Worker needs no changes.
- `ARTCRAFT_APP=artcraft-webapp` builds only the Nx webapp. It needs
**no signing keys**.
- `frontend/apps/artcraft-webapp/wrangler.jsonc` is now a static-assets
Worker (`artcraft-webapp`). It uses SPA `not_found_handling` and the
`app.getartcraft.com` custom domain, replacing the unused Pages
`app-new` config.
- The Cloudflare `public/_redirects` no longer has the `/* /index.html
200` fallback, since Workers assets reject it as a loop. Netlify's
`_redirects` is untouched.
- `nx build --skipSync` plus the `nx sync` output for
pagedraw/pagescene. Nx refused to build in CI without those references,
and that also fails on current `main`.

## Cloudflare settings for the artcraft-webapp Worker

| Setting        | Value                                   |
|----------------|-----------------------------------------|
| Build command  | `npm run build`                         |
| Deploy command | `npm run deploy`                        |
| Build variable | `ARTCRAFT_APP=artcraft-webapp`          |
| Build variable | `VITE_GOOGLE_CLIENT_ID` (as on Netlify) |

## Testing

- `ARTCRAFT_APP=artcraft-webapp CI=true npm run build` with no signing
keys in the environment: succeeds, 239 files, none over 25 MiB.
- `wrangler deploy --config frontend/apps/artcraft-webapp/wrangler.jsonc
--dry-run`: clean, no `_redirects` warnings.
- An unknown `ARTCRAFT_APP` exits 1 with usage.
- Not run: the website build path, which is the unchanged command moved
into the script.
2026-11-17 18:34:12 -05:00
..