- 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).
28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
# 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. Calls `resolveShareToken`. If valid, calls the entity's `loadForShare(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 `noindex` headers 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: true` lets a recipient toggle items; toggles round-trip back into the household (with `actor_id = null` in activity log, action `share.toggle`).
|
|
- [ ] Middleware does not gate `/s/*`.
|