crosscode: the Church App (app.sh, add, demo) and the App's changelog

scripts/products/app.sh and app.env.template.json; app in
SUPPORTED_PRODUCTS; crosscode add <church> app (Accounts first);
crosscode demo <church> app --profile <s>, and the App's turn, last,
in a whole demo scenario. app.bats and demo.bats; app.sh linted.
The full bats suite wasn't run (stopped for low memory); app.bats and
demo.bats pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-01 16:11:41 +02:00
co-authored by Claude Opus 5.5
parent acd3b259a1
commit 71f2f02ee5
11 changed files with 407 additions and 25 deletions
+24
View File
@@ -155,6 +155,30 @@ Ships `@crosscode/seo` 1.1.0 (`articleJsonLd`, workspace).
`crosscode.church-export/1`: members with their roles, the wall, commitments as rules, "I
prayed", campaigns, testimonies, prayer requests with their moderation, the emergency numbers,
announcements, the church's own devotionals and events, and the uploads; no internal ids.
- **The demo scenarios** (plan §12, `src/demo/`, `scripts/demo.ts`): `npm run demo` loads Acacia
Hill; `--profile <scenario>` (with `--scenario`, as the agent sends it) any of the eight demo
churches, around `@crosscode/demo`'s people with the same account ids as Accounts, so their
sign-ins find them. Each is in its scenario's active-member band (0–100 to 2 001–5 000), with its
leads' roles; three months of prayer commitments with the scenario's coverage (a quiet parish wall,
30-minute slots in the Karoo, every hour twice at Northpoint, students on the 02:00 slots), a few
skips and renewals due, "I prayed" on most of the last three weeks; a campaign (Lent from Ash
Wednesday to Easter Eve for St Columba's), testimonies, prayer requests waiting for approval,
announcements (per campus at Riverside, in Afrikaans in the Karoo), and Harbour City's setup
checklist half done. Devotionals: Cross Code's fetched from the Hub, or the church's own for St
Columba's (KJV), Harbour City and Karoo Gemeenskapskerk (Afrikaans, quoting the BSB). Events come
from Cross Events (else the Website) through the feed when linked, else the App's own. Demo members
of an earlier scenario go; real members and their roles stay; an App whose real members have
used it needs `--force`.
- The demo devotionals' passages are copied **word for word** from the public-domain KJV and BSB by
`scripts/demo-passages.ts` into `src/demo/passages.ts` (no Bible text typed or generated).
- **Nothing is sent to a demo person** (an address at `example.com`): the sender marks their
messages done without sending (`isDemoPerson`).
- **The `crosscode` script** (ships with this release): `scripts/products/app.sh` (the Website's
hooks for the App: ports 5400 / 3400, `contracts`, `ui`, `auth-client`, `seo` and `demo`, backups
as `app-*.sql.gz`, the export and uploads), `scripts/products/app.env.template.json`, `app` in
`SUPPORTED_PRODUCTS`; `crosscode add <church> app` (on `app.<address>`, Accounts first);
`crosscode demo <church> app --profile <s>` and the App's turn, last, in a whole scenario
(`crosscode demo <church> --scenario <s>`); bats tests (`app.bats`, `demo.bats`).
- 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`).
+10 -3
View File
@@ -8,7 +8,8 @@ and notification settings need a sign-in through the church's Accounts. The admi
**State:** being built (from 2026-12-01) on the branch `feat/app-scaffold`, which is merged into
main only when `app@1.0.0` is done (main keeps a placeholder until then). Not released;
`app@1.0.0` is tagged when the plan is built. Done so far (the foundation, plan §1, §2, §10, §12, the House of Prayer, §3, prayer requests, §4, and announcements, devotionals and events, §5–§7):
`app@1.0.0` is tagged when the plan is built. Done so far (plan §1–§12: the foundation, the House of Prayer, prayer requests, announcements,
devotionals and events, email and WhatsApp, the admin, and the demo scenarios):
- **Backend:** Express + Prisma + pg-boss (ES modules, as the Website). Registers with the Hub
(`CCP-` licence key, product `app`) and sends the heartbeat with the active-member band the App
@@ -52,8 +53,14 @@ main only when `app@1.0.0` is done (main keeps a placeholder until then). Not re
(`backend/src/media/`); backups of the database and the images (`backend/src/backups/`); the
church export's `app` part (`backend/scripts/export-church.ts`).
**Still to come** (plan §12–§15): the demo church and scenarios, `scripts/products/app.sh`, e2e,
axe and Lighthouse.
- **Demo scenarios** (§12, `backend/src/demo/`): `npm run demo` loads Acacia Hill; `npm run demo --
--profile <scenario>` any of the eight demo churches (`--list`), around the same people as
Accounts. On a server: `crosscode demo <church> app --profile <s>`, or the whole scenario with
`crosscode demo <church> --scenario <s>` (`scripts/products/app.sh`; `crosscode add <church> app`).
The demo devotionals' Bible text comes only from `backend/scripts/demo-passages.ts`, which copies
it from the public-domain KJV and BSB files (not in the repo): never type or edit it.
**Still to come** (plan §14–§15): e2e, axe and Lighthouse.
- `backend/`: `npm run dev`, `npm test` (Node's test runner through tsx), `npm run build`. The
schema is in `prisma/schema.prisma`.