app: the House of Prayer's screens, changelog and README (APP-1.0-PLAN §3)

The 24-hour clock on the Prayer tab (midnight at the top, the night half darker,
open slots dashed, your own in gold, a hand at now), live over the stream with
polling as the fallback; tap an hour for Cover it / Join, the open hours as
buttons; signed out, back from Accounts with that slot's sheet open. The booking
sheet (once, every week, every day; length, end, reminder and channel, a note),
Me → My prayer (skip, add back, reminder, end date, stop, renew, "I prayed"),
the renew and "I prayed" link pages, sharing a testimony, Home's small clock
with the next gap and your next slot, the campaign card. The admin's House of
Prayer: the week, who prays when (names, access-logged), booking for a member,
the rules, campaigns, testimonies.

Checked in a browser on a throwaway PostgreSQL: one member books through the
sheet and a visitor's clock updates live; no page errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 10:42:35 +02:00
co-authored by Claude Opus 5.5
parent 5213bb36c0
commit 1dd3aadb60
24 changed files with 1631 additions and 13 deletions
+32 -1
View File
@@ -2,7 +2,8 @@
## [Unreleased]
Being built for `app@1.0.0` (docs/APP-1.0-PLAN.md). One migration so far (`20261201000000_init`).
Being built for `app@1.0.0` (docs/APP-1.0-PLAN.md). Two migrations so far (`20261201000000_init`,
`20261202000000_house_of_prayer`).
### Added
@@ -29,5 +30,35 @@ Being built for `app@1.0.0` (docs/APP-1.0-PLAN.md). One migration so far (`20261
- The frontend's shell: header, bottom tab bar, the church's footer, the manifest and icons
(`/app-icon/192|512|maskable|apple|favicon`), the service worker (`public/sw.js`), "Add to home
screen", the offline notice and page, Me, the admin's first dashboard, the sign-in problem page.
- **The House of Prayer** (plan §3):
- Slots of the church's length (60 minutes by default; 15 or 30) in its timezone, daylight saving
included (`src/lib/zoned.ts`). Commitments are rules (`PrayerCommitment`: start, length, once /
daily / weekly, end) plus skipped dates (`PrayerSkip`), never a row per occurrence
(`src/prayer/rules.ts`).
- The day's coverage as counts only (`GET /api/v1/prayer/day`; `mine` for the signed-in member),
cached until a booking changes; live over server-sent events (`/api/v1/prayer/stream`,
`X-Accel-Buffering: no`, a comment every 25 seconds), polling every 30 seconds without it.
- A member books just once, every week or every day (up to 12 months), several slots in a row, a
reminder and its channel; skips a date, changes or stops it outside the cancel window (8 hours by
default; inside it, who to contact); renews for another year; marks "I prayed" (self-reported)
for slots that ended in the last 14 days. A new time or days ends the old rule and starts a new
one, so the past stays as it was.
- Signed links that need no sign-in (`src/prayer/tokens.ts`): **Renew** (single use: signed over
the end date) and **I prayed**, each on a page that asks for the tap (`/prayer/renew`,
`/prayer/prayed`).
- Campaigns (`PrayerCampaign`: days left, coverage so far, hours prayed; their own target per slot)
and testimonies (`Testimony`: moderated first, first name or Anonymous, removable by the author,
the reason sent when one isn't shared).
- The admin (`/admin/prayer`; Prayer coordinator, Owner, Church admin): the week's coverage and
gaps, who prays when (names, each view in the new `AccessLog`), booking for a member, cancelling
any slot, the wall's rules (AppSetting `prayer_wall`), campaigns, testimonies.
- Jobs: `prayer-reminders` (every minute) and `prayer-renewals` (09:00; 14 and 3 days before the
end) queue messages in `OutboxMessage`; sending them by email and WhatsApp comes with plan §8.
- The heartbeat's `prayer` counts (last 7 days' coverage, active commitments); `user.export` and
`user.deleted` cover commitments, "I prayed" marks and testimonies (future slots open up, the
past stays as counts only).
- Screens: the 24-hour clock on the Prayer tab (tap an hour, Cover it / Join, the open hours as
buttons, back from signing in with the slot's sheet open), the booking sheet, Me → My prayer,
sharing a testimony, and Home's small clock with the next gap and your next slot.
- `env.template.json` (read by the Hub at the tag), `ecosystem.config.example.cjs` (ports 5400 / 3400
in development).