app: the Church App's foundation; docs for Hub 2.26.1 and two years of devotionals

apps/app (not released; app@1.0.0 is built in slices, APP-1.0-PLAN §15):
- backend (Express, Prisma, pg-boss, as the Website): the Hub client
  (CCP-, product app, the active-member band in the heartbeat), links
  and church.changed, sign-in through Accounts (everyone a Member; 8 days
  renewed up to 90; every role only with 2FA; the first Owner from
  HUB_ADMIN_EMAIL), Accounts' user.updated/export/deleted, active members
  once a day, modules on and off, GET /api/v1/app. Migration init.
- frontend (Next.js 16): header, tab bar, footer, manifest and icons from
  the church profile, service worker, Add to home screen, Me, the admin's
  first dashboard.
- env.template.json, PM2 template, README, CHANGELOG, WHATS-NEW; 27 tests.

Docs: the Hub runs 2.26.1 with two years of Cross Code's devotionals; an
App gets 2 weeks, today included. HANDOVER lists the App's slices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 00:20:07 +02:00
co-authored by Claude Opus 5.5
parent 74dee881e4
commit bb36e06fa4
85 changed files with 4479 additions and 53 deletions
+25 -15
View File
@@ -30,10 +30,15 @@ links with the Website and Cross Events, so the three feel like one church.
**Where things stand:** every earlier phase is released and rolled out, including the Church Website
at Hope Family Church and a second church (confirmed by Joshua 2026-11-30). **Phase 6 progress
(2026-11-30):** `contracts@1.20.0` to `1.23.0`, `accounts@1.9.0`, `events@3.8.0`, `website@1.8.0` and
`agent@1.7.0`, Hub `v2.26.0` and `v2.26.1` and `contracts@1.24.0` (devotionals two years ahead, Apps fetch 2 weeks) released (not deployed yet), with the new shared package `@crosscode/demo` 1.1.0 (§12, "Demo scenarios").
`agent@1.7.0` released (not deployed yet), with the new shared package `@crosscode/demo` 1.1.0
(§12, "Demo scenarios"); Hub `v2.26.0` and `v2.26.1` with `contracts@1.24.0` (devotionals two years
ahead, Apps fetch 2 weeks, today included) released, and **the Hub runs 2.26.1 with two years of
Cross Code's devotionals** (Joshua, 2026-12-01).
The Bible publishers' terms were checked ([BIBLE-PERMISSIONS.md](./BIBLE-PERMISSIONS.md)): 1.0
uses only the free translations, the KJV and the Berean Standard Bible (decision 14, contracts 1.22.0).
Next: deploy the Hub (2.26.1) and import the first devotionals (December 2026's are ready), then `app@1.0.0` (§15).
**Now: `app@1.0.0`** (§15), built in slices (HANDOVER, "Next up"). The foundation is done
(2026-12-01, `apps/app`, not released: §1, §2, the roles and active members of §10, the Hub
client of §12); the House of Prayer is next.
**Who uses 1.0:** the demo church (cross-demo2, Acacia Hill) first, then Hope Family Church. Then
it goes on sale (crosscode-site, ROADMAP §9).
@@ -46,8 +51,8 @@ it goes on sale (crosscode-site, ROADMAP §9).
- On a demo client, **Load a demo scenario** in the Hub loads Accounts, Events, the Website and
the App with the same church, people and events, in one step (§12, "Demo scenarios").
- The Hub holds at least 3 months of Cross Code devotionals (written or imported from CSV) in the free
translations (KJV, BSB; decision 14), and an App set to "From Cross Code" shows and sends them
with the translation's notice.
translations (KJV, BSB; decision 14) (**done**: two years, Joshua 2026-12-01), and an App set to
"From Cross Code" shows and sends them with the translation's notice.
- A member can add the App to their home screen (Android and iPhone), sign in once, book a one-off
or recurring prayer slot, get its reminder by email or WhatsApp, and change or cancel it within
the rules.
@@ -314,10 +319,13 @@ Decision 1: **two sources**, chosen in Settings → Devotionals:
reference YouVersion understands, a date already taken), then import the valid rows, replacing
or skipping days already filled. Columns: `date, title, passage, translation, passage_text,
body, prayer, author`. A template CSV can be downloaded from the page.
- **Getting them to the App:** an App on "From Cross Code" fetches the next **2 weeks** from the
Hub (`GET /api/v2/devotionals`, with its licence token; Joshua, 2026-11-30: 2 weeks at most,
contracts `CROSSCODE_DEVOTIONALS_FETCH_DAYS`) once a night and keeps them, so a Hub outage of
less than 2 weeks changes nothing (ROADMAP §1, rule 2). Edits in the Hub reach the App by the next night, or at
- **Getting them to the App:** the Hub holds up to two years (it has two, Joshua 2026-12-01), but
sends an App only the next **2 weeks, today included**: today and the 13 days after it
(`GET /api/v2/devotionals?from=<today in the church's timezone>`, with its licence token;
Joshua, 2026-11-30: 2 weeks at most, contracts `CROSSCODE_DEVOTIONALS_FETCH_DAYS`). The App
fetches once a night, replaces its copy of those 14 days and keeps what it already has (days
before today stay for the archive), so a Hub outage of less than 2 weeks changes nothing
(ROADMAP §1, rule 2). Edits in the Hub reach the App by the next night, or at
once with **Sync now** in the App's settings. The format is `crosscode.devotional/1`
(contracts 1.20.0), so a church's own and Cross Code's devotionals look the same.
- **Our own:** the same fields and the same CSV import in the App's admin, scheduled as far ahead as
@@ -549,7 +557,7 @@ data that describes **the same church**, so a demo shows the three products work
| Repo | Change | Version |
|------|--------|---------|
| `crosscode-platform` `apps/app` | New (§1–§12), with `CHANGELOG.md`, `WHATS-NEW.md`, `env.template.json`, e2e, demo data | `app@1.0.0` |
| `crosscode-platform` `apps/app` | New (§1–§12), with `CHANGELOG.md`, `WHATS-NEW.md`, `env.template.json`, e2e, demo data | `app@1.0.0` (**being built**; the foundation done 2026-12-01) |
| `crosscode-platform` `packages/contracts` | `app` in `DEMO_PRODUCTS`, `APP_MODULES`, the `app` part of the church export, `crosscode.devotional/1` and its CSV rules, the translations, `messaging.get`, `whatsapp.optout` | `contracts@1.20.0` (**released 2026-11-30**) |
| `crosscode-platform` `packages/contracts` | `agent.DEMO_SCENARIOS`, `scenario` in `seed-demo`, `accounts` in `DEMO_PRODUCTS` | `contracts@1.21.0` (**released 2026-11-30**) |
| `crosscode-platform` `packages/contracts` | The free translations only in 1.0 (`licence`, `FREE_BIBLE_TRANSLATION_IDS`, the CSV `translations` option), the Berean Standard Bible (`BSB`) added; the publishers' exact notices (`copyright`, `acknowledgement`, the Bible Society's `disclaimer`), `publisher` and `permissionsUrl`, `FREE_QUOTE_VERSES`, `quotedVerses`; `AFR83` named "Afrikaans 1983/1992-vertaling" | `contracts@1.22.0` (**released 2026-11-30**) |
@@ -578,8 +586,9 @@ data that describes **the same church**, so a demo shows the three products work
can't open, a day already filled), the YouVersion links, the nightly Cross Code fetch (and the
last copy kept when the Hub is down), `messaging.get`, the notice under every quoted passage
(screen, email, WhatsApp), only the free translations offered and imported.
- **Hub:** the Devotionals page, Import CSV with its preview, the 3-month limit, a translation that isn't
free refused, and the endpoint refusing anything but an App licence.
- **Hub:** the Devotionals page, Import CSV with its preview, the two-year limit (3 months in
2.26.0), a translation that isn't free refused, the endpoint answering 14 days from `from` (today
included) and refusing anything but an App licence.
- **Playwright** (phone, tablet and desktop): browse signed out; sign in from a slot and land back
on it with the sheet open (through 2FA); book once, weekly and daily; skip, change and cancel;
the 8-hour rule; two browsers, one books, the other's view updates live (and with the stream
@@ -605,10 +614,11 @@ data that describes **the same church**, so a demo shows the three products work
2. `contracts@1.21.0` (demo scenarios, **released 2026-11-30**), with the scenario demo loaders in Accounts 1.9.0, Events
3.8.0, `website@1.8.0` and `agent@1.7.0` (**both released 2026-11-30**).
3. Hub `v2.26.0` (vendored contracts 1.23.0; **released 2026-11-30**) and `v2.26.1` (contracts 1.24.0:
two years ahead, Apps fetch 2 weeks; **released 2026-11-30**) deployed, and the first 3 months of
Cross Code devotionals written or imported, in the KJV or BSB (decision 14). December 2026's are
ready to import (`temp/`, 32 days, BSB).
4. `app@1.0.0` tagged after the e2e and Lighthouse runs.
two years ahead, Apps fetch 2 weeks, today included; **released 2026-11-30**) deployed, and the
first 3 months of Cross Code devotionals written or imported, in the KJV or BSB (decision 14).
**Done:** the Hub runs 2.26.1 and holds two years (Joshua, 2026-12-01).
4. `app@1.0.0` tagged after the e2e and Lighthouse runs. **Being built** from 2026-12-01: the
foundation is done (`apps/app/CHANGELOG.md`, "Unreleased"); the slices are in the HANDOVER.
5. **cross-demo2** (Acacia Hill): New install → App, every demo scenario loaded once, the
throwaway test above.
6. **Hope Family Church:** New install → App; the prayer coordinators set the wall up before it's