> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Learn on Start + Void

> Cutover packet for the native Learn Worker: names, build, smoke checks and rollback to Vercel.

`apps/learn` has native TanStack Start + Vite+ + Void source beside its Next build,
generated by the [start-bridge codemod](https://docs.tuturuuu.com/build/devops/start-bridge-codemod.md). The Next
build, `vercel.json` and `vercel-production-learn.yaml` are untouched, so the current
Vercel deployment keeps serving until the route is flipped.

## Worker

* `apps/learn/void.config.ts` names the staging candidate (`workers_dev` on, `TUTURUUU_NOINDEX=1`). A production Worker (`tuturuuu-learn`, `workers_dev` and `preview_urls` off, `TUTURUUU_NOINDEX=0`) is created by the cutover PR; nothing here attaches a route.
* Entry: `apps/learn/cloudflare/worker.ts`; Wrangler config is emitted by `void` into `dist`.
* Root host: `learn.tuturuuu.com` (compiled in `start-bridge.config.ts` or the generated default).
* Mount: `tuturuuu.com/learn` (base path `/learn`), served by the same Worker.
* Binding: `ASSETS` (static output, `run_worker_first`).
* Variables (names): `TUTURUUU_NOINDEX`, optional `INTERNAL_WEB_API_ORIGIN` (default `https://tuturuuu.com`).
* Secrets (names, set in the Worker, never in the repo): `NEXT_PUBLIC_SUPABASE_URL`,
  `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`, `SUPABASE_SECRET_KEY`,
  `TUTURUUU_APP_COORDINATION_SECRET`. Compare with the Vercel project
  environment list before the flip.

## Build and qualification

```bash theme={null}
bun turbo:local run build --filter=@tuturuuu/learn^... --concurrency=2
bun scripts/ci/generate-build-metadata.ts
bun run --cwd apps/learn routes:check
bun run --cwd apps/learn type-check:cloudflare
bun run --cwd apps/learn build:cloudflare
CI=true CI_SOURCE_SHA=$(git rev-parse HEAD) bun run --cwd apps/learn test:runtime
```

`learn-cloudflare.yaml` runs the same steps in CI. `test:runtime` starts the emitted Worker in
workerd with synthetic secrets and no network egress; the gate is native-built-worker.runtime.mjs (8 checks, including the signed-out redirect fixture).

## Smoke checks after the route is attached

```bash theme={null}
curl -sI https://learn.tuturuuu.com/api/build-info      # 200, JSON, no-store
curl -sI https://learn.tuturuuu.com/                    # entry route, see below
curl -sI https://learn.tuturuuu.com/login               # renders, no 5xx
curl -sI https://learn.tuturuuu.com/robots.txt          # 200
```

Entry route: `GET https://learn.tuturuuu.com/` answers `200`. No smoke request may return `5xx`.

## Rollback

1. Before the flip, record the current production Vercel deployment id (the repo does
   not store it) and the DNS records and TTLs for `learn.tuturuuu.com` in the release record.
2. Roll back by detaching the Worker route or restoring the captured DNS records to the
   recorded Vercel deployment. `vercel-production-learn.yaml` still deploys the Next app.
3. Rerun the smoke checks against the Vercel origin.

Rolling back touches no database rows and no migrations. Route, DNS and deployment
changes belong to the release owner.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.