# THE COMMONS — Feature Catalog, Validation & Presentation Guide A complete, **validated** inventory of every feature in THE COMMONS. Unlike [README.md](./README.md) (architecture + problem mapping) and [DEMO.md](./DEMO.md) (hands-on run guide), this document records, for each feature: **what** it does, **how** it works, **how to use** it, and **its validation status backed by a captured artifact**. Nothing here is claimed working by inference — every row cites a real run. ## How this was validated - **Real-browser walkthrough** — every platform feature and all 13 mini-apps were driven live through the shipped UI with the repo's own Playwright toolchain (the same engine `e2e/*.e2e.mjs` use) against the running dev server, after a one-click demo seed. Each step asserts a concrete observable and saves a screenshot. Evidence: `.omo/evidence/feature-validation/*.png` + `results.json` (16/17 automated PASS; the 1 "fail" was a test-selector bug in the harness, not the app — see Home Grid below — confirmed working by screenshot). - **Repository gate** — `npm run test` (668 passing across 87 files), `npm run build` (exit 0), `npm run lint` (exit 0). The repo also keeps dedicated e2e scenarios for the hard-to-drive-live surfaces: cross-device CRDT sync + partition-heal (`assemblyPartition`, `assemblyScreenSync`), install-by-QR round-trip (`installShare`, `uploadMiniapp`), wallet credit on a real Fair Draw win (`fairDrawWalletCredit`), and signed-history integrity (`transactionHistorySignature`). ## Validation summary | Feature | Status | Observable captured | Evidence | | --- | --- | --- | --- | | Admin: Load Hollow demo | ✅ | status "Demo data loaded into the Event Log." | `platform-admin-seed.png` | | Home grid (13 tiles) | ✅ | 13 tiles + Upload button render | `platform-home-grid.png` | | Wallet (balance + history) | ✅ | balance **50**, 3 signed "Verified" txns | `platform-home-grid.png` / `platform-wallet.png` | | Upload a mini-app + mount | ✅ | custom app installs, runs, logs persist (count 0→1) | `platform-upload-success.png`, `platform-mounted-miniapp.png` | | Fair Share | ✅ | Water tile allocation **620** of pool | `miniapp-fair-share.png` | | Water Watch | ✅ | pH channel flips to **Alert** after 2-sensor corroboration; "water allocation re-solved" | `miniapp-water-watch.png` | | Tunnel Safety | ✅ | seeded flooded segment + reroute shown | `miniapp-tunnel-safety.png` | | Housing | ✅ | assigned slot `hollow-housing-slot-1` + reasoning | `miniapp-housing.png` | | Assembly | ✅ | roster (Aria, Kade — Active) + seeded proposal | `miniapp-assembly.png` | | Find Family | ✅ | search "Ana Ramirez" → **Match found** | `miniapp-find-family.png` | | Health Post | ✅ | triage chat + symptom tally + referral queue render | `miniapp-health-post.png` | | Light Clock | ✅ | manual-log fallback renders (no sensor in headless) | `miniapp-light-clock.png` | | Farms | ✅ | entered temps+plot+crop → real forecast yield | `miniapp-farms.png` | | Fair Draw | ✅ | commit→reveal→**Verified** badge + winner | `miniapp-fair-draw.png` | | The Climb | ✅ | entered shafts/demand/capacity → schedule + congestion | `miniapp-the-climb.png` | | Mentor | ✅ | at-risk feed lists **well-repair** | `miniapp-mentor.png` | | Sky | ✅ | posted memory appears on the wall | `miniapp-sky.png` | --- ## Platform features ### 1. Identity (Ed25519, device-local) - **What:** one cryptographic identity per device = "who you are" in the Hollow; no login, no account server. - **How:** an Ed25519 keypair is generated on first load (`src/lib/identity.ts`), stored in IndexedDB, and never leaves the device. Every event is signed with it; the public key (hashed) is the ledger account id. - **Use:** nothing to do — it bootstraps on first visit. The wallet card shows `--` until it resolves, then your balance. - **Validated:** every signed txn in the wallet history shows a **Verified** badge (signature re-checks against the key) — `platform-home-grid.png`; `transactionHistorySignature` e2e test. ### 2. Signed append-only event log - **What:** the single source of truth — every action (reading, vote, transfer, report) is one signed, immutable entry. - **How:** `append()` (`src/lib/eventlog.ts`) signs over the canonical `{payload, lamportTs}`, assigns a strictly increasing Lamport timestamp, and persists to Dexie. No update/delete path exists; replay is deterministic (`sortForReplay`). - **Use:** transparent — every mini-app reads/writes through it. - **Validated:** all 668 unit tests green; the wallet + every mini-app derive state from it live. ### 3. Mutual-credit wallet (replay-derived) - **What:** your resource-credit balance + transaction history. - **How:** the balance is **never stored** — `computeBalances()` (`src/lib/ledger.ts`) folds `wallet.issue`/`wallet.transfer` entries fresh every render; history is classified issued/sent/received. - **Use:** the blue card at the top of the shell; "View signature" on any row shows the Ed25519 proof. - **Validated:** balance **50** with 3 "Verified" rows (Issued +50, −10 to hollow-commons-fund, +10) — `platform-home-grid.png`. ### 4. Home-grid launcher (13 categorized tiles) - **What:** the Alipay/WeChat-style super-app launcher. - **How:** `HomeGrid.tsx` renders generically from `miniappRegistry.ts` (single source of truth; tiles are `