Compare commits

..
Author SHA1 Message Date
joshuaandClaude Opus 5.5 3d149e6098 Roadmap: split multi-campus into 1.43.0 campuses and 1.44.0 scoped staff
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
Records the decisions: scoped staff view and scan "All campuses" events but
can't edit them; "everyone at campus X" is home campus plus optional recent
registrants; campus landing pages in 1.43.0. Later phases move up by one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:09:04 +02:00
joshua 30a2142085 Merge branch 'fix/hub-public-key'
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
2026-10-27 14:28:49 +02:00
joshuaandClaude Opus 5.5 95913a5bd5 Build the production Hub public key in (1.42.1)
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
PRODUCTION_PUBLIC_KEY is the key the production Hub serves at
/api/public-key, normalised to PEM, so installs no longer need
HUB_PUBLIC_KEY. Test covers the built-in key with the env var unset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 14:28:48 +02:00
joshua f7e0ec8bc1 Merge branch 'docs/handover-roadmap'
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
2026-10-27 14:03:01 +02:00
joshuaandClaude Opus 5.5 08d442e1c1 Handover and roadmap: Cross Events rename, Request update, versions moved up
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
1.41.3 and 1.42.0 / Hub 1.1.0 recorded; Multi-campus is now 1.43.0 and
later phases move up by one. Next steps: roll out update requests, build
the Hub public key in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 14:03:00 +02:00
joshua be4f341e42 Merge branch 'feat/request-update'
CI / Backend tests (push) Canceled after 0s
CI / Frontend lint, typecheck, build (push) Canceled after 0s
CI / End-to-end tests (push) Canceled after 0s
CI / Deploy tagged release (push) Canceled after 0s
2026-10-27 13:55:06 +02:00
11 changed files with 137 additions and 60 deletions
+8
View File
@@ -7,6 +7,14 @@ and this project follows [Semantic Versioning](https://semver.org/).
## [Unreleased] ## [Unreleased]
## [1.42.1] - 2026-10-27
### Changed
- **The production Hub's public key is built in** (`backend/src/hub/publicKey.js`), so sites can
check licences without `HUB_PUBLIC_KEY` in their `.env`. `HUB_PUBLIC_KEY` still overrides it (for
a local Hub while developing).
## [1.42.0] - 2026-10-27 ## [1.42.0] - 2026-10-27
### Changed ### Changed
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "event-management-backend", "name": "event-management-backend",
"version": "1.42.0", "version": "1.42.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "event-management-backend", "name": "event-management-backend",
"version": "1.42.0", "version": "1.42.1",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@prisma/adapter-pg": "^7.10.1", "@prisma/adapter-pg": "^7.10.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "event-management-backend", "name": "event-management-backend",
"version": "1.42.0", "version": "1.42.1",
"description": "Event Management System Backend", "description": "Event Management System Backend",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
+4 -4
View File
@@ -3,11 +3,11 @@
* it, so a licence can't be faked by editing the database. The matching private key exists * it, so a licence can't be faked by editing the database. The matching private key exists
* only on the Hub server (events-hub repo, `npm run generate-keys`). * only on the Hub server (events-hub repo, `npm run generate-keys`).
* *
* Set PRODUCTION_PUBLIC_KEY to the key the production Hub prints, before the release that ships * PRODUCTION_PUBLIC_KEY is the key the production Hub prints (also served at /api/public-key); if
* the Hub connection. HUB_PUBLIC_KEY (env) overrides it — for a local Hub while developing. * the Hub key is regenerated, update it here. HUB_PUBLIC_KEY (env) overrides it — for a local Hub.
*/ */
const PRODUCTION_PUBLIC_KEY = null; const PRODUCTION_PUBLIC_KEY = "MCowBQYDK2VwAyEAcKpEo/JdS96wR3r9yh8uFUxBlzPUd2YKbC60fNRUhoU=";
/** /**
* A public key as proper PEM, however it was pasted: with real line breaks, with "\n", all on * A public key as proper PEM, however it was pasted: with real line breaks, with "\n", all on
@@ -26,7 +26,7 @@ function normalisePem(input) {
} }
function hubPublicKey() { function hubPublicKey() {
return normalisePem(process.env.HUB_PUBLIC_KEY) || PRODUCTION_PUBLIC_KEY; return normalisePem(process.env.HUB_PUBLIC_KEY) || normalisePem(PRODUCTION_PUBLIC_KEY);
} }
module.exports = { hubPublicKey, normalisePem, PRODUCTION_PUBLIC_KEY }; module.exports = { hubPublicKey, normalisePem, PRODUCTION_PUBLIC_KEY };
+12
View File
@@ -124,6 +124,18 @@ describe('pasting the Hub public key', () => {
expect(normalisePem('')).toBeNull(); expect(normalisePem('')).toBeNull();
expect(normalisePem(undefined)).toBeNull(); expect(normalisePem(undefined)).toBeNull();
}); });
test('without HUB_PUBLIC_KEY the built-in production key is used', () => {
const { hubPublicKey, PRODUCTION_PUBLIC_KEY } = require('../src/hub/publicKey');
const saved = process.env.HUB_PUBLIC_KEY;
delete process.env.HUB_PUBLIC_KEY;
try {
expect(PRODUCTION_PUBLIC_KEY).toBeTruthy();
expect(crypto.createPublicKey(hubPublicKey()).asymmetricKeyType).toBe('ed25519');
} finally {
if (saved !== undefined) process.env.HUB_PUBLIC_KEY = saved;
}
});
}); });
test('version comparison for "update available"', () => { test('version comparison for "update available"', () => {
+31 -16
View File
@@ -1,13 +1,22 @@
# Handover — where things stand and how to carry on # Handover — where things stand and how to carry on
Last updated: 2026-10-27, after **1.41.2** (and Hub 1.0.0). The plan itself is in Last updated: 2026-10-27, after **1.42.1** (and Hub 1.1.0). The plan itself is in
[ROADMAP-v2.md](./ROADMAP-v2.md) (decisions table at the end); the previous round of [ROADMAP-v2.md](./ROADMAP-v2.md) (decisions table at the end); the previous round of
features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md). features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
The product is called **Cross Events** (renamed from Hope Events in 1.41.3); the Hub is the
**Cross Events Hub**. Technical names keep `hope-events` on purpose — the repo, browser storage
keys (`hope_events_*`), the settings encryption salt, applied migrations, PM2/nginx names, the
install folder and the database name — because renaming them would sign everyone out, make
encrypted settings unreadable or break existing installs.
## Done so far (road to 2.0) ## Done so far (road to 2.0)
| Version | What | | Version | What |
|---------|------| |---------|------|
| 1.42.1 | Production Hub public key built in (`publicKey.js`); `HUB_PUBLIC_KEY` only needed for a local Hub |
| 1.42.0 | **Request update** instead of the deploy command: Site settings → Licence sends a signed update request to the Hub (protocol §3a), which opens an alert and emails Joshua; "Update requested on …" until the site runs that version, and the admin update banner hides meanwhile. Audit action `hub_update_requested`. Needs Hub 1.1.0 |
| 1.41.3 | Renamed Hope Events → **Cross Events** in all UI text and docs (technical identifiers unchanged, see above) |
| 1.41.2 | Background jobs page: last-run times were 2 h ahead (Prisma's pg adapter drops the offset of timestamptz in raw queries — read pg-boss times `AT TIME ZONE 'UTC'`); `APP_TIMEZONE` documented | | 1.41.2 | Background jobs page: last-run times were 2 h ahead (Prisma's pg adapter drops the offset of timestamptz in raw queries — read pg-boss times `AT TIME ZONE 'UTC'`); `APP_TIMEZONE` documented |
| 1.41.1 | Licence fixes — no licence (never connected, or the Hub answers `INSTALL_NOT_FOUND`, which now drops the old licence) is read-only like suspended; read-only also blocks editing events/options/variants; heartbeat 30 s after start and after connecting; `LICENCE_CHECK_DISABLED` for e2e | | 1.41.1 | Licence fixes — no licence (never connected, or the Hub answers `INSTALL_NOT_FOUND`, which now drops the old licence) is read-only like suspended; read-only also blocks editing events/options/variants; heartbeat 30 s after start and after connecting; `LICENCE_CHECK_DISABLED` for e2e |
| 1.41.0 | Cross Events Hub connection — licence step in `/setup` and Site settings → Licence, 15-minute heartbeat (health, totals, income bands), licence states checked offline (grace banner for site admins only, read-only when suspended/revoked), `/health`, "update available", `scripts/install.sh`. The Hub itself is `joshua/events-hub` 1.0.0 | | 1.41.0 | Cross Events Hub connection — licence step in `/setup` and Site settings → Licence, 15-minute heartbeat (health, totals, income bands), licence states checked offline (grace banner for site admins only, read-only when suspended/revoked), `/health`, "update available", `scripts/install.sh`. The Hub itself is `joshua/events-hub` 1.0.0 |
@@ -28,13 +37,12 @@ features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
## Next up ## Next up
1. **Go live with the Hub:** generate the production signing key on the Hub server 1. **Roll out the update requests:** deploy **Hub 1.1.0**, then set "Latest Cross Events release"
(`npm run generate-keys` in `events-hub/backend`), put the **public** key in to `1.42.0` in Hub → Settings, then update the sites to 1.42.0 (the last update done without a
`backend/src/hub/publicKey.js` and release it as **1.41.1** — until then installs can't request). A 1.42.0 site talking to an older Hub shows "The Hub doesn't take update requests yet".
connect (they work as "not connected"). Deploy the Hub to `events-hub.crosscode.co.za`, create 2. **Try `scripts/install.sh` on a test server.** The production Hub key is built in since
the admin (`npm run create-admin`), generate Hope Family Church's licence and connect it (install #1). 1.42.1, so a fresh install needs no `HUB_PUBLIC_KEY`; existing installs can drop it from `.env`.
Try `scripts/install.sh` on a test server. 3. **1.43.0 — Multi-campus** (§12).
2. **1.42.0 — Multi-campus** (§12).
## Working on this repo ## Working on this repo
@@ -158,19 +166,26 @@ features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
(`prepare-db.js` → `retention`); `privacy-notice.spec.ts` publishes a version that needs accepting, then accepts it for all (`prepare-db.js` → `retention`); `privacy-notice.spec.ts` publishes a version that needs accepting, then accepts it for all
seeded users in `afterAll` so later spec files don't meet the prompt. seeded users in `afterAll` so later spec files don't meet the prompt.
## Where the Hub client lives (1.41.0) ## Where the Hub client lives (1.41.0, update requests 1.42.0)
- Protocol: `docs/hub-protocol.md` — the same file is in the Hub repo (`joshua/events-hub`, - Protocol: `docs/hub-protocol.md` — the same file is in the Hub repo (`joshua/events-hub`,
developed at `../events-hub`); change both together. developed at `../events-hub`); change both together.
- `backend/src/hub/`: `publicKey.js` (the production Hub key — **must be set before releasing**; - `backend/src/hub/`: `publicKey.js` (the production Hub key, built in since 1.42.1 — if the Hub's
`HUB_PUBLIC_KEY` env overrides it for a local Hub), `licence.js` (verify tokens, work out signing key is ever regenerated, update it here in a release; `HUB_PUBLIC_KEY` env overrides it
active / grace / suspended / revoked / unlicensed, cached 30 s), `client.js` (connect, heartbeat; for a local Hub), `licence.js` (verify tokens, work out
AppSetting `hub_*` keys, which the generic settings endpoints never touch), `report.js` (health, active / grace / suspended / revoked / unlicensed, cached 30 s), `client.js` (connect, heartbeat,
update request — the last two share `signedPost`; AppSetting `hub_*` keys, which the generic
settings endpoints never touch), `report.js` (health,
totals, income bands), `readOnly.js` (the routes blocked in read-only mode — add any new totals, income bands), `readOnly.js` (the routes blocked in read-only mode — add any new
"create" or event-edit route there). Read-only = suspended, revoked or unlicensed. "create" or event-edit route there). Read-only = suspended, revoked or unlicensed.
- Job `hub-heartbeat` (every 15 min), routes `/api/hub/*`, `/health`. - Job `hub-heartbeat` (every 15 min), routes `/api/hub/*` (status, connect, heartbeat,
- Frontend: `components/admin/LicenceTab.tsx` (Site settings → Licence; its `ConnectForm` is also on update-request), `/health`.
the last `/setup` screen), `components/shared/LicenceBanner.tsx` (site admins only). - Frontend: `components/admin/LicenceTab.tsx` (Site settings → Licence, with the **Request update**
button; its `ConnectForm` is also on the last `/setup` screen), `components/shared/LicenceBanner.tsx`
(site admins only).
- **Updates:** sites never update themselves and never show the deploy command. "Request update"
tells the Hub (an `update_requested` alert + one email to Joshua); the Hub resolves it when the
site's heartbeat reports a newer version. Joshua then runs `scripts/deploy.sh` on the server.
- Local testing: run the Hub (`../events-hub`, ports 5200/3200), create a licence there, and start - Local testing: run the Hub (`../events-hub`, ports 5200/3200), create a licence there, and start
Cross Events with `HUB_URL=http://localhost:5200` and `HUB_PUBLIC_KEY` = the key on Hub → Settings. Cross Events with `HUB_URL=http://localhost:5200` and `HUB_PUBLIC_KEY` = the key on Hub → Settings.
- `scripts/install.sh` — fresh Ubuntu server to a running site (written and syntax-checked; not yet - `scripts/install.sh` — fresh Ubuntu server to a running site (written and syntax-checked; not yet
+73 -31
View File
@@ -11,7 +11,7 @@ sold — trustworthy (POPIA), flexible (multi-day events, several payment
providers), maintainable (tests, CI, typed backend, versioned API), and with providers), maintainable (tests, CI, typed backend, versioned API), and with
**AI helpers** as the headline feature (§15). **AI helpers** as the headline feature (§15).
**Status (2026-10-23):** all features in this document are approved. Shipped **Status (2026-10-27):** all features in this document are approved. Shipped
so far: 1.32.0 early-bird ribbon on event cards; 1.33.0 multi-day events so far: 1.32.0 early-bird ribbon on event cards; 1.33.0 multi-day events
phase A (sessions, late joining, per-session check-in, attendance register, phase A (sessions, late joining, per-session check-in, attendance register,
reminders, certificates); 1.34.0 job queue (pg-boss), Playwright E2E tests, Gitea CI reminders, certificates); 1.34.0 job queue (pg-boss), Playwright E2E tests, Gitea CI
@@ -22,8 +22,13 @@ picker at the door and session choice on "All sessions" tickets; 1.36.0 payment
1.37.1 "Pay online" hidden when it can't be used; 1.37.2 payment status checks for missing 1.37.1 "Pay online" hidden when it can't be used; 1.37.2 payment status checks for missing
notifications. SnapScan and Zapper are dropped — Yoco and PayFast are enough (2026-10-23); notifications. SnapScan and Zapper are dropped — Yoco and PayFast are enough (2026-10-23);
1.38.0 POPIA toolkit part 1 (privacy page, unsubscribe, WhatsApp STOP, data requests); 1.39.0 part 2 (privacy notice editor and versions, operator register, consent and access logs); 1.40.0 part 3 (retention policies and job, breach register, children’s-data flags, readiness page). 1.38.0 POPIA toolkit part 1 (privacy page, unsubscribe, WhatsApp STOP, data requests); 1.39.0 part 2 (privacy notice editor and versions, operator register, consent and access logs); 1.40.0 part 3 (retention policies and job, breach register, children’s-data flags, readiness page).
1.41.0 the Hub connection (licence, heartbeat, read-only mode, `/health`, install script) with Hub 1.0.0 (`joshua/events-hub`). 1.41.0 the Hub connection (licence, heartbeat, read-only mode, `/health`, install script) with Hub 1.0.0 (`joshua/events-hub`);
**Next: 1.42.0 Multi-campus.** 1.41.1–1.41.2 licence and job-time fixes; 1.41.3 renamed **Hope Events → Cross Events** (Hub 1.0.1:
Cross Events Hub); 1.42.0 **Request update** button instead of the deploy command, with Hub 1.1.0
(update requests); 1.42.1 the production Hub key built in. Later versions moved up by one
(2026-10-27). Multi-campus is split in two — 1.43.0 campuses, 1.44.0 campus-scoped staff — so
everything after moves up by one more (2026-10-27).
**Next: 1.43.0 Campuses.**
**Repositories:** **Repositories:**
@@ -517,7 +522,12 @@ full data separation — which also helps the POPIA story — and lets each
church run on a different server. **True multi-tenant is out of scope.** church run on a different server. **True multi-tenant is out of scope.**
**Multi-campus** is in scope: one church with several campuses inside one **Multi-campus** is in scope: one church with several campuses inside one
install. install. It ships in **two releases** (2026-10-27):
| Release | What | Why separate |
|---------|------|--------------|
| **1.43.0 Campuses** | Campuses in Site settings, events per campus, public filter and `/campus/<slug>` pages, home campus, campus on cards and tickets, campus filters on reports/cashup/dashboard/funnel, "everyone at campus X" messages, per-campus summary recipients | Adds features and filters; who can see what doesn't change |
| **1.44.0 Campus-scoped staff** | Supervisors and staff limited to campuses, across every staff/supervisor endpoint (115 in 27 route files at 1.42.1) and their dashboards | Security-heavy: anything missed lets staff see another campus's data, so it gets its own release and testing |
### Setup ### Setup
@@ -531,17 +541,22 @@ install.
- **Events** belong to one campus, or to **All campuses** (church-wide - **Events** belong to one campus, or to **All campuses** (church-wide
conferences, camps). conferences, camps).
- **Public site:** campus filter on the events list, remembered per visitor; - **Public site:** campus filter on the events list, remembered per visitor;
campus shown on event cards and tickets. Optional campus landing pages campus shown on event cards and tickets. Campus landing pages
(`/campus/<slug>`). (`/campus/<slug>`) are part of 1.43.0.
- **Users** can set a home campus (used as the default filter and for - **Users** can set a home campus (used as the default filter and for
broadcasts). Accounts stay shared across campuses — one login for the broadcasts). Accounts stay shared across campuses — one login for the
church. church.
- **Campus-scoped roles:** a supervisor or staff member can be limited to - **Campus-scoped roles (1.44.0):** a supervisor or staff member can be limited to
one or more campuses (sees and manages only those events, registrations, one or more campuses (sees and manages only those events, registrations,
scanning, cashups). Admins and unscoped supervisors see everything. scanning, cashups). Admins and unscoped supervisors see everything.
**"All campuses" events:** scoped staff can view and scan them; only admins
and unscoped supervisors can edit them.
- **Reports, cashup, dashboard, funnel stats:** filter by campus plus a - **Reports, cashup, dashboard, funnel stats:** filter by campus plus a
church-wide total. church-wide total. (Report PDFs/Excel are rendered from data the page sends,
- **Broadcasts:** target "everyone at campus X". so the filters go on the data endpoints.)
- **Broadcasts:** target "everyone at campus X" — people whose home campus is X,
plus (tick box) people registered for campus X's events in the last 12 months.
Still filtered by news consent.
- **Kids check-in rooms** and **volunteer roles** are per campus. - **Kids check-in rooms** and **volunteer roles** are per campus.
- **Notification recipients** per campus (e.g. the campus pastor gets that - **Notification recipients** per campus (e.g. the campus pastor gets that
campus's daily summary). campus's daily summary).
@@ -553,21 +568,42 @@ install.
- Moving an event to another campus → scoped supervisors of the old campus - Moving an event to another campus → scoped supervisors of the old campus
lose access; logged in the audit log. lose access; logged in the audit log.
### Plumbing (1.44.0)
- Today access depends only on role — nothing limits staff to particular
events — so scoping is a new layer: one helper (`utils/campusScope.js`) that
works out a user's campuses once per request, gives a `where` for event lists
and checks single records (registrations, tickets, payments… traced back to
their event).
- A test lists **every** staff/supervisor route and fails unless each is
campus-checked or explicitly marked campus-independent (the same pattern as
the read-only route test), so new endpoints can't skip the check.
- The heartbeat's `features.campuses` / `stats.campuses` report the real setting
(hard-coded `false` until 1.43.0).
### Data model (sketch) ### Data model (sketch)
```prisma ```prisma
model Campus { model Campus {
id String @id @default(uuid()) id String @id @default(uuid())
name String name String
slug String @unique slug String @unique
address String? address String?
isActive Boolean @default(true) contactName String?
order Int @default(0) contactEmail String?
events Event[] contactPhone String?
colour String?
logoUrl String?
defaultLocation String?
order Int @default(0)
archivedAt DateTime? // archive instead of delete when it has events
events Event[]
notifyRecipients User[] // daily summary for this campus's events
} }
// Event.campusId String? (null = all campuses) // Event.campusId String? (null = all campuses) — 1.43.0
// User.homeCampusId String? // User.homeCampusId String? — 1.43.0
// UserCampusScope { userId, campusId } — empty = unscoped // AppSetting campuses_enabled — 1.43.0
// UserCampusScope { userId, campusId } — empty = unscoped — 1.44.0
``` ```
### Running many installs ### Running many installs
@@ -601,11 +637,11 @@ whether they're healthy, basic usage stats, and their **licence** status.
- Same stack (Next.js + Express + Prisma + Postgres) so it's familiar. - Same stack (Next.js + Express + Prisma + Postgres) so it's familiar.
- **What lives where:** - **What lives where:**
- Hub repo: dashboard, customers, licences, licence **signing** (private - Hub repo: dashboard, customers, licences, licence **signing** (private
key — only ever on the Hub server), `/api/installs/register` and key — only ever on the Hub server), `/api/installs/register`,
`/api/installs/heartbeat` endpoints, alerts. `/api/installs/heartbeat` and `/api/installs/update-request` endpoints, alerts.
- Cross Events repo: the Hub **client** — licence step in `/setup`, - Cross Events repo: the Hub **client** — licence step in `/setup`,
"Connect to Hub" in Site settings, heartbeat job, licence verification "Connect to Hub" in Site settings, heartbeat job, licence verification
with the Hub's **public** key, read-only mode, banners. with the Hub's **public** key, read-only mode, banners, "Request update".
- **The contract between them** (register / heartbeat payloads, licence token - **The contract between them** (register / heartbeat payloads, licence token
format) is versioned with a `protocolVersion` field and documented in both format) is versioned with a `protocolVersion` field and documented in both
repos (`docs/hub-protocol.md`). The Hub accepts the current and previous repos (`docs/hub-protocol.md`). The Hub accepts the current and previous
@@ -661,7 +697,9 @@ All later calls are signed with the install secret (HMAC) and go over HTTPS.
- **Alerts** (email/WhatsApp to Joshua): install offline > 1 h, backup - **Alerts** (email/WhatsApp to Joshua): install offline > 1 h, backup
failed or older than 48 h, disk low, errors spiking, licence expiring. failed or older than 48 h, disk low, errors spiking, licence expiring.
- **Releases:** latest version and changelog; installs see "Update - **Releases:** latest version and changelog; installs see "Update
available" in their admin. available" in their admin with a **Request update** button (1.42.0 / Hub 1.1.0).
The request is signed like a heartbeat, shows as an alert (emailed once) and
clears when the install reports a newer version. Joshua does the update.
- **Customers:** contact details, plan, licence(s), billing notes. - **Customers:** contact details, plan, licence(s), billing notes.
### Licences ### Licences
@@ -695,7 +733,8 @@ All later calls are signed with the install secret (HMAC) and go over HTTPS.
- The Hub should not offer remote commands (run updates, impersonate, - The Hub should not offer remote commands (run updates, impersonate,
database access) in v1: it's the most valuable target an attacker could database access) in v1: it's the most valuable target an attacker could
hit, so keeping it read-only toward installs keeps every church safe if it hit, so keeping it read-only toward installs keeps every church safe if it
is ever compromised. Remote "trigger update" can be revisited later. is ever compromised. Updates stay that way: the install *asks* (Request update)
and Joshua updates the server; the Hub never runs anything on an install.
- The Hub itself needs 2FA, backups and the same audit log approach. - The Hub itself needs 2FA, backups and the same audit log approach.
### Data model (Hub, sketch) ### Data model (Hub, sketch)
@@ -707,7 +746,7 @@ model Install { id, customerId, licenceId, name, url, secretHash, version,
lastHeartbeatAt, health Json, registeredAt } lastHeartbeatAt, health Json, registeredAt }
model Heartbeat { id, installId, receivedAt, version, health Json, stats Json } model Heartbeat { id, installId, receivedAt, version, health Json, stats Json }
// rolled up to daily after 30 days // rolled up to daily after 30 days
model InstallEvent { id, installId, type, message, createdAt } // alerts, version changes model InstallEvent { id, installId, type, message, createdAt } // alerts, version changes, update requests
// 2.0, AI (§15): Licence gets aiMonthlyCapCents; usage per call, no prompt/response text // 2.0, AI (§15): Licence gets aiMonthlyCapCents; usage per call, no prompt/response text
model AiUsage { id, installId, helper, model, inputTokens, outputTokens, costCents, createdAt } model AiUsage { id, installId, helper, model, inputTokens, outputTokens, costCents, createdAt }
``` ```
@@ -869,12 +908,12 @@ income justify the hardware:
| 3 | 1.35.0 ✅ | Multi-day events — phase B (pick sessions, per-session capacity) | Builds on phase A, now with E2E coverage | | 3 | 1.35.0 ✅ | Multi-day events — phase B (pick sessions, per-session capacity) | Builds on phase A, now with E2E coverage |
| 4 | 1.36.0 ✅ – 1.37.2 | Payment provider interface (Yoco moved behind it) → PayFast, then hiding "Pay online" when it can't be used and payment status checks (SnapScan and Zapper dropped) | Payment code gets split out of the big controller as part of this | | 4 | 1.36.0 ✅ – 1.37.2 | Payment provider interface (Yoco moved behind it) → PayFast, then hiding "Pay online" when it can't be used and payment status checks (SnapScan and Zapper dropped) | Payment code gets split out of the big controller as part of this |
| 5 | 1.38.0 ✅ 1.39.0 ✅ 1.40.0 ✅ | **POPIA toolkit** (1.38.0: user privacy centre, unsubscribe, WhatsApp STOP, data requests inbox; 1.39.0: privacy notice editor + versions, operator register, consent log, access log; 1.40.0: retention jobs, breach register, children’s-data flags, readiness page) | Main selling point; retention jobs use the job queue | | 5 | 1.38.0 ✅ 1.39.0 ✅ 1.40.0 ✅ | **POPIA toolkit** (1.38.0: user privacy centre, unsubscribe, WhatsApp STOP, data requests inbox; 1.39.0: privacy notice editor + versions, operator register, consent log, access log; 1.40.0: retention jobs, breach register, children’s-data flags, readiness page) | Main selling point; retention jobs use the job queue |
| 6 | 1.41.0 ✅ + Hub v1 ✅ | Install/update scripts, `/health`, licence step in `/setup`, "Connect to Hub", heartbeat, licence states — plus the **Hub** app (separate repo) | Must exist before the first church is sold; Hope Family Church registers as install #1 | | 6 | 1.41.0 ✅ – 1.42.0 ✅ + Hub 1.0 ✅ – 1.1 ✅ | Install/update scripts, `/health`, licence step in `/setup`, "Connect to Hub", heartbeat, licence states — plus the **Hub** app (separate repo); rename to Cross Events (1.41.3); Request update (1.42.0 / Hub 1.1.0) | Must exist before the first church is sold; Hope Family Church registers as install #1 |
| 7 | 1.42.0 | **Multi-campus** | Kids rooms and volunteer roles are per campus, so campuses come first | | 7 | 1.43.0 – 1.44.0 | **Multi-campus**: 1.43.0 campuses (settings, events, public filter and landing pages, home campus, filters, messages, summaries); 1.44.0 campus-scoped staff | Kids rooms and volunteer roles are per campus, so campuses come first; scoping is split out because it's security-heavy |
| 8 | 1.43.0 – 1.44.0 | Kids check-in, Volunteer rosters | Depend on sessions and campuses | | 8 | 1.45.0 – 1.46.0 | Kids check-in, Volunteer rosters | Depend on sessions and campuses |
| 9 | 1.45.0 – 1.47.0 | Event series & cloning, Wallet passes, Outbound webhooks | Smaller, independent wins | | 9 | 1.47.0 – 1.49.0 | Event series & cloning, Wallet passes, Outbound webhooks | Smaller, independent wins |
| 10 | 1.48.0 – 1.50.0 | Admin dashboard/Ctrl+K/bulk actions, Afrikaans, Accessibility pass | Polish before the big release | | 10 | 1.50.0 – 1.52.0 | Admin dashboard/Ctrl+K/bulk actions, Afrikaans, Accessibility pass | Polish before the big release |
| 11 | 1.51.0 | TypeScript backend + OpenAPI + `/api/v2` alongside v1 | The breaking-change groundwork | | 11 | 1.53.0 | TypeScript backend + OpenAPI + `/api/v2` alongside v1 | The breaking-change groundwork |
| 12 | **2.0.0** | **AI helpers** (§15 — headline feature: draft an event, summarise reports and feedback, draft messages, improve text; through the Hub with a rand cap per licence), v1 API removed, migration guide, marketing site/docs for selling | The release. AI needs the Hub (phase 6) for the key, metering and caps | | 12 | **2.0.0** | **AI helpers** (§15 — headline feature: draft an event, summarise reports and feedback, draft messages, improve text; through the Hub with a rand cap per licence), v1 API removed, migration guide, marketing site/docs for selling | The release. AI needs the Hub (phase 6) for the key, metering and caps |
Each phase should add matching help content (`frontend/src/content/help/`), Each phase should add matching help content (`frontend/src/content/help/`),
@@ -920,6 +959,9 @@ feature.
| — | POPIA: privacy notice | Today's notice becomes the starting template, one editable box per section; org name, Information Officer, retention periods and the operator list fill in automatically. Publishing saves a numbered version (2026-10-23) | | — | POPIA: privacy notice | Today's notice becomes the starting template, one editable box per section; org name, Information Officer, retention periods and the operator list fill in automatically. Publishing saves a numbered version (2026-10-23) |
| — | POPIA: re-accepting the notice | The admin decides per version ("significant change — ask everyone to accept again"); people are asked once after login (2026-10-23) | | — | POPIA: re-accepting the notice | The admin decides per version ("significant change — ask everyone to accept again"); people are asked once after login (2026-10-23) |
| — | POPIA: inactive accounts | Anonymised after 5 years without a login or registration, **on by default**, with a warning email 30 days before; staff/supervisor/admin accounts never (2026-10-23) | | — | POPIA: inactive accounts | Anonymised after 5 years without a login or registration, **on by default**, with a warning email 30 days before; staff/supervisor/admin accounts never (2026-10-23) |
| — | Product name | **Cross Events** (was Hope Events), Hub: **Cross Events Hub**. UI text and docs renamed in 1.41.3; technical identifiers (`hope-events` repo, storage keys, encryption salt, migrations, PM2/nginx names) stay, so installs and sign-ins keep working (2026-10-27) |
| — | Multi-campus split | Two releases: **1.43.0 campuses**, **1.44.0 campus-scoped staff**; everything after moves up by one. Scoped staff can view and scan "All campuses" events, only admins and unscoped supervisors edit them. "Everyone at campus X" = home campus X, plus (tick box) registrants of campus X's events in the last 12 months. Campus landing pages are in 1.43.0 (2026-10-27) |
| — | Updates | Sites show **Request update**, never the deploy command: the request goes to the Hub, which tells Joshua; he updates the server. 1.42.0 / Hub 1.1.0; Multi-campus and everything after moves up by one (2026-10-27) |
| — | POPIA: WhatsApp STOP | In 1.38.0, via WAWP's incoming `message` webhook with a secret in the URL (WAWP doesn't sign webhooks) (2026-10-23) | | — | POPIA: WhatsApp STOP | In 1.38.0, via WAWP's incoming `message` webhook with a secret in the URL (WAWP doesn't sign webhooks) (2026-10-23) |
## Still open ## Still open
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "hope-events-frontend", "name": "hope-events-frontend",
"version": "1.42.0", "version": "1.42.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "hope-events-frontend", "name": "hope-events-frontend",
"version": "1.42.0", "version": "1.42.1",
"dependencies": { "dependencies": {
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@hookform/resolvers": "^5.2.1", "@hookform/resolvers": "^5.2.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hope-events-frontend", "name": "hope-events-frontend",
"version": "1.42.0", "version": "1.42.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev --turbopack", "dev": "next dev --turbopack",
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "hope-events", "name": "hope-events",
"version": "1.42.0", "version": "1.42.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "hope-events", "name": "hope-events",
"version": "1.42.0", "version": "1.42.1",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.64.0", "@playwright/test": "^1.64.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "hope-events", "name": "hope-events",
"version": "1.42.0", "version": "1.42.1",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev:backend": "cd backend && npm run dev", "dev:backend": "cd backend && npm run dev",