- pnpm 10 workspace + TypeScript strict + ESLint flat + Prettier - CLAUDE.md as canonical brief - docs/tasks/ — 22 task briefs broken out by phase for sub-sessions - docs/decisions/ — ADR scaffold Implements task 01 (repo-init).
1.1 KiB
1.1 KiB
31 — Public share viewer (/s/<token>)
Goal
Unauthenticated route that resolves a share token and renders the entity using its manifest's loadForShare adapter.
Depends on
- 30
Scope
/s/[token]/page.tsx— server component. CallsresolveShareToken. If valid, calls the entity'sloadForShare(id)and renders a per-type viewer component (each module exports a<SharedView />).- If the token grants write capability, render an editable view (initially only relevant for lists — recipient can check items off).
- Friendly error page for invalid/expired/revoked tokens.
- Add
noindexheaders on the route.
Out of scope
- Auth on the share page (deliberately public; security is the unguessable token).
- Comments / reactions from anonymous viewers.
Acceptance criteria
- Calendar event share renders title/time/location/notes — read-only.
- Shopping list share with
write: truelets a recipient toggle items; toggles round-trip back into the household (withactor_id = nullin activity log, actionshare.toggle). - Middleware does not gate
/s/*.