Separate workers
2
UI on TanStack Start, API and ingest on the existing worker.
Cloudflare-native UI rollout
This new TanStack Start worker owns the authenticated user experience. Your existing Hono worker keeps its API key traffic, ingest surface, queues, and background jobs.
Separate workers
2
UI on TanStack Start, API and ingest on the existing worker.
Session auth
D1
Better Auth sessions, organizations, and members share your database with the backend.
User-ready
UI
Project dashboards, admin provisioning, and session-backed API management are now part of the app surface.
What the web app owns now
Browser users authenticate with Better Auth while the backend validates sessions against the same D1 data.
New projects map to Better Auth organizations so the UI can reason about owners, admins, and members.
Admins can mint, rotate, and revoke project keys without exposing machine-client flows to the browser.
Internal operators can backfill organization mappings for legacy projects that predate the UI layer.
Deployment split
app.<domain>TanStack Start, Better Auth routes, browser UI
api.<domain>Hono API, session-backed /v1/app/*, machine clients
hooks.<domain>Ingestion endpoints and webhook public surfaces
Email/password works now, and OAuth buttons are wired for Google and GitHub once secrets are present.
Every privileged backend call stays in server-only functions, not isomorphic loaders.
Projects now carry their organization relationship so auth and product roles stay aligned.
D1 bindings, wrangler environments, and preview/prod worker separation are configured.