Skip to main content
apps/whiteboards is the dedicated Whiteboards app. It is a Next App Router source that runs on TanStack Start, Vite+ and Void behind @tuturuuu/start-bridge, generated with the conversion codemod. There is no legacy Vercel project and no legacy subdomain Worker: this app was carved out of Web’s /[wsId]/whiteboards routes, so Web keeps serving boards until the mount is live.

What moved and what stayed

The app owns only the satellite shell routes (/api/auth/*, /api/build-info, avatar and AI-credit routes, /api/workspaces/<id>). Every other /api/* request is forwarded to the central Web API, so no catch-all page exists under [locale]/[wsId]. The actor is getSatelliteAppSessionUser('whiteboards').

Worker profiles

cloudflare/deployment-profile.mjs holds the names and variables for void.config.ts. scripts/ci/whiteboards-native-artifact.py, the runtime test and scripts/ci/wave1-native-profiles.json repeat them, and scripts/ci/whiteboards-native-artifact.test.py pins the artifact script to the profile. Change them together. Neither profile declares routes, custom domains, workers_dev or preview_urls.
  • Entry: cloudflare/worker.ts (generated); app-owned options in start-bridge.config.ts (nonce CSP, report-only Trusted Types, the shared response policy).
  • Binding: ASSETS (static output, run_worker_first).
  • Variable (name): TUTURUUU_NOINDEX; optional INTERNAL_WEB_API_ORIGIN (default https://tuturuuu.com).
  • Secrets (names only, set in the Worker): NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY, SUPABASE_SECRET_KEY, TUTURUUU_APP_COORDINATION_SECRET.
  • Data: no database writes and no migrations.
The editor needs no new response-policy exceptions. Trusted Types stays in report mode (TTR_TRUSTED_TYPES_WHITEBOARDS unset or report) until a signed-in crawl of the editor shows no violations; moving it to enforce is a separate reviewed change.

Worker secrets

whiteboards-worker-secrets.yaml is a dispatch-only job in the protected environment wave1-whiteboards-production (restricted to main). It writes the Worker secrets from GitHub secrets, by name, and reads the names and types back; no person or agent handles a value, GitHub masks them, and a value that is missing, shaped wrong or a placeholder stops the job before any write. The two coordination secrets are one value shared by every app, which no agent can copy, so the job treats them as optional exactly as Lettin’s deploy does: the signer chain falls back to SUPABASE_SECRET_KEY (see app coordination secret rollout). Check cross-app sign-in into Whiteboards on that fallback during the smoke, and set the shared value later through the owner’s secret process. The Cloudflare credential is WAVE1_PRODUCTION_CLOUDFLARE_API_TOKEN in the same environment: Workers Scripts write. node scripts/ci/whiteboards-worker-secrets.mjs plan prints the mapping; scripts/ci/whiteboards-worker-secrets.test.mjs pins it. Create the environment first, restricted to main; GitHub creates an unprotected one on first use, which would fall back to repository secrets.

Build and qualification

whiteboards-cloudflare.yaml runs the reusable native workflow (build, routes, types, unit tests, emitted-Worker runtime, sealed restore) and a whiteboards-cutover-artifact job that builds the production profile, seals the route-free archive and repeats test:runtime from a clean restore. Do not run build:cloudflare on a shared development machine; use the workflow.
scripts/ci/wave1-native-profiles.json carries the production recipe (productionOnly, secrets, smoke cases) used by wave1-native-production.yaml. Do not re-run the codemod with --apply: void.config.ts, start-bridge.config.ts and the workflow carry the profile selection by hand.

Cutover order

The Web redirect and the gateway mount are held commits, separate from the app, so the product keeps working until the app is live. Each step is verified before the next, and each has a reverse.
  1. Land the app (source, registries, docs, and the migration 20261125130000_whiteboards_cross_app_token_audience.sql, which adds whiteboards to private.cross_app_internal_app_names() so Web can mint and verify cross-app tokens for it; production applies it through the gated workflow after the production sync, and sign-in through the app’s own host waits for that apply). Web’s pages are unchanged and no gateway route exists. The launcher and the Apps catalog list Whiteboards at whiteboards.tuturuuu.com, so do step 2 straight after this lands.
  2. Publish the sealed production artifact from the exact release SHA: upload the route-free tuturuuu-whiteboards build (a new Worker cannot take secrets before it exists, and it answers 503 until it has them), dispatch Whiteboards Worker Secrets on main, then attach whiteboards.tuturuuu.com to it so the launcher link works. Record the Worker version.
  3. Signed-in crawl of the board list and one editor session through a Cloudflare-Workers-Version-Overrides staged version; check realtime (two members on one board), image upload and the Trusted Types report log.
  4. Mount. Land the held gateway commit (/whiteboards, /whiteboards/* in GATEWAY_MOUNTED_PATHS, the MOUNT_WHITEBOARDS service binding, /whiteboards in PENDING_WEB_MOUNTS and the redirect Worker’s APP_WHITEBOARDS binding) in the same window as the gateway write. Its Wrangler digests in scripts/ci/wrangler-usage-allowlist.json need a fresh admission with it. Then run node scripts/active-app-mounts.mjs --live <version.json>.
  5. Web redirect. Land the held Web commit: /[wsId]/whiteboards[/...] redirects to the app, Web’s sidebar entry links to it, and Web’s copies of the pages, adapters and hook are deleted. Landing this before step 4 would send members to a path that is not live.
  6. Active mount. Remove /whiteboards from PENDING_WEB_MOUNTS in a separate change after signed-in acceptance, so Web’s logins use the mount.
  7. Subdomain. Move whiteboards.tuturuuu.com from the app Worker to the redirect Worker and add whiteboards to SUBDOMAIN_REDIRECT_APPS so it answers 301 to tuturuuu.com/whiteboards. Without that list entry the APP_WHITEBOARDS binding is a pass-through to the app Worker.

Smoke checks after the mount is live

No smoke request may return 5xx.

Rollback

  1. Revert the Web commit: boards are served from Web again.
  2. Remove the /whiteboards entries and the MOUNT_WHITEBOARDS binding from the gateway (the one-step mount rollback) and re-run the live-mount check.
  3. Move whiteboards.tuturuuu.com back to the app Worker if step 7 ran. The Worker and its versions can stay; nothing else depends on them.
Boards, snapshots and images live in the same tables and bucket as before, so a rollback touches no data.