# Web enhancements

Build + product enhancements for `apps/web` (Next.js → Cloudflare). The web app already has
broad UI; the audit shows it's mostly **demo-backed or bypassing contracts**, so most "web
enhancements" are really **live-wiring + the few gaps** the estate-seller flow exposes.
Architecture items first (they unblock the rest), then product gaps.

## Tier 1 — architecture (unblocks everything; mostly Wave 2/4)
- **The P9 gateway (D33).** Route every web write through a trusted server/edge gateway;
  service-role stays server-only; tenant/actor resolved server-side. Retire direct-client +
  `troveSnapApi` write paths.
- **Demo → live, behind a flag.** Swap `*DemoData` for contract-backed data (P5/P6); keep a
  `demo mode` so the marketing/showcase still works.
- **Retire `using(true)` RLS → P6 membership RLS** + public-safe projections for buyer pages.
- **Vision through P2/P3/P8.** Replace `/api/appraise` direct-Gemini with the validated provider
  gateway + cost accounting (no invented comps).

## Tier 2 — close the listing/throughput loop (pain #1, #4)
- **Bulk pricing/tagging/approve** across the review queue + item editor.
- **Channel-shaped export adapters.** Per-channel listing drafts (estatesales.net, eBay item
  specifics, Facebook fields, Shopify) generated from the canonical record — *catalog once, list
  everywhere* (never auto-posted; drafts the seller approves). Gates on Auth + connectors (W4).
- **Own-your-data export.** CSV/API export of the seller's inventory anytime — the anti-lock-in
  wedge vs. incumbents where listing data is trapped. (Cross-platform pain: locked data.)
- **Copy-gen polish.** Description generation that stands out among local sales (the listing skill
  pain), per-item + per-sale.

## Tier 3 — the post-sale + business gaps (pain #5, #6, #2)
- **Client reports & reconciliation.** Per-sale payout report (sold/unsold, fees, taxes), exportable
  for the family — addresses the meticulous Step-8 accounting pain.
- **Disposition / demand-recovery.** Workflows for unsold items (donate / haul / relist / discount
  phases) — the underestimated Step-8 cleanout pain. (DiscountPhaseEditor is a start.)
- **PII / privacy scrubber at ingestion.** Auto-detect faces, addressed mail, documents with
  SSNs, people in reflections → flag/blur before anything publishes. Turns the EstateSales.net
  CCPA / "won't remove interior photos" complaint into a **trust feature** (cross-platform pain).
- **Buyer alerts + saved-search notifications.** Drive demand (pain #2 buyer side) via live events.
- **SEO + shareability** for public sale pages (`/sales/[slug]`, `/go`) — organic buyer traffic.

## Tier 4 — the deliberate gaps (new surfaces, post-core)
These are estate-seller pains the current plan does **not** cover. Capture now, build later:
- **Contracts & scheduling** (Step 3): templates + e-sign + consult/sale calendar.
- **Staffing / SOPs** (pain #3): role-scoped logins, task checklists per role, sale-day rosters.
- **Lead-gen / CRM-lite** (pain #2 company side): inbound inquiry pipeline, referral tracking,
  realtor/attorney/senior-move-manager network.
- **Sale-day ops** (Step 7): cashier/checkout, numbered-entry, theft/security aids.
- *(Out of scope: insurance, sales-tax remittance, cash-flow financing — pains #2/#7 noted for
  completeness, not planned.)*

## Sequencing
Tier 1 is the Wave 2–4 contract work already planned. Tier 2 lands as capture/review go live
(Wave 3/4). Tiers 3–4 are post-core surfaces — tracked here so they're not lost; promote into a
sprint when the core scan→list→sell loop is contract-backed.
