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.
This commit is contained in:
@@ -56,3 +56,14 @@ Three additions, covered by `e2e-insurance-verification.cjs` (12/12):
|
||||
- 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.
|
||||
|
||||
Reference in New Issue
Block a user