# BB-002 Slice 1 plan ## Goal Ship a minimal host-app PWA/offline base without changing feature behavior: - public offline shell - service worker registration - web manifest - route allowlist for offline navigation - offline fallback page ## Recommended shape Use a small hand-rolled service worker in `public/`. Do not add a PWA plugin for this slice. Keep scope to navigation fallback + shell precache only. Do not cache API responses or mutate TV runtime cache logic in this slice. ## Likely files to add - `public/sw.js` - `app/manifest.ts` - `app/offline/page.tsx` - `components/offline-shell-register.tsx` - `tests/e2e/offline-shell.spec.ts` - optional: `tests/contracts/manifest-route.test.ts` ## Likely files to edit - `app/layout.tsx` - `app/globals.css` - maybe existing icon assets in `public/` ## Initial allowlist recommendation - `/` - `/classes` - `/classes/me` - `/coaches` - `/clubs` - `/offline` ## Explicit exclusions - `/admin` - `/player/*` - `/api/*` - auth-sensitive workspace routes like `/coaches/settings`, `/clubs/coaches`, `/clubs/venues/*` ## Acceptance checks - `pnpm build` passes - `pnpm test:e2e` includes offline-shell coverage and passes - offline reload of `/` falls back to `/offline` - offline navigation to `/classes` falls back to `/offline` when network is unavailable - offline request to `/admin` is not rewritten to the public fallback - `/player/[screenId]` behavior stays unchanged ## Related docs - `docs/html-first-accessibility-plan.md` - `docs/maintainability-priorities-2026-03.md`