From 0f915d345d284df66cd6161aef785886b499cc88 Mon Sep 17 00:00:00 2001 From: joshua Date: Fri, 30 Oct 2026 09:00:49 +0200 Subject: [PATCH] Docs: bring HANDOVER and ROADMAP-v2 up to date after 1.51.17 HANDOVER: version table in order with 1.51.4/1.51.5 added; Next up renumbered with the 2.0 clean-ups (lint rules, node-fetch, password hashing); event picker points at fetchManagedEvents; stale lines fixed. ROADMAP: status rewritten as a dated summary; section 14 marks what's done and that CI was removed; Haiku prices flagged to check. Co-Authored-By: Claude Opus 5.5 --- apps/events/docs/HANDOVER.md | 76 +++++++++++++++++------------- apps/events/docs/ROADMAP-v2.md | 85 ++++++++++++++++------------------ 2 files changed, 85 insertions(+), 76 deletions(-) diff --git a/apps/events/docs/HANDOVER.md b/apps/events/docs/HANDOVER.md index 243d74e..1747ae8 100644 --- a/apps/events/docs/HANDOVER.md +++ b/apps/events/docs/HANDOVER.md @@ -14,9 +14,6 @@ encrypted settings unreadable or break existing installs. | Version | What | |---------|------| -| 1.51.3 | **Express 5** (qs query parser and `req.body = {}` kept); scanner and at-the-door on v2 check-in; shared middleware answers v2-shaped on `/api/v2` (`legacyErrorsToV2`, `reason`); v1 `Deprecation` + `successor-version` headers (`src/v2/deprecation.ts`) | -| 1.51.2 | **v2 accounts and check-in**: signup, login (+ code step), `PATCH /me`; check-in look-up and scan with `outcome`s. `src/services/auth.ts` (from userController) and `src/services/checkin.ts` (from ticketController); login/signup/profile pages on v2 | -| 1.51.1 | **v2 registrations and payments**: register, get, cancel, checkout; create/cancel moved to `src/services/registrations.ts`, online checkout to `src/services/payments.ts` (v1 uses them too); typed frontend calls (`apiV2`, `npm run api:types`); register page, Pay now and My Events cancel on v2 | | 1.51.17 | **Security:** forgot-password and sign-in don't reveal whether an account exists (same answer, status and timing); forgot-password rate-limited | | 1.51.16 | **Incoming webhooks and message links on v2** — `src/v2/links.ts` (`/api/v2/webhooks/…`, one-click unsubscribe, 308s for old links); provider URLs and email links point at v2 | | 1.51.15 | **Privacy and admin on v2** — `resources/adminPrivacy.ts`; every frontend call on v2; impersonation end/log allowed on v2 while read-only | @@ -29,6 +26,11 @@ encrypted settings unreadable or break existing installs. | 1.51.8 | **Rest of event set-up on v2**: event in full, calendar, alias, ticket options and variants, attachments, sections, costs, image uploads — `src/services/eventDetails.ts`, `src/services/setup.ts`; frontend `fetchEvent()` and `lib/eventSetup.ts`; v2 `file` and `upload` routes | | 1.51.7 | **Setting events up on v2** (`/events/manage`, create, `PATCH`, deactivate, copy-from, notify-recipients) via `src/services/events.ts`; `fetchManagedEvents()` for every picker; **pg-boss 11** in schema `pgboss_v11` | | 1.51.6 | Command palette lists every report (from `ReportCatalog`) and every dashboard page (e2e drift check); exceljs → ExcelTS 10 (`@cj-tech-master/excelts`, no dependencies; e2e `e2e/excel.spec.ts`); backend `engines.node` >= 22 | +| 1.51.5 | **Next.js 16** and React 19.3 (Turbopack), **ESLint 10** with Next 16's flat configs (`npm run lint` = `eslint src`); React Compiler-era rules as warnings for now; empty `middleware.ts` removed | +| 1.51.4 | **Security and dependency updates**: Next.js 15.5.28, @sentry/nextjs, zod, multer, nodemailer and others for published advisories; minimum versions raised in package.json; cron-parser 5 | +| 1.51.3 | **Express 5** (qs query parser and `req.body = {}` kept); scanner and at-the-door on v2 check-in; shared middleware answers v2-shaped on `/api/v2` (`legacyErrorsToV2`, `reason`); v1 `Deprecation` + `successor-version` headers (`src/v2/deprecation.ts`) | +| 1.51.2 | **v2 accounts and check-in**: signup, login (+ code step), `PATCH /me`; check-in look-up and scan with `outcome`s. `src/services/auth.ts` (from userController) and `src/services/checkin.ts` (from ticketController); login/signup/profile pages on v2 | +| 1.51.1 | **v2 registrations and payments**: register, get, cancel, checkout; create/cancel moved to `src/services/registrations.ts`, online checkout to `src/services/payments.ts` (v1 uses them too); typed frontend calls (`apiV2`, `npm run api:types`); register page, Pay now and My Events cancel on v2 | | 1.51.0 | **TypeScript backend + `/api/v2` foundations** (§14): tsconfig (`allowJs`), build to `dist/`, launcher `src/index.js` → `src/app.js`; v2 route declarations with zod → validation, response stripping and OpenAPI 3.1 at `/docs/v2`; first endpoints events, event, me, my registrations. Tests `tests/v2.test.ts`, e2e `e2e/api-v2.spec.ts` | | 1.50.2 | Searchable **event picker** (`components/shared/EventPicker.tsx`) on staff/supervisor pages and the kiosk; searchable reports events list; **How webhooks work** guide on Site settings → Webhooks (examples from `EVENT_TYPES[].example`). e2e `e2e/event-picker.spec.ts` | | 1.50.1 | Long lists: audit-log search/role filter/all actions and inclusive To date, data-request search and paging, webhook-delivery status filter and Load older, supervisor Payments loads only what it needs (`unpaid`, `userId`, `from`, `donations` filters). `components/shared/Pager.tsx`; e2e `e2e/long-lists.spec.ts` | @@ -44,9 +46,9 @@ encrypted settings unreadable or break existing installs. | 1.47.2 | **Series: year on year** report (§6 part 3): `GET /api/series/:id/compare` (`compareSeries` in `utils/series.js`), report `seriesComparison` in `ReportsV2`, "Compare" on the Event series page | | 1.47.1 | **Event series** (§6 part 2): Event series page, Series box on events, public `/series/`, "Next in this series", follow (News & announcements email from the `series` job when a new event goes live). Migration `20261028140000_event_series` | | 1.47.0 | **Copy an event** (§6 part 1): "Copy" opens the event editor filled in from the source (campus, sessions, options, tiers, sections, form, recipients, feedback, certificates); "New start" moves every date; allocation groups and (admins) costs copied by `POST /api/events/:id/copy-from`. No registrations, coupons, attachments, kids check-in or volunteer roles | -| 1.46.0 | **Volunteer rosters** (§5): serving roles per event or session, anyone signs up (or supervisors assign), day-before reminders, "can't make it" swaps that happen on accept (notify recipients emailed), self check-in with the event's QR code or by staff, kids-room roles count as leaders on duty, free volunteer ticket off by default, roster sheet and hours served. Also fixes the 1.45.0 kids ticket being offered publicly | -| 1.46.1 | Removed the Gitea CI workflow (no runner): test, lint and deploy by hand | | 1.46.2 | Licence page: what's new (from WHATS-NEW.md via the Hub), withdraw update request, "Not now", urgent updates, provider notices banner (Hub 1.4.0: releases from git tags, Notices page) | +| 1.46.1 | Removed the Gitea CI workflow (no runner): test, lint and deploy by hand | +| 1.46.0 | **Volunteer rosters** (§5): serving roles per event or session, anyone signs up (or supervisors assign), day-before reminders, "can't make it" swaps that happen on accept (notify recipients emailed), self check-in with the event's QR code or by staff, kids-room roles count as leaders on duty, free volunteer ticket off by default, roster sheet and hours served. Also fixes the 1.45.0 kids ticket being offered publicly | | 1.45.1 | Privacy notice (built-in text) and terms of use brought up to date with kids check-in, sessions, certificates, campuses, the Hub heartbeat and where data is stored. Installs with a published notice must publish a new version themselves | | 1.45.0 | **Kids check-in** (§4), fully digital: families/children/authorised adults kept between events (My account → Kids), staff desk with pickup codes and a "write on the sticker" panel, rooms with age ranges and ratios, room screen (on duty, call parent, alerts), check-out by code (wrong code alerts, override with reason), offline desk with reserved codes, attendance through a free kids ticket; 6-month retention rule for children | | 1.44.0 | **Campus-scoped staff** (§12 part 2): Admin → Users "Limit to campuses"; `utils/campusScope.js` on every staff/supervisor route (and owner-or-staff routes), lists filtered, scanner names the other campus, church-wide events view/scan/door-only for scoped staff; route test `tests/campusScopeRoutes.test.js` | @@ -60,10 +62,6 @@ encrypted settings unreadable or break existing installs. | 1.40.0 | POPIA toolkit part 3 — readiness checklist with score, retention policies + nightly `retention` job (inactive accounts anonymised after 5 years with a 30-day warning, on by default), breach register with notification drafts, children's/medical flag in the access log, `{retention}` in the notice | | 1.39.0 | POPIA toolkit part 2 — Admin → Privacy: privacy notice editor (built-in text as the start, placeholders, drafts, numbered versions, re-acceptance after login), operator register, consent log, access log; Information Officer on the contact page | | 1.38.0 | POPIA toolkit part 1 — Privacy page (news opt-in + history, download my data, correction and deletion requests), Event update vs News & announcements on every bulk send, unsubscribe links + one-click headers, WhatsApp STOP, one-time news question, Admin → Data requests, thorough anonymising | -| 1.32.0 | Early-bird ribbon on event cards | -| 1.33.0 | Multi-day events phase A — sessions, late joining + late pricing, per-session check-in, attendance register, session reminders, certificates (4 templates, verify page) | -| 1.34.0 | Background jobs on pg-boss (admin Background jobs page), Playwright e2e tests, Gitea CI workflow, `scripts/deploy.sh` | -| 1.35.0 | Multi-day events phase B — "pick sessions" (per-session tickets and prices, session capacity) | | 1.37.4 | Deploy script: no tag = latest main; per-install `ecosystem.config.js` out of git (`ecosystem.config.example.js`) | | 1.37.3 | Fix: the production build failed on unescaped quotes in a help text | | 1.37.2 | Payment status checks (PayFast transaction history; job every 15 min; Payments → Reconcile → Waiting for payment), PayFast Test connection | @@ -71,24 +69,37 @@ encrypted settings unreadable or break existing installs. | 1.37.0 | PayFast (signed form, ITN checks), `ProviderCheckout` with amount checks, the "Pay online" page (`/pay/`) where payers choose a provider | | 1.36.0 | Payment provider interface (`backend/src/payments`) with Yoco behind it, `ProviderTransaction`, `Payment.provider`, Site settings → Payments (on/off and order per provider), R15 minimum | | 1.35.1 | Waitlist per session, session picker at the door, "All sessions" tickets let people tick sessions at one price; fixes (per-session stock limits, offline service worker serving stale scripts) | +| 1.35.0 | Multi-day events phase B — "pick sessions" (per-session tickets and prices, session capacity) | +| 1.34.0 | Background jobs on pg-boss (admin Background jobs page), Playwright e2e tests, Gitea CI workflow (removed in 1.46.1), `scripts/deploy.sh` | +| 1.33.0 | Multi-day events phase A — sessions, late joining + late pricing, per-session check-in, attendance register, session reminders, certificates (4 templates, verify page) | +| 1.32.0 | Early-bird ribbon on event cards | ## Next up Hub 1.1.0 is deployed with update requests rolled out, and `scripts/install.sh` has been tried on a test server (both done 2026-10-28). -1. **2.0.0** — AI helpers, and v1 removed. Every endpoint is on v2 since 1.51.16. Keep - answering the v1 webhook paths and the old links in sent messages (`src/v2/links.ts`) after - v1 goes: providers and old emails still use them. -2. **Servers run Node 24** (Joshua, 2026-10-29), so the backend may need Node 22+. Still to do: - move from ExcelTS — deprecated in favour of `documonster` by the same author (pre-1.0 in Oct - 2026) — once documonster is stable. After 1.51.7 has run everywhere, the old `pgboss` schema - can be dropped (`DROP SCHEMA pgboss CASCADE;`). - Languages (Afrikaans, §10) are removed from scope (2026-10-28). -2. AI rules decided 2026-10-29 (see §15 in the roadmap): the AI buttons show only when the - licence's monthly cap is above R0, and are disabled (not hidden) once it's reached. The Hub - charges the real cost plus a markup % (a default and a per-licence override) and counts the cap - in charged rand. AI endpoints are `/api/v2` only. +1. **2.0.0** — AI helpers (§15), v1 removed, a migration guide, and marketing site/docs for + selling. Every endpoint is on v2 since 1.51.16. Keep answering the v1 webhook paths and the + old links in sent messages (`src/v2/links.ts`) after v1 goes: providers and old emails still + use them. +2. **AI rules** (decided 2026-10-29, roadmap §15): the AI buttons show only when the licence's + monthly cap is above R0, and are disabled (not hidden) once it's reached. The Hub charges the + real cost plus a markup % (a default and a per-licence override) and counts the cap in charged + rand. AI endpoints are `/api/v2` only. Check Claude Haiku 5.5's current prices before setting + the markup and caps. +3. **Clean-ups before or with 2.0:** + - Turn the React Compiler lint rules back to errors (see [Next.js 16](#nextjs-16-1515)) — every + screen is on v2 now, but they're still `warn` in `frontend/eslint.config.mjs`. + - `node-fetch` is still listed in `backend/package.json` though nothing in `src/` uses it — + remove it. + - Password hashing upgrade with rehash-on-login (roadmap §14) isn't done: still `bcryptjs`. + Decide whether it's in 2.0. +4. **Later:** move from ExcelTS — deprecated in favour of `documonster` by the same author + (pre-1.0 in Oct 2026) — once documonster is stable. After 1.51.7 has run everywhere, the old + `pgboss` schema can be dropped (`DROP SCHEMA pgboss CASCADE;`). + +Languages (Afrikaans, §10) and Wallet passes (§7) are removed from scope (2026-10-28). ## Working on this repo @@ -176,8 +187,8 @@ a test server (both done 2026-10-28). up in its transaction history (`findPayments`); Yoco's Checkout API documents no lookup, so Yoco checkouts are "can't check". Tests: `backend/tests/paymentStatus.test.js`. - **Adding a provider:** write `providers/.js` with the same interface, add it to - `PROVIDERS` in `index.js`, mount `handleProviderWebhook('')` at `/api/v2/webhooks/` (in `src/v2/links.ts`; add the v1 path in `routes/webhookRoutes.js` only for providers already registered there) - (`routes/webhookRoutes.js`), and give it a settings card in + `PROVIDERS` in `index.js`, mount `handleProviderWebhook('')` at `/api/v2/webhooks/` (in `src/v2/links.ts`; add the v1 path in `routes/webhookRoutes.js` only for providers already registered there), + and give it a settings card in `frontend/src/components/admin/PaymentsTab.tsx`. New providers start switched off. - `Payment.method` stays the wallet type (card, apple_pay…) because cashups bucket on it; the provider is `Payment.provider`. @@ -194,7 +205,8 @@ a test server (both done 2026-10-28). - Bulk sends: `broadcastController`, `whatsappBroadcastController`, and `emailEventAttendees` / `whatsappEventAttendees` in `eventController` take `kind`; scheduled payloads carry it. - WhatsApp STOP: `handleIncomingMessage` in `whatsappController.js` (WAWP `message` event on - `/api/v2/webhooks/whatsapp?secret=…` — older set-ups use `/api/whatsapp/webhook`, which still works; secret in AppSetting `WAWP_WEBHOOK_SECRET`). + `/api/v2/webhooks/whatsapp?secret=…` — older set-ups use `/api/whatsapp/webhook` or `/api/webhooks/whatsapp`, which run the same handler + since 1.51.16; secret in AppSetting `WAWP_WEBHOOK_SECRET`). - Frontend: `app/dashboard/user/privacy`, `app/unsubscribe`, `app/dashboard/admin/data-requests`, `components/shared/NewsPrompt.tsx` (dashboard layout), `MessageKindPicker.tsx`. - **Anything new that stores personal data** must be added to `anonymiseUser` and @@ -467,7 +479,8 @@ a test server (both done 2026-10-28). - A list that grows for ever must page on the server (`page`/`limit`, `total`, `pages`) or load older items with a `before` cursor, and offer a search. `components/shared/Pager.tsx` renders "21–40 of 312 · Prev · Next". Already paged: users, registrations (Manage registrations), events, - payments, audit log, consent/access logs, data requests, My payments. + payments, audit log, consent/access logs, data requests, My payments. (Paths below are the v1 + names; each has a v2 successor in `SUCCESSORS`, `src/v2/deprecation.ts`.) - **Audit-log actions:** a new `AdminAuditAction` needs a label in `ACTION_LABELS` (`app/dashboard/admin/audit-log/page.tsx`) — the filter is built from that list. - **Still loading everything (fine for now, watch as installs grow):** user pickers that call @@ -548,8 +561,9 @@ a test server (both done 2026-10-28). - Turbopack for dev and build (the default). Lint with `npm run lint` / `npx eslint src` (`next lint` is gone). There's no middleware/proxy file — add `src/proxy.ts` (Next 16's name) only if needed. - **React Compiler lint rules are warnings, not errors** (`eslint.config.mjs`): 181 existing places, - mostly `useEffect(() => { load(); }, [...])`. Fix them in a screen when it's moved onto v2 - (1.51.6 – 1.51.11), then turn the rules back to errors. Don't add new ones. + mostly `useEffect(() => { load(); }, [...])`. The plan was to fix them as each screen moved onto + v2; every screen is on v2 now (1.51.15) but the rules are still `warn` — fix what's left and turn + them back to errors before or with 2.0. Don't add new ones. - `eslint-config-next` 16's bundled plugins (react, import, jsx-a11y) don't list ESLint 10 as a peer yet; they work, and npm notes the override. Revisit when they publish ESLint 10 support. @@ -594,13 +608,14 @@ a test server (both done 2026-10-28). ## Event picker and webhook guide (1.50.2) - **Choosing an event:** use `EventPicker` (`components/shared/EventPicker.tsx`), not a `