apps/marketing) is part of the TTR D74 Cloudflare migration, moving
public marketing and legal pages from Vercel to native Cloudflare Workers powered
by TanStack Start, Vite+, and Void SDK.
Its request context, Next.js shims (next/headers, next/navigation,
next-intl/server), Vite preset, and response policies come from
@tuturuuu/start-bridge. The application maintains
its own Worker entrypoint (cloudflare/worker.ts), route tree, and layout hierarchy.
Worker identity and mounts
The Worker targets the following staging and production identities:- Worker Name:
tuturuuu-marketing(production and staging candidate) - Root Hosts:
marketing.tuturuuu.com - Mount Hosts:
tuturuuu.com - Base Path:
/marketing
tuturuuu.com), pages are mounted under /marketing/* or
routed via Cloudflare path routing rules. On the canonical subdomain
(marketing.tuturuuu.com), pages are served directly from /.
Bindings and configuration
The Worker requires only standard asset and routing bindings; no secrets are placed on the Cloudflare Worker.Route groups and ownership
Route outcomes are declared instart-bridge.routes.json under runtime and
verified against workerd during CI qualification.
Pass-through routes (retained in apps/web on Vercel)
The following routes are intentionally not ported to the Worker and stay in
apps/web on Vercel as gateway pass-through routes:
/download/models/changelog(including[slug]articles and dynamic OG/Twitter image routes)
createAdminClient) with SUPABASE_SECRET_KEY, and /download depends on
per-request client detection headers. apps/web does not provide dedicated public
APIs for these operations. Injecting service-role credentials into the public
Cloudflare Worker is forbidden, and adding new backend endpoints would require
modifying apps/web (which is kept strictly untouched during this migration).
Routing rules on Cloudflare forward these paths directly to the Vercel deployment.
Build and local verification
Local build prerequisites require compiling workspace package distributions first so that Rolldown resolves dependencies:Cutover and rollback runbook
Prerequisites
- Vercel deployment ID: The prior Vercel deployment ID is not recorded in the repository. Rex must capture and record the active immutable Vercel deployment ID and domain configuration before applying routing rules.
- Untouched origin:
apps/webremains deployed and functional on Vercel; no destructive changes or deletions are performed on the Vercel origin.
Traffic cutover
- Traffic cutover is performed progressively via Cloudflare route patterns assigned to the Worker.
- Cloudflare routes are applied per page group (e.g.
/privacy,/terms,/security/*, etc.). - Once routed, verify live smoke responses immediately.
Smoke verification
Verify status codes and runtime identification headerx-tuturuuu-runtime: native:
200, and x-tuturuuu-runtime must equal native.
Rollback procedure
There is no in-repo gateway feature flag per page group.- Mechanism: Per-group rollback is executed by removing that group’s Cloudflare route pattern (owned by Rex).
- Behavior: Because
apps/webon Vercel remains running and completely untouched, deleting or disabling the Cloudflare Worker route pattern immediately restores Vercel as the origin for that page group with zero downtime. - RTO: Under 5 minutes without requiring repository commits or code rebuilds.