Files
crosscode-platform/apps/app/CHANGELOG.md
T
joshuaandClaude Opus 5.5 0ac6827ddd app: announcements, devotionals and events' screens; @crosscode/seo 1.1.0 (APP-1.0-PLAN §5-§7)
Public pages: Home with today's devotional, the latest announcements (pinned
first) and what's on; Announcements and each one's page (markdown without
HTML, a button, Article JSON-LD; members-only ones ask for a sign-in and are
noindex); Devotional (the passage in full with its copyright line, Read in
YouVersion, the prayer), each day's page, the archive by month and the
Acknowledgements; Events and each one's page (Register on the Events site for
Cross Events', a canonical to the origin, Event JSON-LD on the App's own).
A sitemap of the public pages, named in robots.txt.

Admin: Announcements (schedule, end, pin, campus, who sees it, also send it),
Events (simple events, Linked products: publish and show events from), and
Devotionals (Cross Code's or our own, Sync now, a month's days, writing, the
CSV import with its preview, keep or replace days already filled).

@crosscode/seo 1.1.0: articleJsonLd. The backend gives the App's own address
and the sitemap's list, and a simple event's crosscode.event/1 for its page.

Checked in a browser on a throwaway PostgreSQL: the pages for a visitor, the
JSON-LD, a members-only announcement asking for a sign-in, the sitemap, a
Content admin publishing an announcement and a Devotional writer saving one;
no page errors. 94 backend tests, 19 seo tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:36:41 +02:00

106 lines
8.3 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.
# Changelog — Church App
## [Unreleased]
Being built for `app@1.0.0` (docs/APP-1.0-PLAN.md). Four migrations so far (`20261201000000_init`,
`20261202000000_house_of_prayer`, `20261203000000_prayer_requests`, `20261204000000_content`).
Ships `@crosscode/seo` 1.1.0 (`articleJsonLd`, workspace).
### 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.
- **Prayer requests** (plan §4, `src/requests/`):
- `PrayerRequest`: the prayer team only (the default) or members of the church, after a
coordinator approves it, with the first name or "Anonymous"; fully anonymous (the team doesn't
see who either) only when the church allows it (AppSetting `prayer_requests`, off by default).
Never public, never in stats, the heartbeat or a message's text.
- Coordinators approve, edit out details (the sender sees what changed) or don't share (with a
reason); anyone on the team replies privately (`PrayerRequestUpdate`, author `team`) or
escalates: Pastoral care is told at once by email and WhatsApp (an Owner or Church admin when
nobody has the role); the request leaves the shared list and the sender sees nothing different.
- Members tap "I prayed" (`RequestPrayer`: the sender sees how many, never who); the sender adds
"Answered!", closes or deletes it. Requests close after 30 days (7–90) and are deleted 12 months
after closing (`prayer-requests-tidy`, 03:30).
- Every admin list with senders goes in the access log (now `src/lib/accessLog.ts`). Export and
delete cover a member's requests.
- Screens: Ask for prayer (who sees it, the emergency numbers, South African by default), Pray for
others, My prayer requests, and the admin's Prayer requests (waiting, open, escalated, closed,
settings). The Prayer tab shows with either prayer module.
- **Announcements** (plan §5, `src/content/announcements.ts`): title, markdown text (shown without
HTML, `react-markdown`), image, an optional button, a campus from the church profile, everyone or
members only, pinned, a publish time and an end. Public ones are pages of their own (canonical,
Article JSON-LD, in the sitemap); members-only ones ask for a sign-in and are noindex. Content
admins write them (`/admin/announcements`). "Also send it" by email or WhatsApp is saved, and
sent once at the publish time with §8. The heartbeat counts the last 30 days.
- **Devotionals** (plan §6, `src/content/devotionals.ts`): Cross Code's from the Hub
(`crosscode-devotionals`, 01:15, and Sync now: the next 2 weeks from today in the church's
timezone, with the licence; exactly those days replaced, earlier ones kept, so a Hub outage
changes nothing), or the church's own (Settings → Devotionals, AppSetting `devotionals_source`),
written by Devotional writers or imported from the Hub's CSV (a preview first; days already
filled kept or replaced). Only KJV and BSB. The passage in full with its copyright line (and a
disclaimer where there is one) and Read in YouVersion; today's from midnight or the most recent;
the archive by month; members-only ones; the Acknowledgements page; Article JSON-LD.
- **Events** (plan §7, `src/events/`): simple events made by Content admins in the church's
timezone (`/admin/events`), and the event feed both ways, as the Website's: the App's own published
as `crosscode.event/1` (`/api/feed/v1/events`, removals for 90 days, `event.changed` to siblings),
and read-only copies of Cross Events' and the Website's (`event-feed`, every 15 minutes and on
their `event.changed`) with Register on the Events site and a canonical to the origin. Event
JSON-LD on the App's own events only. Linked products: publish, and show events from each sibling.
- Home shows today's devotional, the latest announcements (pinned first) and what's on. A sitemap
of the public pages (`/sitemap.xml`, never prayer, members-only items or imported events), named
in robots.txt. `GET /api/v1/app` gives the App's own address (`url`).
- `env.template.json` (read by the Hub at the tag), `ecosystem.config.example.cjs` (ports 5400 / 3400
in development).