From aacfd228a64b1e6eef19f4f9d6bb705b4c841a92 Mon Sep 17 00:00:00 2001 From: Joshua Oosthuizen Date: Mon, 30 Nov 2026 11:47:29 +0200 Subject: [PATCH] docs: phase 6 progress in every handover, README and plan HANDOVER (phase table, released 2026-11-30, next steps, demo scenarios, WhatsApp STOP rule, local PostgreSQL), ROADMAP phase 5/6, APP-1.0-PLAN status, the root README's folders, Events' handover / FEATURES / DEMO_DATA / README for STOP and the scenarios, Accounts' and @crosscode/demo's READMEs. Co-Authored-By: Claude Opus 5.5 --- README.md | 32 ++++++++++------- apps/accounts/README.md | 4 +++ apps/events/FEATURES.md | 7 ++-- apps/events/backend/DEMO_DATA.md | 22 +++++++++++- apps/events/backend/README.md | 2 +- apps/events/docs/HANDOVER.md | 37 ++++++++++++++++++- docs/APP-1.0-PLAN.md | 17 +++++---- docs/HANDOVER.md | 62 ++++++++++++++++++++++++++------ docs/ROADMAP-v3.md | 4 +-- packages/demo/README.md | 6 ++-- 10 files changed, 156 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index cdd93dd..4d721c1 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,26 @@ # Cross Code platform -The monorepo for the Cross Code products that come after Cross Events, and the formats they share. -The plan for every product is in [`docs/ROADMAP-v3.md`](./docs/ROADMAP-v3.md) (decided 2026-11-03); where -things stand is in [`docs/HANDOVER.md`](./docs/HANDOVER.md). +The monorepo for every Cross Code product except the Hub, and the formats they share. The plan for +every product is in [`docs/ROADMAP-v3.md`](./docs/ROADMAP-v3.md) (decided 2026-11-03); where things +stand is in [`docs/HANDOVER.md`](./docs/HANDOVER.md), and the latest release of everything in +[`docs/VERSIONS.md`](./docs/VERSIONS.md). | Folder | What | Status | |--------|------|--------| -| `packages/contracts` | `@crosscode/contracts`: the shared JSON formats (zod schemas, JSON Schema, TypeScript types, sample payloads) used by every product, including Cross Events and the Hub | Phase 0, in progress | -| `packages/ui` | `@crosscode/ui`: shared UI for the Website, App and Accounts | Placeholder, filled in during the Website phase | -| `apps/accounts` | Accounts: the per-church sign-in (OpenID Connect) | Placeholder (phase 3) | -| `apps/website` | Church Website | Placeholder (phase 5) | -| `apps/app` | Church App (PWA) | Placeholder (phase 6) | +| `apps/events` | Cross Events (moved in from `joshua/hope-events` in 2.2.0) | Released and in use | +| `apps/accounts` | Accounts: the per-church sign-in (OpenID Connect), the church profile | Released and in use | +| `apps/website` | Church Website | Released and in use (phase 5) | +| `apps/app` | Church App (PWA, House of Prayer) | Placeholder, being built (phase 6, [`docs/APP-1.0-PLAN.md`](./docs/APP-1.0-PLAN.md)) | +| `apps/agent` | The server agent: runs the Hub's signed jobs through the `crosscode` script | Released and in use | +| `packages/contracts` | `@crosscode/contracts`: the shared JSON formats (zod schemas, JSON Schema, TypeScript types, sample payloads) used by every product, including the Hub | Released and in use | +| `packages/auth-client` | `@crosscode/auth-client`: how a product signs in through Accounts | In use | +| `packages/seo` | `@crosscode/seo`: JSON-LD and meta for every public site | In use | +| `packages/ui` | `@crosscode/ui`: fonts, brand style, `ChurchFooter` | In use | +| `packages/demo` | `@crosscode/demo`: the demo scenarios' churches, people and logos | In use (Accounts, Events) | +| `scripts/` | The `crosscode` script: install, deploy, demo, env, export, uninstall on the servers | In use (`main` is the release) | -Cross Events (`joshua/hope-events`) moves in as `apps/events` in Events 2.2.0 -([`docs/EVENTS-2.2-PLAN.md`](./docs/EVENTS-2.2-PLAN.md)). Cross Code Hub (`joshua/events-hub`) stays in -its own repo and gets `@crosscode/contracts` as a packed release committed there (decision 22). +Cross Code Hub (`joshua/events-hub`) stays in its own repo and gets `@crosscode/contracts` as a +packed release committed there (decision 22). ## Docs @@ -22,8 +28,10 @@ its own repo and gets `@crosscode/contracts` as a packed release committed there |------|------| | [`docs/ROADMAP-v3.md`](./docs/ROADMAP-v3.md) | The plan: products, contracts, Accounts, sync, Hub, servers, build order, pricing, decisions | | [`docs/HANDOVER.md`](./docs/HANDOVER.md) | Where each phase stands and what's next | +| [`docs/VERSIONS.md`](./docs/VERSIONS.md) | The latest release of everything, and what's deployed where | | [`docs/hub-protocol.md`](./docs/hub-protocol.md) | Install ↔ Hub protocol, versions 1 and 2 (a copy lives in `events-hub`) | -| [`docs/EVENTS-2.2-PLAN.md`](./docs/EVENTS-2.2-PLAN.md) | Phase 1b: Cross Events into the monorepo, the `crosscode` script | +| `docs/*-PLAN.md` | Each phase's plan and decisions (Events 2.2, 2.4, 3.0; Accounts 1.0; Agent 1.0; Website 1.0; App 1.0) | +| [`docs/ROLLOUT-1.0.md`](./docs/ROLLOUT-1.0.md) | The rollout checklist | ## Rules (ROADMAP-v3 §1) diff --git a/apps/accounts/README.md b/apps/accounts/README.md index d68d974..6e4fbd9 100644 --- a/apps/accounts/README.md +++ b/apps/accounts/README.md @@ -16,6 +16,10 @@ sign-in settings, linked products and the church profile here. - Roles stay in each product: Accounts only knows who someone is (plan §2, "Roles stay in each product"). - Products sign in with `@crosscode/auth-client` (packages/auth-client). +- 1.9.0: the church's one set of email and WhatsApp settings for the App (`messaging.get`, + `messaging.changed`); the WhatsApp opt-out for every product (`src/accounts/whatsapp.ts`, its own + WAWP webhook in `src/links/whatsappWebhook.ts`); demo scenarios (`npm run demo -- --profile + --force`, `src/demo/scenario.ts`, with `@crosscode/demo`; demo sites only). Local development: Postgres in `backend/.env` (`DATABASE_URL`, `ACCOUNTS_URL=http://localhost:3200`, `LINKS_ALLOW_PRIVATE=true`), `npx prisma migrate deploy`, then `npm run dev` in both folders (the diff --git a/apps/events/FEATURES.md b/apps/events/FEATURES.md index aa29a39..bc5002e 100644 --- a/apps/events/FEATURES.md +++ b/apps/events/FEATURES.md @@ -765,8 +765,11 @@ registered for; always sent) or **News & announcements** (only to people who opt on that channel and haven't unsubscribed). News emails carry an unsubscribe link and one-click `List-Unsubscribe` headers; news WhatsApps end with "Reply STOP" and a link. Event updates say why they were sent and link to the preferences. A STOP reply on -WhatsApp turns off WhatsApp news (through WAWP's `message` webhook, checked against a -secret in the webhook URL). +WhatsApp (through WAWP's `message` webhook, checked against a secret in the webhook URL) +**stops every WhatsApp message to that number** from 3.8.0, event updates, tickets and +codes included (they go by email), and from the church's other sites too: it's passed on +to the church's Accounts, where the person turns WhatsApp back on (without Accounts, by +replying START). **Privacy notice** (`/legal/privacy`) — edited in **Admin → Privacy (POPIA)** (`/dashboard/admin/privacy`): sections start from the built-in text; drafts, preview, diff --git a/apps/events/backend/DEMO_DATA.md b/apps/events/backend/DEMO_DATA.md index 7599540..f2e92d7 100644 --- a/apps/events/backend/DEMO_DATA.md +++ b/apps/events/backend/DEMO_DATA.md @@ -11,7 +11,27 @@ showing it to: | `npm run demo:ministry` | One campus with weekly ministry | The Alpha Course running now (sessions, attendance, late joining, certificates), a finished Marriage Course with certificates, a 3-day conference sold by day, **Kids Church** with families, children, rooms and check-ins, **volunteer rosters**, a **Men's Breakfast series** with followers and a **season pass**, plus a family day, women's conference and carols. | | `npm run demo:multicampus` | A church with several campuses | **Campuses** Central, North and South (switched on), events per campus and church-wide, home campuses, staff limited to a campus (Anri Botha → North, Daniel Pillay → South), the breakfast series moving between campuses, kids church and rosters at two campuses, and all the events-demo events spread over the campuses. | -`npm run demo:list` prints the same list. Kids church always has a session **today** with +**3.8.0: the eight demo scenarios** (docs/APP-1.0-PLAN.md §12). Each is named after its +Website demo profile and is one of the churches every product of a demo client shows: + +| Profile | Church | Built as | +|---|---|---| +| `heritage-parish` | St Columba's Church | small | +| `heritage-city` | Grace Cathedral | events | +| `bold-youth` | Ignite Church | events | +| `bold-plant` | Harbour City Church | small | +| `community-family` | Acacia Hill Church (cross-demo2) | ministry | +| `community-town` | Karoo Gemeenskapskerk | small | +| `clean-modern` | Northpoint Church | ministry | +| `clean-campus` | Riverside Church (three campuses) | multicampus | + +They use the church's own people from `@crosscode/demo` (its leads are the staff and the event +contacts; the same people, with the same accounts, as in Accounts, the Website and the App) and +its own campuses. Load Accounts' part first (`crosscode demo accounts --profile …`), then +`npm run set-demo -- --profile= --yes` (or `crosscode demo --profile `). +A small church's events sell only to the people it has. + +`npm run demo:list` prints every profile. Kids church always has a session **today** with children checked in right now, so the kids desk and room screens have something live to show on any day. diff --git a/apps/events/backend/README.md b/apps/events/backend/README.md index bc6e928..b328814 100644 --- a/apps/events/backend/README.md +++ b/apps/events/backend/README.md @@ -145,7 +145,7 @@ npm run prisma:generate ### Demo data -`npm run set-demo -- --profile=` wipes the database (keeping site settings and the admin account) and stages demo data for that kind of church; from the repo root it's `npm run demo:` (`npm run demo:list` describes them). See [DEMO_DATA.md](DEMO_DATA.md). +`npm run set-demo -- --profile=` (3.8.0: the eight scenarios, e.g. `community-family`) wipes the database (keeping site settings and the admin account) and stages demo data for that kind of church; from the repo root it's `npm run demo:` (`npm run demo:list` describes them). See [DEMO_DATA.md](DEMO_DATA.md). --- diff --git a/apps/events/docs/HANDOVER.md b/apps/events/docs/HANDOVER.md index 9230d5c..1c1187f 100644 --- a/apps/events/docs/HANDOVER.md +++ b/apps/events/docs/HANDOVER.md @@ -1,5 +1,11 @@ # Handover — where things stand and how to carry on +> **2026-11-30:** Events is now at **3.8.0** (released, not deployed; 3.7.2 is rolled out). Where +> it stands and what's next is kept in the root [HANDOVER.md](../../../docs/HANDOVER.md) and +> [VERSIONS.md](../../../docs/VERSIONS.md); this file keeps the "where the code lives" notes. +> Changed since the note below: STOP stops all WhatsApp (see "Where WhatsApp STOP lives (3.8.0)") +> and the demo has the eight demo scenarios (see "Demo data"). + Last updated: 2026-11-18, after **2.3.1** (Next.js 16.4.6 for security advisories, on top of 2.3.0; released, not deployed yet; servers still run 2.1.1 until they're adopted, see the root [ROLLOUT-1.0.md](../../../docs/ROLLOUT-1.0.md)). @@ -263,7 +269,8 @@ Plan and reasons: the root [EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md `CommunicationConsent`), unsubscribe tokens (HMAC with `JWT_SECRET`, never expire), `filterRecipients` (every bulk send goes through it: `kind` 'update' passes, 'news' only to opted-in accounts and not to `MessagingOptOut` addresses), email/WhatsApp footers, STOP - handling, data requests, `deletionBlockers`, `anonymiseUser`, `exportUserData` + PDF. + handling (news off; from 3.8.0 all WhatsApp too, below), data requests, `deletionBlockers`, + `anonymiseUser`, `exportUserData` + PDF. Tests: `backend/tests/privacy.test.js`; e2e: `e2e/privacy.spec.ts`. - `controllers/privacyController.js` + `routes/privacyRoutes.js` (`/api/privacy`). - Bulk sends: `broadcastController`, `whatsappBroadcastController`, and `emailEventAttendees` / @@ -472,6 +479,22 @@ Plan and reasons: the root [EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md - Frontend: `components/admin/WebhooksTab.tsx`. Tests: `tests/webhooks.test.js`, e2e `webhooks.spec.ts` (runs a receiver on localhost:5199; e2e backend has `WEBHOOKS_ALLOW_PRIVATE`). +## Where WhatsApp STOP lives (3.8.0) + +- APP-1.0-PLAN decision 11: STOP to the church's WhatsApp number stops **all** WhatsApp from every + one of the church's products (event updates, tickets, kids messages, 2FA codes), not only news. +- `src/utils/whatsappStop.js`: `isWhatsAppStopped` (by number in `WhatsAppStop`, or an account with + `User.whatsappOptedOut`, set from Accounts' `user.updated` `whatsapp_opted_out`), `recordStop`, + `clearStop`, `isStartKeyword`. `sendText` / `sendPdf` (`utils/whatsapp.js`) check it before every + message; only the reply that confirms a STOP is sent anyway (`evenIfStopped`). 2FA codes for a + stopped number go by email (`utils/twoFactor.js`). +- The webhook (`handleIncomingMessage`): STOP → kept, news off (`privacy.whatsAppStop`), passed on to + Accounts (`src/accounts/whatsappOptOut.ts`, `whatsapp.optout`); the reply links Accounts' account + page. START turns it back on only without Accounts (with Accounts it's turned on there, and + `updateLocalCopy` clears this site's STOP for the number). +- **Anything new that sends WhatsApp** goes through `sendText` / `sendPdf`, never WAWP directly. +- Tests: `tests/whatsappStop.test.js`, `tests/accountsWhatsappOptOut.test.ts`. + ## Demo data (1.48.2) - `backend/scripts/set-demo.js` builds everything in memory and writes it with `createMany` in one @@ -486,6 +509,14 @@ Plan and reasons: the root [EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md - Tried by seeding all four into a throwaway database and calling the API (events, series page and report, season pass, kids board, roster, attendance registers, certificate check, cashups, campus scoping). +- **3.8.0, the demo scenarios** (APP-1.0-PLAN §12): `PROFILES` also has one per scenario + (`agent.DEMO_SCENARIOS`), each a copy of one of the four kinds (`SCENARIO_KINDS`) built around + the scenario's church from `@crosscode/demo`: its people (`buildScenarioPeople`: leads become the + staff, at most 260 members), its campuses (`buildCampuses`), its staff as event contacts + (`staffName`). Builders stop when a small church runs out of people (`nextBuyer` returns null), + so don't add one that needs a fixed number of people without the same guard. The scenario's + own people are never sent to `people.removeDemo` (Accounts loaded them first). All eight and + the four were loaded into a throwaway PostgreSQL 18 database before release. ## Where the dashboard and palette live (1.49.0) @@ -745,6 +776,10 @@ Plan and reasons: the root [EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md into WAWP (events `message` + `session.status`), and only for senders WhatsApp identifies by phone number — a sender known only by a "LID" is logged and ignored (they can still use the link in the message). +- (3.8.0) No test yet for a 2FA code falling back to email for a number that replied STOP. +- (3.8.0) The demo scenarios reuse the four demos' events: a scenario's own events (Grace + Cathedral's concert series, Ignite's youth conference) and Afrikaans content for Karoo + Gemeenskapskerk aren't built yet. - There's no log of individual messages sent, so "Download my data" can't include "messages sent to you" yet. diff --git a/docs/APP-1.0-PLAN.md b/docs/APP-1.0-PLAN.md index 2d3fdd2..32ac6af 100644 --- a/docs/APP-1.0-PLAN.md +++ b/docs/APP-1.0-PLAN.md @@ -28,15 +28,18 @@ look comes from the church profile (colours, logo, fonts, corners) and it shares 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). +at Hope Family Church and a second church (confirmed by Joshua 2026-11-30). **Phase 6 progress +(2026-11-30):** `contracts@1.20.0` and `1.21.0`, `accounts@1.9.0` and `events@3.8.0` released +(not deployed yet), with the new shared package `@crosscode/demo` 1.1.0 (§12, "Demo scenarios"). +Next: `website@1.8.0`, `agent@1.7.0`, Hub `v2.26.0`, then `app@1.0.0` (§15). **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). **Done when:** -- `app@1.0.0`, `contracts@1.20.0` (released 2026-11-30), `contracts@1.21.0` (released 2026-11-30), `accounts@1.9.0`, - `events@3.8.0`, `website@1.8.0`, `agent@1.7.0` and Hub `v2.26.0` are tagged; the Hub installs +- `app@1.0.0`, `contracts@1.20.0` (released 2026-11-30), `contracts@1.21.0` (released 2026-11-30), `accounts@1.9.0` + (released 2026-11-30), `events@3.8.0` (released 2026-11-30), `website@1.8.0`, `agent@1.7.0` and Hub `v2.26.0` are tagged; the Hub installs the App from New install (after Accounts) and lists its releases. - 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"). @@ -521,10 +524,11 @@ data that describes **the same church**, so a demo shows the three products work | `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` `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` `apps/accounts` | `messaging.get` for linked products, a hint when the messaging settings change, the WhatsApp opt-out for every product; demo data (the scenario's church profile with its logo and icon, and its people) | `accounts@1.9.0` | -| `crosscode-platform` `apps/events` | STOP replies passed to Accounts; the opt-out read from Accounts; demo profiles reworked to the scenarios | `events@3.8.0` | +| `crosscode-platform` `apps/accounts` | `messaging.get` for linked products, a hint when the messaging settings change, the WhatsApp opt-out for every product; demo data (the scenario's church profile with its logo and icon, and its people) | `accounts@1.9.0` (**released 2026-11-30**) | +| `crosscode-platform` `apps/events` | STOP stops all WhatsApp, passed to Accounts; the opt-out read from Accounts; a demo profile per scenario (its four kept) | `events@3.8.0` (**released 2026-11-30**) | | `crosscode-platform` `apps/website` | Demo profiles take the scenario's people and events (`--scenario`) | `website@1.8.0` | | `crosscode-platform` `apps/agent` | `seed-demo` for `app` and `accounts`, `--scenario` passed on | `agent@1.7.0` | +| `crosscode-platform` `packages/demo` | New: the scenarios' churches, people (`gender` from 1.1.0) and SVG logos | `@crosscode/demo` 1.1.0 (workspace, **released with Accounts 1.9.0 / Events 3.8.0**) | | `crosscode-platform` `packages/ui` | The tab bar and bottom sheet, if worth sharing; otherwise nothing | workspace | | `crosscode-platform` `packages/seo` | `Article` builder for devotionals and announcements; the icon generator for the manifest | workspace | | `crosscode-platform` `scripts/` | `products/app.sh`, `app.env.template.json`, bats tests | — | @@ -564,7 +568,8 @@ data that describes **the same church**, so a demo shows the three products work ## 15. Releasing and rolling it out 1. `contracts@1.20.0` (**released 2026-11-30**), then `accounts@1.9.0` (`messaging.get`, the - WhatsApp opt-out) and `events@3.8.0` (STOP passed to Accounts), rolled out to every church. + WhatsApp opt-out) and `events@3.8.0` (STOP passed to Accounts), **both released 2026-11-30**, + rolled out to every church (not yet). 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`. 3. Hub `v2.26.0` (vendored contracts 1.21.0) deployed, and the first 3 months of Cross Code diff --git a/docs/HANDOVER.md b/docs/HANDOVER.md index 38b8deb..acbe52f 100644 --- a/docs/HANDOVER.md +++ b/docs/HANDOVER.md @@ -16,7 +16,7 @@ every release). | Repo | What | |------|------| -| `joshua/crosscode-platform` (this one) | Contracts, the apps (Events from 2.2.0; Accounts, Website and App to come), shared packages, the `crosscode` script (`scripts/`), the server agent (`apps/agent`), and these docs | +| `joshua/crosscode-platform` (this one) | Contracts, the apps (Events, Accounts, the Website; the App in phase 6), shared packages (`contracts`, `auth-client`, `seo`, `ui`, `demo`), the `crosscode` script (`scripts/`), the server agent (`apps/agent`), and these docs | | `joshua/hope-events` | Cross Events up to 2.1.x. Frozen; archived once every install is adopted (EVENTS-2.2-PLAN §7) | | `joshua/events-hub` | Cross Code Hub. Its own server, its own `scripts/deploy.sh` | | `joshua/crosscode-site` | crosscode.co.za. Updated at the end of every phase that changes what it says (ROADMAP §9) | @@ -25,19 +25,34 @@ every release). | Phase | What | State | |-------|------|-------| -| 0 | contracts 1.0.0 → 1.17.0 | **Released and in use.** Not published to a registry (decision 22): the Hub gets a packed release committed to its repo (`backend/vendor/`) | +| 0 | contracts 1.0.0 → 1.21.0 | **Released and in use.** Not published to a registry (decision 22): the Hub gets a packed release committed to its repo (`backend/vendor/`) | | 1 | Hub 2.0 → 2.20.0 | **Released, deployed and tested** (Hub `v2.20.0`) | | 1b | Cross Events 2.2.0: moved here as `apps/events`, the `crosscode` script | **Released, rolled out and tested.** Every install adopted onto the monorepo | | 1c | Cross Events 2.3.x: authenticator app 2FA | **Released and rolled out** (carried into Accounts in phase 4) | | 1d | Agent 1.x + Hub 2.1+ | **Released, rolled out and tested** (agent `1.5.0` on every server: from 1.4.0 the Hub reads and changes frps's / frpc's config and probes ports before an install; from 1.5.0 one product of a church can be uninstalled, exported or purged) | | 2 | Cross Events 2.4.0: protocol v2, Linked products, event feed, `packages/seo` | **Released, rolled out and tested** ([EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md)) | -| 3 | Accounts 1.0.0 | **Released, rolled out and tested** (now `accounts@1.6.0`; [ACCOUNTS-1.0-PLAN.md](./ACCOUNTS-1.0-PLAN.md)) | -| 4 | Cross Events 3.0.0: sign-in through Accounts | **Released, rolled out and tested** (now `events@3.7.0`; [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md)). Churches sign in through their Accounts; crosscode-site `v1.6.0` deployed | +| 3 | Accounts 1.0.0 | **Released, rolled out and tested** (`accounts@1.8.0` rolled out; `1.9.0` released 2026-11-30 for phase 6, not deployed; [ACCOUNTS-1.0-PLAN.md](./ACCOUNTS-1.0-PLAN.md)) | +| 4 | Cross Events 3.0.0: sign-in through Accounts | **Released, rolled out and tested** (`events@3.7.2` rolled out; `3.8.0` released 2026-11-30 for phase 6, not deployed; [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md)). Churches sign in through their Accounts; crosscode-site `v1.6.0` deployed | | 4+ | Running it: jobs from the dashboard, styled emails, .env from the Hub, sign-in health, the nightly people check; then frp config and one-product uninstalls, and the Hub's popups, pickers and port list | **Released, deployed and tested** 2026-11-20 and 2026-11-23 (below) | | 5 | Church Website 1.0.0 | **Released 2026-11-26** (planned 2026-11-21: [WEBSITE-1.0-PLAN.md](./WEBSITE-1.0-PLAN.md), all decisions confirmed). Font pairings confirmed 2026-11-24, section variants per template 2026-11-25 (§3). `contracts@1.17.0`, `accounts@1.7.0` and `events@3.7.0` released 2026-11-24, Hub `v2.21.0` 2026-11-25 (the Hub deployed 2026-11-25; the others not rolled out yet). `contracts@1.18.0` and Hub `v2.22.0` (Get more storage) released 2026-11-25, the Hub deployed 2026-11-26. **`website@1.0.0` and `1.0.1` released 2026-11-26**, crosscode-site `v1.7.0` (the Website on sale) released 2026-11-26. **Done** (confirmed by Joshua 2026-11-30): crosscode-site deployed, Hope Family Church and a second church live, the remaining release checks finished. Now `website@1.7.1` (VERSIONS.md) | -| 6 | Church App 1.0.0 | **Being planned** (2026-11-30): [APP-1.0-PLAN.md](./APP-1.0-PLAN.md), decisions confirmed 2026-11-30 (two left in "Still open"); mockup on the Design canvas "Church App 1.0 mockup" | +| 6 | Church App 1.0.0 | **Under way** (planned and started 2026-11-30): [APP-1.0-PLAN.md](./APP-1.0-PLAN.md), decisions confirmed 2026-11-30 (decision 13, the demo scenarios, added the same day); mockup on the Design canvas "Church App 1.0 mockup". Released 2026-11-30, not deployed: `contracts@1.20.0` and `1.21.0`, `accounts@1.9.0`, `events@3.8.0` (below). Next: Website 1.8.0, agent 1.7.0, Hub 2.26.0, `app@1.0.0` | | 7 | App 1.x | Not started | +## Released 2026-11-30 (phase 6, first steps) + +Tagged and pushed on 2026-11-30, **not deployed yet** (each app has one migration). Details in +[VERSIONS.md](./VERSIONS.md), [CHANGELOG.md](../CHANGELOG.md) and the apps' CHANGELOGs. + +| Release | What | +|---------|------| +| `contracts@1.20.0` | The App's contracts: `crosscode.devotional/1` and the devotionals CSV checks (shared by the Hub and the App), the Bible books and seven translations with YouVersion ids, `messaging.get` / `messaging.changed`, `whatsapp.optout` and `whatsapp_opted_out`, `APP_MODULES`, the `app` part of the church export | +| `contracts@1.21.0` | `agent.DEMO_SCENARIOS`: the eight demo churches, one per Website demo profile; `scenario` in `seed-demo`, `accounts` in `DEMO_PRODUCTS` | +| `accounts@1.9.0`, `@crosscode/demo` 1.0.0 | `messaging.get` for the App; the WhatsApp opt-out for every product (STOP kept per number and account, Accounts' own WAWP webhook, "Turn WhatsApp back on"); a scenario's church profile, SVG logo and icon, and people (`crosscode demo accounts --profile `) | +| `events@3.8.0`, `@crosscode/demo` 1.1.0 | STOP stops all WhatsApp (not only news), checked before every message and passed on to Accounts; the eight scenarios as Events demo profiles, around each church's own people and campuses | + +All four were checked on PostgreSQL 18 (local, details in `temp/`, never committed): migrations, +scenario loads, the opt-out. + ## Released 2026-11-23 All tagged, pushed and deployed on 2026-11-23. Details in [VERSIONS.md](./VERSIONS.md) and the Hub's @@ -100,11 +115,21 @@ Everything up to and including phase 5 (the Church Website) is released and roll Family Church and a second church are live on the Website, crosscode-site sells it (confirmed by Joshua 2026-11-30; VERSIONS.md, "Deployed / rolled out"). -1. **Phase 6, Church App 1.0.0** (ROADMAP §7, §9). Planned in [APP-1.0-PLAN.md](./APP-1.0-PLAN.md) - (2026-11-30, decisions confirmed): contracts 1.20.0 → Accounts 1.9.0 (shared email and - WhatsApp for the App, the WhatsApp opt-out for every product) and Events 3.8.0 (STOP passed to - Accounts) → Hub 2.26.0 (with Cross Code devotionals) → `app@1.0.0` → cross-demo2 (with a throwaway install from the Hub) → Hope Family - Church → crosscode-site 1.10.0 (the App on sale). +1. **Phase 6, Church App 1.0.0** (ROADMAP §7, §9), [APP-1.0-PLAN.md](./APP-1.0-PLAN.md) §15. + **Done 2026-11-30 (released, not deployed):** contracts 1.20.0 and 1.21.0, Accounts 1.9.0, + Events 3.8.0. **Next:** + 1. **Website 1.8.0:** its eight demo profiles take each scenario church's people (leaders, + pastor) from `@crosscode/demo` and accept `--scenario`; the Website builds `packages/demo`. + 2. **Agent 1.7.0:** `seed-demo` for `app` and `accounts`, `--scenario` passed on + (`SEED_SCENARIO_MIN_AGENT`; bump `AGENT_VERSION` too). + 3. **Hub 2.26.0** (vendored contracts 1.21.0): the App in New install and releases, billing on + the active-member band, **Load a demo scenario** on a demo client, the **Devotionals** page + (3 months ahead, Import CSV) and `GET /api/v2/devotionals`. Then write or import the first 3 + months of Cross Code devotionals. + 4. **`app@1.0.0`** → cross-demo2 (every scenario loaded, the throwaway install from the Hub) → + Hope Family Church → crosscode-site 1.10.0 (the App on sale). + Deploying Accounts 1.9.0 and Events 3.8.0 to the churches can happen any time before the App; + a church without Cross Events gives WAWP the address in Accounts → Admin → Email and WhatsApp. Done (confirmed by Joshua 2026-11-25): `hope-events` is archived, and every FastPanel site set up before Hub 2.10.0, and the Hub's own site, has `location ^~ /api/`. @@ -148,6 +173,18 @@ rollout. - **Demo data:** Hub → the install's page → Mark as a demo site → Load demo data (Hub 2.4.0, agent 1.2.0; `crosscode demo --profile …` on the server). By hand, run `npm run demo:*` as the site's user (`sudo -u cc- …`): only that user can read the `.env`. +- **Demo scenarios** (APP-1.0-PLAN §12, from 2026-11-30): eight preset churches, the list in + contracts `agent.DEMO_SCENARIOS`, each church's profile, people and logo in `packages/demo` + (`@crosscode/demo`, built by every product that uses it). **Accounts loads first** + (`crosscode demo accounts --profile `: profile, logo, people), then Events, + the Website and the App with the same profile name. People keep the same account id everywhere + and on every load (`demoId`); everything is at example.com with no phone numbers. A new demo + feature that should look the same in every product goes in `packages/demo`, not in one app. +- **WhatsApp STOP** (APP-1.0-PLAN decision 11, from Accounts 1.9.0 / Events 3.8.0): STOP means no + WhatsApp from any product, of any kind. Accounts keeps it (`whatsapp_opted_out` in + `user.updated`); every product checks it before sending (Events: `utils/whatsappStop.js`), and + whichever product receives a STOP passes it on with `whatsapp.optout`. The App and the Website + must do the same. - **A new Events install never takes over an existing database**: moving an existing site is `adopt`, not a New install pointed at the old database. - **Prisma in the monorepo:** each app other than Events sets its own generator `output`, so @@ -168,6 +205,11 @@ rollout. address there doesn't change the Hub's domain for the install or FastPanel. - **Demo data keeps the links** to the church's other products (`KEEP_TABLES` in `apps/events/backend/scripts/set-demo.js`). Anything that must survive a demo load goes there. +- **A local PostgreSQL** is on the dev machine (`temp/database details.txt`, git-ignored; the user is + `postgres`, the file says `postges`). Use a throwaway database per check (`cc___check`), + run `prisma migrate deploy` and `prisma migrate diff --from-config-datasource --to-schema …`, and drop + it afterwards. Never print the password. Events' database has an older drift on + `_EventNotifyRecipients` (an index Prisma now wants as a primary key), not from 3.8.0. - **Releasing:** branch → merge → tag (`@` here, `v` in events-hub and crosscode-site) → push, with a CHANGELOG entry, and `npm run check` first. Pushes to c-git often fail authentication the first time; retry once. A push can also hang waiting on a login prompt diff --git a/docs/ROADMAP-v3.md b/docs/ROADMAP-v3.md index c7656cd..abb0d18 100644 --- a/docs/ROADMAP-v3.md +++ b/docs/ROADMAP-v3.md @@ -641,8 +641,8 @@ Planned in [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). In short: | 2 | **Cross Events 2.4.0** | Reports `product: "events"` (protocol v2), **Linked products**, the event feed (publish + show events from siblings), `packages/seo` (§11) with canonical links for imported events. **Planned and built 2026-11-18:** [EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md) (also needs contracts 1.4.0 and Hub 2.2.0, for a public key in the v2 heartbeat); not tagged yet | Small; ready for when the Website exists | | 3 | **Accounts 1.0.0** | OIDC provider, sign-in, 2FA (email, WhatsApp, authenticator app), password reset, consent and notice, export / delete fan-out, admin, install script. [ACCOUNTS-1.0-PLAN.md](./ACCOUNTS-1.0-PLAN.md) (with contracts 1.5.0, `packages/auth-client`, Hub 2.3.0). **Released 2026-11-18** (`accounts@1.0.0`, 1.0.1 on 2026-11-19); the VM test and a run on real Postgres are still to do before a church gets it | Every later product signs in through it | | 4 | **Cross Events 3.0.0** | Sign-in moves to Accounts; user migration keeping password hashes; migration guide. **Planned 2026-11-19:** [EVENTS-3.0-PLAN.md](./EVENTS-3.0-PLAN.md) (with contracts 1.8.0, Accounts 1.1.0, Hub 2.5.0; decisions confirmed 2026-11-19) | Breaking change, so a major version. **Moved before the Website on 2026-11-19** (decision 38): Events is the product churches use today, so Accounts is proven on real users first, and the Website then starts with a church whose people already have accounts | -| 5 | **Church Website 1.0.0** | Public site with the **four templates** (§6), admin, simple events + feed, SEO (§11), Hope Family Church as the first church, then a second test church on a different template to prove it repeats. **Planned 2026-11-21:** [WEBSITE-1.0-PLAN.md](./WEBSITE-1.0-PLAN.md) (with contracts 1.17.0, Accounts 1.7.0, Events 3.7.0 for the shared fonts and footer, Hub 2.21.0) | More churches need a website than an app; it also covers the "website only" case. Built on Accounts from day one | -| 6 | **Church App 1.0.0** | Foundation (PWA, branding, Accounts), House of Prayer, announcements, devotionals, events (simple + feed) | Starts with shared users and the feed already in place | +| 5 | **Church Website 1.0.0** | Public site with the **four templates** (§6), admin, simple events + feed, SEO (§11), Hope Family Church as the first church, then a second test church on a different template to prove it repeats. **Planned 2026-11-21:** [WEBSITE-1.0-PLAN.md](./WEBSITE-1.0-PLAN.md) (with contracts 1.17.0, Accounts 1.7.0, Events 3.7.0 for the shared fonts and footer, Hub 2.21.0). **Released 2026-11-26, done 2026-11-30** (Hope Family Church and a second church live, crosscode-site sells it) | More churches need a website than an app; it also covers the "website only" case. Built on Accounts from day one | +| 6 | **Church App 1.0.0** | Foundation (PWA, branding, Accounts), House of Prayer, announcements, devotionals, events (simple + feed). **Planned 2026-11-30:** [APP-1.0-PLAN.md](./APP-1.0-PLAN.md) (with contracts 1.20.0 and 1.21.0, Accounts 1.9.0, Events 3.8.0, Website 1.8.0, agent 1.7.0, Hub 2.26.0; also **demo scenarios**: eight preset churches loaded into every product of a demo client). contracts 1.20.0 / 1.21.0, Accounts 1.9.0 and Events 3.8.0 **released 2026-11-30** | Starts with shared users and the feed already in place | | 7 | Church App 1.x | Reading plans, sermons, groups, pastoral care, serving, giving links, directory | After House of Prayer is in use | Each phase adds help content, audit log entries, tests, a CHANGELOG entry and updates to the diff --git a/packages/demo/README.md b/packages/demo/README.md index a4d14f5..1f875c3 100644 --- a/packages/demo/README.md +++ b/packages/demo/README.md @@ -8,8 +8,10 @@ their demo data around the same people (same `sub` in every product: `demoId`). - `DEMO_CHURCHES`, `demoChurch(scenario)`: each church's profile (name, colours, font pairing, corners, campuses, service times, contact, social links) and the mark its logo is drawn with. - `demoPeople(scenario)`: the leads (pastor, office, prayer coordinator…) and members, enough for - the scenario's App active-member band. `demoParts(scenario)`: what each lead does. + the scenario's App active-member band, each with a `gender` (1.1.0, for Events' gendered events) + and a campus where the church has campuses. `demoParts(scenario)`: what each lead does. - `demoIconSvg`, `demoLogoSvg`: the logo and icon, drawn for the demo. Everything is fictional: people and church addresses are at `example.com`, there are no phone -numbers, and the password is `Demo@1234`. Ships inside the apps that use it (not tagged). +numbers, and the password is `Demo@1234`. Ships inside the apps that use it (not tagged): Accounts +1.9.0 and Events 3.8.0 so far; the Website and the App next. Each product's install script builds it.