platform/architecture/tanstack-rust-migration for route ownership rules and
implementation patterns. Use the operational runbook at
build/devops/tanstack-rust-cutover-runbook for dual-stack bring-up and final
cutover evidence. Use this page for sequencing, verification gates, and
agent-lane planning.
Current Snapshot
The route manifest atapps/tanstack-web/migration/route-manifest.json is the
source of truth. The latest local snapshot on 2026-06-22 is:
| Status | Count |
|---|---|
legacy-next | 1197 |
migrated | 244 |
accepted-removal | 83 |
| Total tracked artifacts | 1524 |
| Kind | Remaining legacy artifacts |
|---|---|
| API | 967 |
| Cron | 17 |
| tRPC | 1 |
| Page | 191 |
| Layout | 21 |
apps/tanstack-webas the user-facing frontend.apps/backendas the Rust-owned API/backend runtime.apps/webkept only as a rollback fallback until terminal cutover gates are green.
First Verification Gap Closure
Before accelerating route waves, keep the verification layer green and visible:- Expose the dual-stack Docker E2E runner through the root package scripts.
- Keep
scripts/run-tanstack-e2e-docker.test.jsinsidetest:scripts. - Run actual CI coverage for the minimal TanStack/Rust dual-stack compose stack.
- Run CI compare-mode coverage against a focused public no-auth Playwright smoke before broader cutover rehearsals.
- Keep the migration plan and cutover runbook discoverable from
apps/docs.
-- separates Bun args, and the second is forwarded to the
TanStack runner so Playwright receives the project flag.
Backend Waves
Backend migration is the primary bottleneck. Batch Rust routes by domain and keep each batch independently revertible:- Auth, session, account identity, and current-user profile.
- Workspace core, membership, limits, and permissions/navigation prerequisites.
- High-density
/api/v1/workspaces/*domains that unblock authenticated pages. - Cron, tRPC, and remaining low-frequency API compatibility routes.
apps/backend/README.md when runtime behavior changes, and the
OpenAPI contract through the coordinator-owned apps/backend/api/openapi.yaml.
Frontend Waves
Frontend work should follow backend readiness rather than reintroduce protected raw API calls:- Dashboard shell, providers, navigation, auth gate, and workspace permission parity.
- Authenticated dashboard pages whose data APIs are Rust-owned.
- Module and settings pages in domain batches.
- Public/static pages that still have legacy route artifacts.
- Decommission-only accepted removals.
createServerFn, TanStack Query, and the existing
auth-gate, workspace, and workspace-permission helpers. Shared UI and the
TanStack app must call typed internal-api/backend facades, not protected raw
Supabase reads or raw /api/* endpoints.
Every terminal route must be classified as one of:
- static prerender
- ISR/CDN cache
- dynamic no-store
- redirect
- accepted removal
Coordinator-Owned Artifacts
Only the migration coordinator should edit generated or contract artifacts:apps/tanstack-web/src/routeTree.gen.tsapps/tanstack-web/migration/route-manifest.jsonapps/tanstack-web/migration/route-overrides.jsonapps/backend/api/openapi.yamlapps/docs/platform/architecture/tanstack-rust-migration.mdx
Required Gates
Per backend wave:cargo fmt --check- focused
cargo test --locked <module> cargo clippy --locked --all-targets --features native -- -D warnings- OpenAPI contract tests
bun migration:tanstack:check
bun --filter @tuturuuu/tanstack-web type-checkbun --filter @tuturuuu/tanstack-web test- route-tree generator tests when route files change
bun migration:tanstack:check- TanStack API access checks
- focused Playwright when route behavior changes
bun migration:tanstack:cutover-checkbun migration:tanstack:gates- dual-stack Docker E2E evidence
- compare-mode Docker E2E evidence
- benchmark evidence
- Cloudflare smoke evidence
- final
bun check
Commit Cadence
Commit after each independently revertible lane or small batch. In a shared checkout, claim the commit window immediately before exact-path staging, inspect the staged files, commit with a Conventional Commit subject, then release the window. Do not runbun git-sync or push unless explicitly requested.