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>
65 lines
4.7 KiB
Markdown
65 lines
4.7 KiB
Markdown
# Changelog — Church App
|
|
|
|
## [Unreleased]
|
|
|
|
Being built for `app@1.0.0` (docs/APP-1.0-PLAN.md). Two migrations so far (`20261201000000_init`,
|
|
`20261202000000_house_of_prayer`).
|
|
|
|
### Added
|
|
|
|
- **The foundation** (plan §1, §2, §10, §12): `backend/` (Express, Prisma, pg-boss) and
|
|
`frontend/` (Next.js 16), as the Website.
|
|
- The Hub: registers with a `CCP-` key from `HUB_LICENCE_KEY`, a heartbeat every 15 minutes with
|
|
`hub.appStatsSchema` (the active-member band, the modules on; prayer, announcement and message
|
|
counts 0 until their modules arrive), the licence checked offline.
|
|
- Links: Connect and Disconnect (`crosscode.link/1`) with Accounts, Events and the Website; links
|
|
itself to Accounts once the Hub lists it; `church.changed` from Accounts.
|
|
- Signing in through Accounts (`@crosscode/auth-client`), back to the exact page. Everyone signed
|
|
in is a Member (`Member`, keyed by the account's `sub`, a copy of the profile with the verified
|
|
phone number and the WhatsApp opt-out). A sign-in lasts 8 days, renewed by each visit, never
|
|
past 90 days from the sign-in (`SESSION_DAYS`, `SESSION_MAX_DAYS`). Back-channel logout.
|
|
- Roles (Owner, Church admin, Content admin, Devotional writer, Prayer coordinator, Pastoral
|
|
care): only with a 2FA sign-in (`TWO_FACTOR_NEEDED` otherwise; the admin's sign-in asks Accounts
|
|
for a second step). The first Owner from `HUB_ADMIN_EMAIL`, verified.
|
|
- Active members: `lastActiveAt`, at most one write a day in the church's timezone; the band in
|
|
the heartbeat and on the dashboard.
|
|
- Modules switched on and off (`modules` setting, `PUT /api/v1/admin/modules`, Owner and Church
|
|
admin, audited).
|
|
- `GET /api/v1/app`: the church profile, its colours made safe, font pairing and corners, the
|
|
modules on, the timezone.
|
|
- 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).
|