Files
nur-falah-prevention/DEMO_DATA.md
T
wmj 5b4a05afb2 feat: add Event Board to the Neighbourhood community board + dummy content
Researched mosque-app and community-board best practices (MadinaAPPS,
Nextdoor) before building: the pattern that works is one-tap RSVP with
what/who/where/when up front, plus a clean separation between plain
announcements and dated events. Deliberately did NOT auto-populate a
global Islamic calendar (Eid/Ramadan dates) — those are moon-sighting-
dependent and hardcoding one as fact would be exactly the kind of
fabrication this app avoids everywhere else (real Overpass data, real
Quran API, no invented listings). The Event Board is community-submitted
only: a mosque posting its own Eid prayer time is real information: this
app guessing the date isn't.

Implementation extends the existing Neighbourhood board rather than
building a parallel system: nf_neighbourhood_posts gains is_event/
event_date/event_location, plus a new nf_event_rsvps table (RLS reuses
the existing nf_is_neighbourhood_member helper via a join, no duplicated
logic). UI adds an event toggle on the post form (reveals date/time/
location), a 📅-badged event card with one-tap 'I'm going' RSVP + live
count, and an All/Events/Announcements filter with events sorted
soonest-first.

Seeded a real demo neighbourhood, 'Masjid Al-Falah Kariah' (join code
ALFALAH), with all 5 demo family owners plus a mutawalli as members: 3
announcements and 4 dated, RSVP'd events (Jumu'ah khutbah, weekly Quran
circle, an Islamic finance/estate-planning talk tying back to the app's
own core purpose, and a Ramadan iftar potluck). Caught and fixed two
seeding bugs during verification: timestamps stored without timezone
context displayed several hours off from the intended Malaysia-local
time, and a 'Saturday' event that actually landed on a Sunday — both
fixed by computing against real weekdays/timezone rather than guessing
offsets.

Covered by e2e-event-board.cjs (14/14), including live verification that
the seeded demo neighbourhood renders its real content. Full regression:
all suites pass.
2026-08-14 16:53:40 +08:00

70 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Demo data — 5 fully-populated families
Seeded directly against the live Supabase backend (not through the UI) for
speed. All accounts share the password `DemoPassword123!`.
## Families
| Family | Owner login | Assets | Coverage | Notable features |
|---|---|---|---|---|
| **The Ismail Family** | `nf.demo.ismail@gmail.com` | 5 (RM1.72M) | **100%** | Near-fully-planned demo — Hibah (house, car), Nomination (bank, digital custody, business continuity). Has an extra `member` (spouse) and an `agent`/mutawalli. 3-generation, 6-person tree. |
| **The Rahman Family (UK)** | `nf.demo.rahman@gmail.com` | 4 (£578K) | **20%** | UK diaspora market — partial coverage, uses Wassiyah (charitable bequest) alongside Hibah/Nomination. Has an extra adult-child `member`. 4-person tree. |
| **The Osman Family** | `nf.demo.osman@gmail.com` | 6 (RM3.18M) | **31%** | Deliberately mostly **uncovered** — demonstrates the Coverage Dashboard's warning state and per-asset "next step" suggestions. Sole-proprietorship business with a waqf-enterprise redirect note. 6-person tree (4 children). |
| **The Yusuf Family** | `nf.demo.yusuf@gmail.com` | 4 (RM355K) | **94%** | Young family, digital-asset-heavy (Ethereum multisig nomination). Shares the same mutawalli/agent as the Ismail family — demonstrates a professional agent managing multiple families. 3-person tree (young child). |
| **The Karim Family** | `nf.demo.karim@gmail.com` | 3 (RM758K) | **100%** | Family Waqf demo — an apartment dedicated as waqf corpus with a named mutawalli and successor. 3-person tree. |
## Shared/reusable accounts
| Login | Role | Used in |
|---|---|---|
| `nf.demo.spouse1@gmail.com` | member | Ismail Family |
| `nf.demo.child1@gmail.com` | member | Rahman Family |
| `nf.demo.mutawalli@gmail.com` | agent | Ismail Family **and** Yusuf Family (multi-family mutawalli demo) |
## What each family exercises
- **Coverage Dashboard**: full spread from 20% to 100%, so the warning/success states and per-asset suggestions are all visible without adding data manually.
- **Hibah / Nomination / Waqf / Wassiyah**: every fast-path channel type has at least one real example (bank-mandate, digital-custody in both multisig and key-escrow modes, business-continuity in both company-shares and sole-proprietorship modes, trust, family waqf).
- **Family roles**: owner-only (Osman, Yusuf, Karim), owner+member (Rahman), owner+member+agent (Ismail) — and a shared agent across two families (Ismail + Yusuf).
- **Genealogy**: every family has a real multi-person tree (36 people), all with parent/child and/or spouse relationships, so the Tree tab is never empty for a demo.
## Verification
Ran `verify-demo-families.cjs` against the live app (not just SQL success) —
confirms sign-in, correct asset count, non-zero estate total, coverage
percentage, correct person count, and non-empty tree render for all 5
families. 35/35 passing.
## Insurance/Takaful, Liabilities & Asset Verification (added later)
Three additions, covered by `e2e-insurance-verification.cjs` (12/12):
- **Insurance & Takaful tab** — per-member (`nf_insurance_policies`), same
author-owns-writes/family-reads pattern as Wassiyah/Waqf. Life, Takaful,
medical, or asset-specific policies with an optional proof document.
- **Liabilities** (bottom of the Assets tab) — family-shared
(`nf_liabilities`), kept distinct from assets because Faraid requires debts
settled before distribution. Optionally linked to the asset it's secured
against, with a loan-document attachment.
- **Asset ownership verification** — every asset in the Asset Registry can
now take a proof document (car grant, land title, cover note) and a
verified/unverified badge. Either the mutawalli/agent OR any other family
member can confirm — not gated to a single approver, since several demo
families have no agent assigned.
- The Mutawalli dashboard's per-member document summary now also lists each
member's insurance/Takaful policies.
- All proof documents (policies, liabilities, assets) share one private
Storage bucket, `nf-asset-documents`, with the same family-membership RLS
pattern used for person photos.
## Demo Neighbourhood — "Masjid Al-Falah Kariah"
Join code `ALFALAH`. All 5 demo family owners plus `nf.demo.mutawalli@gmail.com`
(as "Ustaz Hafiz") are members — reachable from any demo account via
Family → Neighbourhood. Seeded with 3 plain announcements and 4 dated,
RSVP'd events (Jumu'ah khutbah, weekly Quran circle, an Islamic
finance/estate-planning talk, and a Ramadan iftar potluck), so the board
and Event filter are never empty for a demo. Event dates are computed
relative to "today" (real Fridays/Saturdays), not hardcoded — reseed with
fresh relative dates if this demo goes stale.