# Changelog All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] ## [2.1.1] - 2026-11-03 ### Fixed - **Feedback "Send now" and "Remind" no longer make the page wait** for every email: they work out who they're going to, answer straight away ("Sending the feedback form to 40 people in the background", "Reminding 12 people. It carries on in the background.") and the emails go out in a background task. The Feedback page refreshes itself a few times to show them land. ### Added - **One-off background tasks** (`enqueueTask` in `src/jobs/index.js`, first one `feedback-send` → `runFeedbackTask` in `utils/feedback.js`): queued in pg-boss (retried twice, kept across a restart), or run in-process straight after the response when the queue isn't running. Tasks must be safe to run twice: sending skips people already invited, and a reminder is claimed with the 24-hour rule, so two tasks at once never remind the same person twice. - `POST /api/v2/events/{id}/feedback/remind` answers with `queued`; its counts are what's being sent. `send-now`'s `invited` is how many it's sending to. ## [2.1.0] - 2026-11-03 ### Added - **Feedback page** (Supervisor → Feedback, `/dashboard/supervisor/feedback`; supervisors and admins, campus-scoped supervisors see their campuses). Every event with a feedback form, newest first: sent / scheduled / no send time, answered of asked with the response rate, the average star rating and the last reminder. One event's page has the per-question **Results** (with the AI "Summarise feedback" button), each **Response**, and on a named form **People** — who was asked, who has answered and the reminders each has had. "Send now" before it goes out; "Edit form" opens the event editor. - **Remind those who haven't answered** (`POST /api/v2/events/{id}/feedback/remind`): a fresh link to each, and the form to anyone eligible who hasn't had it yet (e.g. checked in after it went out). On a named form one person can be reminded (`userIds`). Nobody gets the form or a reminder twice within 24 hours (`REMIND_GAP_MS`). The automatic 3-day reminder is unchanged. - `GET /api/v2/feedback` (every form) and `GET /api/v2/events/{id}/feedback/results` (one event's results, responses and people) — `src/services/feedback.ts`, `src/v2/resources/feedback.ts`. - `FeedbackInvite.reminderCount`, counting automatic and manual reminders (migration `20261103120000_feedback_reminders`; existing reminded invites start at 1). - Access log action **`feedback_responses`**: opening a named form's answers. - Help page for the Feedback page; Feedback on the supervisor and admin dashboards and in Ctrl+K. ### Changed - **Anonymous forms stay anonymous on the page:** no names on answers, and no list of who has or hasn't answered (it would give answers away on a small event) — counts only, and no reminding one person. - A reminder now only goes to someone who still hasn't answered at the moment it's sent. ### Removed - The planned 2.1.0 AI helpers on the privacy pages (Consent log, Access log) are dropped from the roadmap. ## [2.0.2] - 2026-11-03 ### Changed - **Wider income bands in the Hub heartbeat**, from `R0–R1 000` up to `over R10 000 000` (was `over R100 000`): 14 bands, edges at R1 000, R5 000, R20 000, R50 000, R100 000, R150 000, R250 000, R400 000, R700 000, R1m, R2.5m, R5m and R10m (`BAND_TOPS` in `src/hub/report.js`). Every Cross Code licence-tier edge is a band edge; a test checks it. ### Added - **`income.eventIncome12m`** in the heartbeat: the band of the last 12 months' event income (payments less refunds, without donations, sponsorships or donation legs), which the licence tier is billed on. Shown on the Hub from Hub 1.6.2. ### Fixed - The heartbeat's income bands counted a donation twice once it was applied to a registration (the leg payment); they now leave legs out, like every report. ## [2.0.1] - 2026-11-02 ### Changed - **Summarise this report on every report.** The eight reports that list people (Payments between dates, Attendees per event, Revenue detailed, Master orders, Cashup audit trail, Parental consent status, Feedback summary, Medical & emergency list) now have the button too. They're sent as **anonymised totals**, worked out on the screen (`components/reports/aiReportData.ts`): per event and method, status or option, with names, emails, who recorded or did what, notes and comments left out; consent and medical details only as counts (given / pending / declined, with allergies, on medication, …); feedback as the per-question results without the comments. `POST /api/v2/ai/summarise-report` accepts every report key; for a people report it refuses (403 `AI_REPORT_HAS_PEOPLE`) any column that would carry a person (name, email, attendee, parent, emergency contact, notes, …), so a new column fails safe. Each people-report summary is recorded in the access log (`ai_report`; sensitive for consent and medical). The prompt tells the AI the totals are anonymised on purpose. ## [2.0.0] - 2026-11-02 ### Added - **AI helpers — the plumbing** (2.0, roadmap §15). The site calls AI through the Cross Events Hub (protocol §3b, Hub 1.6.0), which holds the Claude API key and a monthly allowance in rand per licence; no key is ever stored on the site. `GET /api/v2/ai/status` says whether to show the AI buttons: hidden when the licence has no AI (worked out from the licence token, without asking the Hub), disabled with the reason once the month's allowance is used up or the Hub can't be reached. The answer is cached for a minute and refreshed by every AI call. `` and `useAiStatus()` on the frontend; only supervisors and admins see AI. - **Site settings → AI** (admins): this month's use against the allowance, use per person, per helper and per day, a switch per helper, and an optional most-uses-per-person-per-day. Admins are emailed once a month when 80% is used. Changes are audited (`ai_settings_changed`). - Each AI call is logged in `AiCall` (person, helper, outcome, cost — never the prompt or answer); anonymising an account unlinks its calls, and calls go after 13 months. Anthropic is added to the operator register, switched off until a site uses AI. Migration `20261030120000_ai_helpers`. - v2 errors have a new code, `UNAVAILABLE` (503), for when the Hub or the AI service can't be reached. - **The five AI helpers' API** (supervisors and admins): `POST /api/v2/ai/draft-event` (the event form from a description, with ticket options, early bird, schedule and a budget from the notes), `/ai/summarise-report` (reports without people in them only), `/ai/draft-message` (email or WhatsApp, with `{{name}}` and the event placeholders), `/ai/summarise-feedback` (an event's feedback, sent without who answered; recorded in the access log) and `/ai/improve-text` (improve, shorter, or only fix mistakes). Every helper is told today's date. Email addresses, phone numbers and ID numbers in what's sent are swapped for placeholders and put back in the answer, so they never leave the site. Two checks are worked out in code as well as by the AI: a weekday that doesn't match its date, and costs a full event can't cover. - **AI buttons in the app** (only where the licence has AI; supervisors and admins): - New event → **Describe your event**: a few sentences fill in the form (details, dates, tickets, early bird; course dates as sessions), with the checks and a budget from the notes to look at first. Nothing changes until "Fill in the form". - **Improve / Shorter / Fix mistakes** under the event description, the site banner, and the email and WhatsApp message boxes; the suggestion replaces the text only with "Use this". - **Draft with AI** in Email attendees and WhatsApp attendees: a short note becomes the email's subject and body, or the WhatsApp message, with `{{name}}` and the event's details. - **Summarise this report** on reports without people in them, and **Summarise feedback** per event on the Feedback summary report. - Every suggestion says "AI suggestion — check it before saving". - **Privacy notice:** the built-in text says how the AI helpers use information and where requests go (sections 4 and 9). Sites with their own published notice see the change in the notice editor. - `npm run ai:eval` (backend): the helpers' eval set — fixed examples run through the site's Hub connection, with automatic checks on the facts and every answer printed to read. - **MIGRATING-TO-2.md:** what changes for integrations and for whoever runs the server, with every v1 address and its v2 replacement. ### Removed - **API v1** (`/api/…`). Every screen has used `/api/v2` since 1.51.16. Any v1 address now answers `410 Gone` with `code: "API_V1_REMOVED"`, except what outside senders still use: the provider webhooks (`/api/webhooks/yoco|payfast|whatsapp` and WAWP's oldest `/api/whatsapp/webhook`) and the links in messages already sent (calendar files and one-click unsubscribe answer `308` with their v2 address; a mail app's one-click POST to the old address is still handled) — `legacyV1Router` and `v1Removed` in `src/v2/links.ts`. The 43 v1 route files are gone (the controllers stay: `v1Route` runs them behind v2 routes); so are the `Deprecation` headers (`src/v2/deprecation.ts`), the v1 reference at `/docs` (it redirects to `/docs/v2`) and the hand-written `backend/API_DOCUMENTATION.md` (now a pointer to `/docs/v2`). - `node-fetch` from the backend's dependencies (nothing used it since the move to native `fetch`). ### Changed - **Passwords are hashed with Argon2id** (`@node-rs/argon2`, 19 MiB, 2 passes) instead of bcrypt. bcrypt hashes still sign in, and are re-hashed with Argon2id the first time each person signs in (`needsRehash` in `src/config/auth.js`, used by `logIn`). `bcryptjs` stays only to check those. - The campus-scope route test runs over the v2 routes (`tests/v2CampusScope.test.ts`): each staff or supervisor route needs a campus-scope middleware or must be on the list of routes whose service checks campuses itself. The read-only and impersonation lists name v2 paths only. - e2e tests call `/api/v2` only (`v2()` in `e2e/fixtures.ts` returns the answer's `data`); Playwright waits for `/api/v2/setup/needed`. - Documented shapes corrected: the access log's `actions` (action → label) and a cash-up's `cashDenominations` (notes and coins). - **The React Compiler lint rules are errors again** (`set-state-in-effect`, `purity`, `immutability`, `refs`, `static-components`); the 192 places they flagged are fixed, and `npx eslint src` reports nothing. New hooks in `frontend/src/lib/hooks.ts`: `useStateSync` (state that follows other state, set while rendering), `useExternalEffect` (loading from the API or reading the browser), `useNow` (the time, refreshed each minute); `hardNavigate` in `lib/navigation.ts` for the full reloads after signing out or switching who is signed in. Other pages navigate with the router. Several resets moved into the handlers that cause them. - Small behaviour fixes from that work: the site banner now appears and goes at its set times without a reload; lists of past/upcoming events stay right on a page left open; registering goes to the next page without a full reload; popups keep the latest close handler without writing it during render. ## [1.52.3] - 2026-11-02 ### Fixed - **Licence read-only mode works again.** The read-only guard (`src/hub/readOnly.js`) only listed v1 paths, and every screen has used `/api/v2` since 1.51.15 — so a suspended, revoked or unlicensed site could still create and change events, take registrations and start payments. The v2 successors of every blocked v1 route are now blocked too (answered as `READ_ONLY` with reason `LICENCE_READ_ONLY`). A test checks each blocked v2 path is a real route in the OpenAPI document, so a renamed route can't slip out of the list. ## [1.52.2] - 2026-11-02 ### Changed - **`scripts/deploy.sh` stops before touching anything when files in the install folder were changed or added by hand**, and lists them. A setup wizard run on one server had added files to `backend/src` that the backend build picked up, so the deploy failed halfway and rolled back. Ignored files (`.env`, uploads, backups, `ecosystem.config.js`) never count. `ALLOW_LOCAL_CHANGES=1` deploys anyway. - `bash scripts/deploy.sh --check` runs only that check (no backup, fetch, build or reload). The script can also be run from a copy outside the install (e.g. `/tmp/deploy.sh`, from the folder you're in), so an older install can check before updating — see DEPLOYMENT.md, "Updating". ## [1.52.1] - 2026-11-02 ### Changed - **The API documentation (`/docs/v2`, `GET /api/v2/openapi.json`) now describes every route in full.** Before, most routes answered by a v1 handler showed an empty body and `data: unknown`. Each one now documents the body it reads and what it answers, from the handler's actual code, and every path and query parameter has a description. Actions that take no input say "No body needed". - How: `documented: { body?, response? }` on `v1Route` (and `defineRoute`), with shared shapes in `src/v2/docs.ts`. These are documentation only — requests and answers aren't checked against them, so nothing an app already does can start failing — but outside production a body or answer that doesn't fit is logged (`[api/v2] … doesn't match its documented schema`). `tests/v2Docs.test.ts` keeps the document complete. - The funnel report's `eventIds` and the webhook deliveries' `status`/`before` filters are now declared (they worked, but weren't in the document or the typed frontend calls). - The frontend's generated API types are richer; a few calls had their types tightened to match (ticket transfer, breach register, kids check-out). Nothing changes in what they send. ## [1.52.0] - 2026-11-02 — urgent ### Fixed - **Paid door and manual registrations no longer end up without tickets.** On an event with a required attendee form, tickets wait until a form is in for each person — but At the door and Manual registration never asked for the form, so payment was recorded and nobody could be checked in. The form now pops up when someone is registered, selected or pays at the door (and after registering or paying in Manual registration): fill it in, or **Fill in later**, which issues the tickets once it's paid and sends the payer a link to the form (`POST /api/v2/registrations/{id}/form-later`, staff; `Registration.formWaivedAt`). Closing the popup counts as Fill in later. The door's check-in panel says when a form is holding tickets back. - **Picked-session bookings needed a form per session.** A person booked on three sessions needed three forms before their tickets were issued; each person now needs one (`formPlaces` in `utils/ticketUtils.js`). - **A required form with only statements and headings held tickets back for ever** (nothing to answer). Only a required form with a question counts now (`formNeedsAnswers`). Every place that decided this on its own (coupon making it free, manual and online registration) now asks the ticket generator (`formsOutstanding`). - **Self-service kiosk:** it asked for one form per main ticket picked, so a visitor adding to an existing registration (or booking picked sessions) could finish with the forms still short and no tickets. It now asks for the forms the server says are missing (`formsNeeded` on `POST /api/v2/registrations/manual`). Headings on the form showed as an empty text box; they're shown as text now, with the statements. - Recording a payment answers `formsNeeded` when a form still holds the tickets back. ### Added - **Corrections** (admins, `/dashboard/admin/corrections`): every registration at an event — past and closed ones too — with what needs putting right. Issue all missing tickets at once (forms left for later); fill in a form; issue tickets before payment ("pay later", the balance is still owed — `Registration.ticketsReleasedAt`); make it free (the balance is written off as a complimentary discount, `Registration.complimentaryDiscount`, part of `discountTotal`, shown as "Complimentary" on invoices and receipts; not on closed events); and check a ticket in or undo it after the event, for any session (a manual check-in, no message sent). Sending the tickets is a choice. `/api/v2/corrections/…` (admin): `GET events/{id}`, `POST events/{id}/issue-missing`, `POST registrations/{id}/tickets`, `POST registrations/{id}/complimentary`, `POST tickets/{id}/check-in`. Code in `src/services/corrections.ts`. - Audit actions `attendee_form_waived`, `tickets_issued_override`, `registration_complimentary` and `checkin_corrected`. Migration `20261102120000_corrections`. ### Upgrading - Update before your next event with a required attendee form. After updating, open Admin → Corrections for a past event to issue any tickets that went missing (leave "Send them" off if the event is over). ## [1.51.17] - 2026-10-30 — security release ### Security - **Forgot password no longer reveals whether an account exists.** It answered "Email not found" (404) for an unknown address, so anyone could check which emails have accounts. It now gives the same answer and status for every address, sent before any work that only happens for a real account (so the response time doesn't tell either); the reset link is made and sent afterwards. Applies to `POST /api/users/forgot` and `POST /api/v2/auth/password/forgot`. - **Sign-in no longer reveals it either.** An unknown email answered "User does not exist" (with a different status on v1); it now gets exactly the answer a wrong password gets, after a password check against a stand-in hash so it takes as long. - Forgot password is rate-limited like sign-in, so it can't be used to flood someone's inbox with reset emails. ### Upgrading - Update as soon as you can. Nothing else changes; the forgot-password page shows the new message. ## [1.51.16] - 2026-10-30 ### Added - **Incoming webhooks on v2:** `/api/v2/webhooks/yoco`, `/payfast` and `/whatsapp`. New provider set-ups use them — the PayFast notify URL (every new checkout), the Yoco webhook URL offered in Site settings → Payments, and the WhatsApp webhook URL. The v1 addresses (`/api/webhooks/…`, `/api/whatsapp/webhook`) keep working with the same handlers, because a provider may not follow a redirect on a POST; they now name their v2 address in a `Link` header. - **Links in sent messages on v2:** "Add to calendar" links point at `/api/v2/events/{id}/calendar.ics`, and the one-click unsubscribe header at `/api/v2/unsubscribe/{token}/one-click`. The same links in messages already sent answer `308` with their v2 address; a mail app's one-click POST to the old address is still handled there. ### Fixed - `/api/webhooks/whatsapp` was an empty stub that answered 500; it now runs the WhatsApp webhook handler like `/api/whatsapp/webhook`. ### Upgrading - Nothing has to change: existing Yoco and WhatsApp webhook registrations keep working. To move a registration to its v2 address, generate the Yoco webhook again (Site settings → Payments → Yoco) and paste the webhook URL shown in Site settings → WhatsApp into WAWP. PayFast moves by itself. ## [1.51.15] - 2026-10-30 ### Added - **API v2 — privacy and admin:** my privacy (`/me/privacy`, news, my data as JSON or PDF, requests, accepting the notice), `/privacy/notice`, unsubscribe links (`/unsubscribe/{token}`), the privacy admin (requests, notice drafts and publishing, operators, consent and access logs, readiness, retention, breaches); `/admin/audit-log`, jobs, impersonation (`/admin/impersonate/{userId}`, `/me/impersonation` and its end and log); site settings and first-run set-up (`/settings`, `/setup`); the Hub; outbound webhooks; backups (including the download); Yoco and PayFast settings (`/payments/yoco/…`, `/payments/payfast/…`). - `v1Route` handles `res.download` and `res.sendFile`. ### Changed - **Every API call the app makes now goes to `/api/v2`.** Only the incoming webhooks (Yoco, PayFast, WhatsApp) and the links in sent messages are still v1 — those are 1.51.16. - Ending a viewing-as session works on v2 while the session is read-only. ## [1.51.14] - 2026-10-29 ### Added - **API v2 — people and messaging:** the rest of accounts (`/auth/login/code/resend`, `/auth/password/forgot` and `/reset`, `/auth/activate`, `/me/sessions/revoke`, `/me/close`, `/me/activity`, `/me/verify-password`, `/me/two-factor/…`; admin `/users`, `/users/{id}`, `/users/exists`, sessions and anonymising); `/event-listing` (the full public list the site's event pages show) and `/admin/events`; messaging an event's people, email and WhatsApp broadcasts, `/scheduled-messages`, `/automations/schedule`; the WhatsApp connection (`/whatsapp/…`); `/banner`; `/saved-filters`; `/dashboard/today` and `/search`; `/stats/…`; `/analytics/…`; report files (`/reports/pdf`, `/excel`, `/email`, `/whatsapp`). - `defineRoute` refuses a method and path defined twice (the first would silently win). - `GET /me` also answers `newsPromptPending`, `noticePromptPending`, `twoFactorRequired` and `campusScope`, so the app's session (and its after-sign-in prompts) comes from v2. ### Changed - Sign-in (including the self-service kiosk's), password reset, two-step sign-in, account settings, admin users, messaging, broadcasts, WhatsApp set-up, dashboards, saved filters, reports and the public event lists use v2. ## [1.51.13] - 2026-10-29 ### Added - **API v2 — kids check-in and volunteers:** my family (`/me/family`, its children and adults); kids set-up and the check-in desk (`/events/{id}/kids/…`: settings, board, families, check-in and out, collection codes, duty, offline snapshot and sync; `/kids/check-ins/{id}/…`, `/kids/alerts/{id}/resolve`); serving (`/me/volunteering`, `/events/{id}/volunteer-roles`, sign-up, swaps, self check-in) and rosters (`/events/{id}/volunteers` and its QR and settings, roles, assigning, manual check-in, hours). ### Changed - The kids desk, rooms view, family page, serving page and volunteer rosters use v2. ## [1.51.12] - 2026-10-29 ### Added - **API v2 — tickets and attendance:** `/me/tickets` (+ `/email`), `/tickets` (the staff list, one ticket, sending, issuing, scan stats and recent scans, the ticket for a QR code), transfers (`/tickets/{id}/transfer`, `/ticket-transfers/{token}` to accept or decline), `/events/{id}/tickets`; offline scanning (`/scan-locks`: take tickets offline, snapshot, sync, release, reports); the attendance register (`/events/{id}/attendance`, its PDF/Excel export) and certificates (issue, send, revoke, download, preview, verify, `/me/certificates`); allocations (`/events/{id}/allocations`, `/allocation-sets`, `/allocation-groups`, `/me/allocation-groups`). - Frontend: `apiV2Raw()` for screens whose helpers pass the path as a string; file downloads read v2's error shape. - `v1Route` can run a v1 router (with `map: () => ({ url })`); a chain that answers nothing is a 404 instead of waiting. ### Changed - Tickets, transfers, offline scanning, attendance, certificates, allocations and the kids room set-up use v2. ## [1.51.11] - 2026-10-29 ### Added - **API v2 — money:** payments (`/payments`, `/payments/{id}`, receipts, refunds, donations assigned to registrations, stats, providers and their settings, open checkouts), payment links (`/registrations/{id}/payment-link` (+ `/send`), `/payment-links/{id}` — the pay page), `/donations/checkout`, `/me/payments`; cash-ups (`/events/{id}/cashup` and its counts, draft, close and reopen, `/cashup-lines/{id}/pending`, `/cashups/audit`); provider transactions; the waitlist (join, mine, offers by link, the event's list, offer/move/remove); sponsorship; parental consent (the event's list, medical notes, reminders, the consent form by link); `/form-responses`; and feedback (set-up, send now, the summary, the form by link). - **`src/v2/viaV1.ts`:** `v1Route()` — a v2 route answered by the v1 handler, in-process, behind v2's access checks, validation and docs. v1 JSON becomes `data`; v1 errors become v2 errors with v1's `code` as `reason`; piped files become downloads. - The v2 reference (`/docs/v2`) opens with its sections collapsed and has a filter box — with more than about 130 endpoints Swagger UI stopped drawing the expanded list. ### Changed - Every money screen (payments, at the door, cash-up, consent, waitlist, feedback, forms, the pay and donate pages, the user dashboard) uses v2. ## [1.51.10] - 2026-10-29 ### Added - **API v2 — managing registrations:** the staff list (`GET /registrations`, paged, `unpaid`, `userId`), an event's registrations (`/events/{id}/registrations`), a registration in full (`/registrations/{id}/full`, `/me/registrations/full`), `PATCH /registrations/{id}/status`, registering someone (`POST /registrations/manual`), bulk actions (`/registrations/bulk`), changing items (`PUT /registrations/{id}/items`), the invoice, coupon codes on a registration, named attendees and their form links, attendee form drafts and responses (`/registrations/{id}/form-draft`, `/registrations/{id}/form-responses`). - **`src/services/registrationAdmin.ts`:** everything after a registration is made, moved from `registrationController.js` (now about 60 lines of v1 wrappers). - v2 manual registration accepts the same `notificationPreference` and `couponCode` values v1 did. - Frontend: `fetchAllRegistrations()` reads every page of the staff list. Registrations, at the door, manual registration, self-service, payments, forms, the attendee composers, reports and the user dashboard all use v2. ### Changed - The roadmap gives money (payments, cashup, provider transactions, waitlist, sponsorship, consent, feedback) its own release, 1.51.11; the later areas move up one, and incoming webhooks and links are now 1.51.16. ## [1.51.9] - 2026-10-29 ### Added - **API v2 — series, season passes, deals and campuses:** `/series` (list, create, `PATCH`, delete, `/series/by-slug/{slug}`, `/series/{id}/compare`, `PUT`/`DELETE /series/{id}/follow`); `/season-passes` (list, create, `PATCH`, delete, `/season-passes/{id}/buy`), `/season-pass-purchases/{id}/checkout`, `/me/season-passes`; bundle deals (`/events/{id}/bundles`, `PATCH`/`DELETE /bundles/{id}`, `/bundles/quote`); coupon codes (`/coupons`, `/coupons/{id}`, `/coupons/redemptions`, `/coupons/check` — always a 200 with `valid`); campuses (`/campuses`, `/campuses/admin`, `/campuses/by-slug/{slug}`, `PUT /campuses/enabled`, `PUT /campuses/order`, create, `PATCH`, delete, `/campuses/{id}/audience`). - **Services:** `src/services/series.ts`, `deals.ts` and `campuses.ts` — the series, season pass, bundle, coupon and campus controllers are now thin v1 wrappers. - **v2 errors carry a service's own code as `reason`** (e.g. `CAMPUS_HAS_EVENTS`), like the shared middleware's codes. - Frontend: `apiV2Data()` — `apiV2` for screens with their own record types (path, parameters and body still checked; cast the answer). Series, season passes, bundles, coupons, campuses, the coupon field and bundle quotes on the register page all use v2. ### Changed - Checking a coupon code on v2 answers `valid: false` with the reason instead of an error; the coupon field shows that reason as before. ## [1.51.8] - 2026-10-29 ### Added - **API v2 — the rest of setting events up:** `GET /events/{id}/full` (the event in full — what's left per ticket, variant and session, form, attachments, bundles, next in series; staff also see inactive events, creator and email recipients), `GET /events/{id}/calendar.ics`, `GET /events/by-alias/{alias}`; ticket options (`POST /events/{id}/ticket-options`, `PATCH`/`DELETE /ticket-options/{id}`) and variants (`POST /ticket-options/{id}/variants`, `PATCH`/`DELETE /variants/{id}`); attachments (`GET`/`POST /events/{id}/attachments` — multipart — and `DELETE …/{attachmentId}`, admin `/attachments/status` and `/attachments/sync`); scanning sections (`/sections`); planned costs (`/events/{id}/costs`, `/costs/{id}`); image uploads (`/uploads/event-image`, `/uploads/logo`, `/uploads/favicon` — returning `path` and `url`). - **Services:** `src/services/eventDetails.ts` (from eventController.js, now 1,080 lines, from 2,217 at the start of 1.51.7) and `src/services/setup.ts` (sections and costs). v1 uses them too. - **v2 route features:** `file` routes answer with a download (`fileResponse`), and `upload` routes are described as multipart in the OpenAPI document. - Frontend: `fetchEvent()` for every event page (the public event and registration pages too), and `lib/eventSetup.ts` for ticket options, sections, attachments, costs and image uploads. ### Changed - The pre-migration fallbacks for attachments (JSON manifests on disk) are gone from the normal path; old manifests can still be imported with `/attachments/sync`. - v1's `GET /api/events/:id` now points at `/api/v2/events/{id}/full` as its successor. - Roadmap: series, season passes, bundles, coupons and campuses are 1.51.9; later areas move up one (to 1.51.15). ## [1.51.7] - 2026-10-29 ### Added - **API v2 — setting events up:** `GET /events/manage` (every event staff may see, hidden ones too; `past`, `inactive`, `closed`; campus-scoped), `POST /events`, `PATCH /events/{id}` (only what's sent changes; `sessionChanges` when sessions were sent), `DELETE /events/{id}` (admins; deactivates), `POST /events/{id}/copy-from`, and `GET`/`PUT /events/{id}/notify-recipients`. Event records are typed for their core fields and pass the rest through as stored (`z.looseObject`). - **`src/services/events.ts`:** create, update, deactivate, the staff list, notify recipients and copy-from moved out of `eventController.js` (2,217 → 1,717 lines), with the schedule helpers (`withSchedule`, `scheduleData`, `saveSchedule`). v1 uses it too. The pre-migration fallbacks (retrying without `registrationDeadline`, `goLiveAt`…) are gone — every install has those columns. Creating an event now also returns its ticket options. - Frontend: `fetchManagedEvents()` (`lib/api.ts`) — every event picker, the kiosk, reports and the set-up screens load events through v2; the event wizard creates, saves, copies and sets notification recipients through v2. v1 deprecation links for these endpoints. ### Changed - **pg-boss 11** (servers are on Node 24). It can't upgrade pg-boss 10's tables, so the job queue uses a new schema, `pgboss_v11`; schedules are recreated at start, and the admin page's "recent runs" start again from this release. The old `pgboss` schema is left as it was (it can be dropped: `DROP SCHEMA pgboss CASCADE;`). pg-boss 11 brings cron-parser 5, so the last cron-parser 4 deprecation is gone. - Roadmap: the rest of the events area (event details for staff, ticket options and variants, attachments, sections, costs, series, season passes, bundles, coupons, campuses, calendar file, alias) is 1.51.8; the later areas move up one (to 1.51.14). ## [1.51.6] - 2026-10-29 ### Fixed - **Command palette (Ctrl+K) was missing things.** It listed 9 of the 19 reports — now every report (built from the report catalogue, so new ones appear by themselves), plus Dashboard, Reports, Ticket options and My groups, and your own pages (My events & tickets, My payments, My privacy, My kids, My serving, My attendee forms, Make a donation). Attendee forms now opens for staff and supervisors too (the page allows them; the palette had it as admin-only). An e2e test fails when a dashboard page is neither in the palette nor deliberately left out. ### Changed - **Excel exports use ExcelTS** (`@cj-tech-master/excelts` 10) instead of exceljs, which is unmaintained: same API, no dependencies — the backend has 87 fewer packages and none of exceljs's deprecated ones (fstream, glob 7, inflight, lodash.isequal, rimraf 2). New `e2e/excel.spec.ts` opens a real report and attendance export. ExcelTS itself now says it's no longer developed (its successor, documonster, is pre-1.0); existing versions keep working. - The backend needs **Node 22 or newer** (`engines`); the servers run Node 24 LTS. - Roadmap: incoming webhooks and links in sent messages get v2 URLs too (1.51.13), with the v1 paths still answering; the area releases are now 1.51.7 – 1.51.13. ## [1.51.5] - 2026-10-29 ### Changed - **Next.js 16** (from 15.5) and **React 19.3**. Builds and dev use Turbopack (Next 16's default); `tsconfig.json` `jsx` is `react-jsx` (required by Next 16); `images.domains` → `remotePatterns`. - **ESLint 10** (ESLint 9 is out of support) with Next 16's own flat configs (`eslint-config-next/core-web-vitals` and `/typescript`, no more FlatCompat). `npm run lint` is `eslint src` (`next lint` was removed). Next 16's React Compiler-era rules (`react-hooks/set-state-in-effect`, `purity`, `immutability`, `static-components`, `refs`) are warnings for now — 181 places, mostly loading data in `useEffect`. - Removed the empty `middleware.ts` (a pass-through that did nothing; Next 16 renames middleware to "proxy"), which also drops its 117 kB bundle. ## [1.51.4] - 2026-10-29 ### Security - **Next.js 15.5.28** (critical: remote code execution through the image optimiser with SVGs, and a Server Actions denial of service), **@sentry/nextjs 10.78** (critical: middleware bypass), **zod 4.6.7** (high: memory exhaustion on oversized collections; backend and frontend), **multer 2.5.0** (high: denial of service from a pending file filter), **nodemailer 10.3.0** (moderate: three address-parsing flaws that could add recipients), fast-uri 3.1.9 and ip-address 10.7.5 (moderate). Minimum versions raised in package.json so a fresh install can't resolve an older one. `npm audit`: frontend and root clean; the backend's 6 remaining reports are low and dev-only (jest → deepmerge), with no real fix (npm suggests downgrading Jest to 25). ### Changed - **cron-parser 5** (v4 is unmaintained): `CronExpressionParser.parse` in `src/jobs/index.js`. - **Node 24 LTS** for new installs (`scripts/install.sh`); Node 20 reached end of life in April 2026. `deploy.sh` warns on servers older than Node 22; DEPLOYMENT.md has "Upgrading Node". - Roadmap: every endpoint moves to v2 before 2.0 (1.51.5 – 1.51.11). ### Known - Still deprecated, with reasons: exceljs (unmaintained; brings fstream, glob 7, inflight, lodash.isequal, rimraf 2) — replacing it with ExcelTS waits for approval; ESLint 9 (out of support) — ESLint 10 needs Next.js 16 (1.51.5); @opentelemetry/sdk-trace-base — pulled in by the latest @sentry/nextjs, for Sentry to update; glob 10 — inside Jest (dev only). ## [1.51.3] - 2026-10-29 ### Changed - **Express 5** (from 4). Kept Express 4 behaviour where it changed: the `qs` ("extended") query parser, and `req.body` as `{}` when a request has no JSON body. `@types/express` 5. - **The ticket scanner and at-the-door check-in use API v2** (`/api/v2/checkin/{qrCode}`). The v2 look-up now gives `attendee`, `bookedBy` and `ticketOptionId` (for section checks). - **Shared middleware answers in the v2 shape on /api/v2:** rate limits, the impersonation and licence read-only guards, the auth checks and campus refusals write v1's `{ message, code }`; on v2 that becomes `{ error: { code, message, reason } }` (`reason` = the specific old code, e.g. `TWO_FACTOR_REQUIRED`, `LICENCE_READ_ONLY`). Read-only answers have the v2 code `READ_ONLY` (403). The frontend's `apiFetch` treats `reason` like v1's `code`, so the 2FA and impersonation handling works on v2 calls too. ### Added - **v1 deprecation headers:** v1 endpoints that have a v2 replacement answer with `Deprecation: @` (RFC 9745) and `Link: <…>; rel="successor-version"` (`src/v2/deprecation.ts`). The rest of v1 has no replacement yet, so no header. ## [1.51.2] - 2026-10-29 ### Added - **API v2 accounts:** `POST /auth/signup` (needs `acceptTerms`), `POST /auth/login` (answers `signed_in` with a token, or `code_required` for two-factor) and `POST /auth/login/code`, both behind the login rate limit; `PATCH /me` (only what is sent changes; a new password needs the current one) and `GET /me` now with `notificationPreference` and `homeCampusId`. - **API v2 check-in:** `GET /checkin/{qrCode}` (look up: holder, what's left, session, consent) and `POST /checkin/{qrCode}` (check in everyone left or `people`). Every normal result is a 200 with an `outcome` — `checked_in`, `already_used`, `consent_required`, `wrong_event`, `wrong_section`, `section_not_found`, `no_session`, `locked`, `transferred`. Staff only, with the same campus rule as v1. - **Services:** sign up, log in, the 2FA step and profile changes moved from `userController.js` (~430 lines shorter) to `src/services/auth.ts`; scan preview and scanning from `ticketController.js` to `src/services/checkin.ts`. v1 answers exactly as before (`ServiceError` can carry the old `v1Status`, e.g. 400 for a wrong password, which is 401 in v2). - v2 routes can take extra middleware (`middleware: [loginLimiter]`). ### Changed - Logging in (and the 2FA code step), signing up, and changing your details or password use API v2. The scanner stays on v1 until 1.51.3. ## [1.51.1] - 2026-10-29 ### Added - **API v2 registrations and payments:** `POST /registrations` (signed in, guest for free events, or a waitlist link), `GET /registrations/{id}`, `POST /registrations/{id}/cancel` and `POST /registrations/{id}/checkout` (online payment, with an optional donation; answers `priceUpdated` with the new balance when an early-bird price ran out). Owners only (admins too); someone else's registration is `NOT_FOUND`. - **Services in TypeScript:** making and cancelling registrations moved from `registrationController.js` to `src/services/registrations.ts`, and paying a registration online from `paymentController.js` to `src/services/payments.ts`. v1 and v2 run the same code; `ServiceError` carries the HTTP status. `registrationController.js` is ~560 lines shorter. - **Typed frontend calls:** `npm run api:types` (repo root) writes the OpenAPI document to `frontend/src/lib/api-v2/openapi.json` and generates `schema.d.ts` from it (openapi-typescript); `apiV2(method, path, { params, query, body, authToken })` in `frontend/src/lib/apiV2.ts` checks the path, parameters, body and answer. A backend test fails while the saved document is stale. ### Changed - The register page, "Pay now" (registration success page and My Events) and cancelling on My Events use API v2. `apiFetch` reads v2 errors (`error.message`, with `code`/`fields` in `data`). ## [1.51.0] - 2026-10-29 ### Added - **API v2** (`/api/v2`), the groundwork for 2.0: every endpoint is declared once with zod schemas (`src/v2/route.ts`). The declaration validates the request, strips the response to what the schema lists, and generates the **OpenAPI 3.1** document (`GET /api/v2/openapi.json`, admin) shown at **`/docs/v2`** (Swagger UI, served locally). One error shape `{ error: { code, message, fields? } }` with stable codes, and one list shape `{ data, meta: { page, limit, total, pages } }`. First endpoints (read-only): `GET /events`, `GET /events/:id`, `GET /me`, `GET /me/registrations`. v1 (`/api/…`) is unchanged. - **TypeScript in the backend:** `tsconfig.json` (`allowJs`; `.ts` strict), `npm run build` → `dist/`, `npm run typecheck`, `npm run dev` through tsx, Jest runs `.ts` via ts-jest. Typed doors into JS modules in `src/v2/legacy.ts`. - Tests: `tests/v2.test.ts`, e2e `e2e/api-v2.spec.ts`. ### Changed - The server moved from `backend/src/index.js` to `backend/src/app.js`. `src/index.js` is now a launcher that runs the matching build in `dist/` (or compiles on the fly with tsx when there is none), so existing PM2 configs keep working unchanged. - `scripts/deploy.sh` and `scripts/install.sh` build the backend (`npm ci --include=dev`, then `npm run build`); a rollback to a release before 1.51.0 skips the build. The first update to 1.51.0 by an older deploy script still starts (it compiles at start-up); the next update builds. - e2e starts the backend with tsx. ## [1.50.2] - 2026-10-29 ### Added - **Searchable event picker** (`components/shared/EventPicker.tsx`) instead of the plain event dropdowns on staff and supervisor pages (scanner, event tickets, at the door, payments, manual, email and WhatsApp attendees, forms, attendance, consent, waitlist, allocations, bundles, offline scans, kids and volunteer set-up, manage registrations, the kiosk). It opens on upcoming events (soonest first); past ones are behind **Show past events** (latest first), and typing searches every event by name, campus or date. Keyboard: arrows, Page Up/Down, Enter, Escape. - **Reports:** the events list can be searched; "Select these N" / "Clear these" act on the matches. - **Site settings → Webhooks → How webhooks work:** what is sent and when, the envelope and headers, retries and duplicates, checking the signature (Node.js and PHP), Zapier/Make set-up, and a copyable example of every event type. `GET /api/outbound-webhooks` event types now carry an `example`; `tests/webhooks.test.js` checks each one has the same shape as the real payload. ### Changed - Pages that listed every event ever made in their dropdown (email and WhatsApp attendees, forms, bundles, scanner, payments) now open on upcoming ones; their separate "Include past events" checkboxes are gone (the picker has its own). Event tickets and Payments can now reach past events too. - e2e: `pickEvent()` in `e2e/fixtures.ts`; `e2e/event-picker.spec.ts`. ## [1.50.1] - 2026-10-29 ### Added - **Audit log:** search by person (name or email), target (type or `#id`) or IP, a Role filter, **Clear filters**, and "21–40 of 312" under the list. The Action filter now lists every action that can be logged (it was missing 35 — campuses, kids check-in, volunteers, series, season passes, webhooks, bulk actions, Hub updates, certificates and more), sorted by name. - **Data requests:** search by name or email, and closed requests a page (50) at a time — the list used to stop silently at 200. - **Webhook delivery log:** filter by status (failed, retrying, succeeded) and **Load older** — it used to show only the latest 50. - API filters: `/api/registrations?unpaid=1&userId=`, `/api/payments?userId=&from=&donations=1`, `/api/privacy/requests?search=&page=&limit=`, `/api/outbound-webhooks/:id/deliveries?before=`, `/api/admin/audit-log?search=&role=`. Shared `components/shared/Pager.tsx`. ### Fixed - Audit log: the **To** date left out that day's entries (it meant midnight at the start of the day). Both dates are now whole days in the site's time zone. ### Changed - **Payments** (supervisor) no longer downloads every payment and registration ever made when it opens: it loads the latest payments, today's (for the totals), donations with what they were applied to, and only registrations still owing. Refunds load the chosen person's own payments and registrations when they're picked. Faster as the years add up; the page works the same. ## [1.50.0] - 2026-10-28 ### Added - **Accessibility pass (WCAG 2.2 AA)** on the public pages, sign-in/sign-up, registration, payment, My Events and the self-service kiosk: - **Keyboard:** a "Skip to main content" link as the first Tab stop on every page; a clear focus ring (in the brand colour) on everything you can tab to; popups (Contact us, Join the waitlist, Sponsor a spot, Transfer ticket, the registration popup and send dialogs on My Events, the kiosk's Change Event and Confirm account changes) are announced as dialogs, take focus when they open, keep Tab inside, close with Escape and hand focus back. The kiosk's "Create an account" switch and its password eye can now be used with the keyboard. - **Screen readers:** every form field on those pages has a label tied to it (sign-in, sign-up, forgot/reset password, activation, profile, privacy centre, payments filters, donate, forms, feedback, consent, waitlist, sponsorship, transfer, kiosk and its custom questions); ticket quantity buttons say what they do ("Add one Adult", "Remove one Adult") and the number is announced; option buttons say which one is chosen; error messages are announced when they appear. - **Colour:** light grey text darkened to meet 4.5:1, and links inside sentences are underlined so they don't rely on colour alone. The page honours "reduce motion" on the device. - **Branding:** Site settings → Branding (and the setup wizard) warn when the primary colour is too light for white text and links (under 4.5:1) and offer a darker shade of it in one click. - Automated accessibility checks: `e2e/accessibility.spec.ts` runs axe-core (WCAG 2.0–2.2 A/AA rules) on those pages, plus keyboard tests (skip link, popup focus and Escape, ticket quantities, the kiosk switch). New dev dependency `@axe-core/playwright`. - `components/shared/ModalOverlay.tsx` for the app's own popups, and `components/layout/SkipLink.tsx`. ### Changed - e2e tests click ticket quantities by name (`/^Add one /`) instead of "+". ## [1.49.2] - 2026-10-28 ### Added - **Saved filters** on Manage registrations, Users, Events and Reports: set the filters, then **Saved filters → Save** under a name; click one to apply it; **★** makes it the default, applied when the page opens (but not over a link that already says what to show, such as the dashboard's "Waiting for you"). Reports remember the report, events, dates, campus and the past/inactive/closed options. Per person, stored on the server (up to 30 per page), removed when an account is anonymised. - `/api/saved-filters` (list, save, rename/default, delete — your own only). Migration `20261028180000_saved_filters`. ## [1.49.1] - 2026-10-28 ### Added - **Bulk actions on registrations** (Admin → Manage registrations): tick registrations, or "Select all shown" after filtering, and act on them at once — - **Send a message** by email or WhatsApp, as an event update to the person who registered (placeholders as on Email attendees); - **Mark paid** — records what each still owes, by cash, EFT, card or other; paid registrations get their tickets by email, as with a single payment; - **Move to another ticket** (one event) — the same lines, issued tickets and QR codes move with them, repriced at the new ticket's current price, so the difference shows as owing or overpaid; places on the new ticket are checked first; - **Put in a room or group** (one event) — their named people, with the group's capacity and gender rules; - **Export to Excel** (recorded in the access log, like other exports); - **Cancel** — coupon uses released and the waitlist offered the places; no refund (record refunds on the Payments page). Each runs the same code as doing it one at a time (closed events, payment caps, coupons, waitlist, privacy rules on messages), with a result per registration. Up to 500 at a time. - `POST /api/registrations/bulk` (campus-checked for every registration; payments and ticket moves refused in licence read-only mode); `registrationIds` filter on the email and WhatsApp attendee endpoints. Audit action `registrations_bulk` (migration `20261028170000_registrations_bulk`). ## [1.49.0] - 2026-10-28 ### Added - **Today on the dashboard** (staff, supervisors, admins): what's on today — each event, or its session today — with people checked in so far against places, children in now at kids church, and volunteers here against rostered (and how many short). Supervisors and admins also see money in today and over the last 7 days. Refreshes every 30 seconds; follows campus scoping. - **Waiting for you** (supervisors, admins): what needs someone, each linking to where it's dealt with — unpaid registrations for events in the next two weeks, young people waiting for parental consent, waitlists, cover requests, serving roles in the next week short of people, and for admins past events to cash up, provider payments to reconcile, open privacy requests and failed webhook deliveries. - **Command palette — Ctrl K (⌘K)** anywhere in the dashboard, or "Search or jump to…" on the dashboards: pages, settings tabs and reports for the person's role, actions ("New event", "Scan tickets", "Record a payment"…), and search — events for everyone; payments by amount ("R450") for supervisors; people and registrations (by reference) for admins. Keyboard: ↑/↓, Enter, Esc. - Deep links: `/dashboard/supervisor/events?edit=` and `?new=1`; `/dashboard/admin/registrations?q=&status=&event=`; `/dashboard/admin/users?q=`. - `GET /api/dashboard/today`, `GET /api/dashboard/search?q=`. ## [1.48.2] - 2026-10-28 ### Added - **Four demo seeds**, to match the church a demo is for — `npm run demo:small`, `demo:events` (the original demo), `demo:ministry` and `demo:multicampus` from the repo root (`demo:list` describes them; in `backend/` it's `npm run set-demo -- --profile=`). New in the seeds: multi-session courses with attendance and certificates, a "pick your days" conference, kids church with families, children, rooms and check-ins (including some checked in right now), volunteer rosters with QR check-ins and a cover request, an event series with followers and a season pass, and three campuses with campus-limited staff. Campuses are switched on only for `multicampus`. Series announcements and volunteer reminders are marked as sent, so the jobs don't email demo people. See `backend/DEMO_DATA.md`. ### Fixed - **`npm run set-demo` failed since 1.43.0** ("Event_createdById_fkey"): clearing the `Campus` table with TRUNCATE … CASCADE also emptied `User` (it points at Campus for the home campus), deleting the admin it keeps. Tables that `User` points at are now emptied with DELETE after the admin's links to them are cleared. ## [1.48.1] - 2026-10-28 ### Changed - **Built-in privacy notice brought up to date** with volunteer rosters (what is kept, reminders, who sees the roster and cover requests), following an event series, season passes, webhooks (connected systems, what they receive, 30-day copies), how people agree to the notice, and the `cross_events_dismissed_notices` browser-storage item. Sites that haven't published their own version show the new text straight away. - **Sites that published their own version** are now told: Admin → Privacy → Privacy notice lists what changed in the built-in text since they last reviewed it, marks each section with new text (**show it** / **Use the new text**), offers **Use all the new text**, and **Add** for built-in sections the notice doesn't have. **Done — hide this** records the review (`privacy_notice_builtin_reviewed`). Their own text is never changed without them; publish (with "Significant change" if people should accept again) to make it live. ### Fixed - **Agreeing to the notice when an account was made for you** — activating an account (made by staff, at the door or by whoever registered you) now asks you to agree to the Terms of Use and Privacy Policy, as sign-up does (consent log source "Account activation"). - **Never accepted?** Anyone who has never accepted any version (accounts made for them, or from before acceptances were recorded) is asked once after login ("Our privacy notice"), even while the built-in notice is in use. Before, they were only asked after a version marked as a significant change was published. - The "Change my cookie choice" button on the privacy page also shows above a cookie section an admin wrote themselves (any section whose id mentions cookies), not only the built-in one. ## [1.48.0] - 2026-10-28 ### Added - **Outbound webhooks** — Site settings → **Webhooks**: send what happens here to other systems (ChurchSuite, Planning Center, Google Sheets through Zapier or Make…). Add an https address and choose what to send: `registration.created`, `registration.paid`, `registration.cancelled`, `payment.received`, `payment.refunded`, `ticket.checked_in`, `user.created`, `event.published`. - Each message is JSON `{ id, type, createdAt, data }` signed with the webhook's own secret (`X-CrossEvents-Signature: t=…,v1=…`, HMAC-SHA256 of `.`; shown once, "New secret" to rotate). **Send test**, a **delivery log** (30 days, with the full message and what came back) and **Resend**. Failures are retried after 1 min, 5 min, 30 min, 2 h and 12 h, then marked failed. - Events are noticed in one place (a Prisma client extension in `config/db.js`), so every way of registering, paying, cancelling, refunding or checking in is covered; each is checked again a moment later, so a change that was rolled back sends nothing. - Safety and privacy: https addresses on public networks only (checked again at each send; redirects aren't followed); each webhook is added to the POPIA operator register (marked inactive when deleted); kids check-in and volunteer tickets are never sent; deliveries are deleted after 30 days and with an anonymised account. - New `webhooks` job (every minute, `WEBHOOKS_JOBS_ENABLED`); `WEBHOOKS_ENABLED=false` stops noticing events. Audit action `webhook_endpoint_changed` (migration `20261028160000_webhooks`). ## [1.47.4] - 2026-10-28 ### Fixed - **Update requested, then a newer version came out** — the Licence page said the newer version was requested ("Version 1.47.3 is available. Update requested …") when the request was for an older one, and there was no way to ask for the newer version; the update banner stayed hidden. Now it shows the request ("You asked for version 1.47.0 on …") and, below it, that a newer version has come out with **Ask for 1.47.3 instead** (Withdraw request stays). The banner shows again and says to change the request. Changing it is audited as `hub_update_requested` with `changedFrom`. - With Cross Events Hub 1.5.0 the Hub moves the open request on to the new version and emails the provider once; with an older Hub the site withdraws the request and makes it again. ## [1.47.3] - 2026-10-28 ### Added - **Season passes** — one price for a ticket at each of several events in a series. On the Event series page supervisors make a pass (name, price, optional sale end) and tick which events and which ticket (and variant) at each it includes; the form shows what they'd cost separately. Youth (parental consent) events, staff-only tickets and per-session tickets can't be on a pass. Events and price are fixed once someone has bought it (switch it off instead); campus-scoped supervisors can only use their campuses' events. - **Buying** — on the series page signed-in people choose how many and buy: they're registered at every event on the pass at once and pay once (a free pass gives the tickets straight away). If online payment isn't possible the places stay booked and "Your passes" offers **Pay now**. A pass stops selling when its first event starts. - **Money per event** — the price is split over the events in proportion to their normal ticket prices (whole cents). Each registration's line is priced at its event's share, and the payment is recorded as one payment per event (all linked to the purchase), so each event's cashup and reports count only its part. Pass registrations aren't repriced by early-bird changes, take no coupon codes, and their tickets can't be edited. - `/api/season-passes` (list, create, change, delete; `:id/buy`; `purchases/:id/checkout`; `mine`), `passes` on `GET /api/series/by-slug/:slug`. Making, changing and buying passes is blocked in licence read-only mode. Purchases are in "Download my data". Audit action `season_pass_changed` (migration `20261028150000_season_pass`). ## [1.47.2] - 2026-10-28 ### Added - **Series: year on year** report (Reports → Other) — pick a series and see each of its events side by side, oldest first: registrations (not cancelled), tickets, income (as on the dashboard: refunds counted, donations applied to orders left out) and people checked in (a multi-session event shows the average per session), with the attendance rate and the change from the event before. Bar charts of registrations and income; exports to PDF, Excel, email and WhatsApp like the other reports. Campus-scoped staff see only their campuses' events. **Compare** on each series on the Event series page opens it (`?report=seriesComparison&series=`). - `GET /api/series/:id/compare`. ## [1.47.1] - 2026-10-28 ### Added - **Event series** — group separate events (Camp 2025, Camp 2026; the monthly men's breakfast) on one page. Supervisors make series on the new **Event series** page (name, web address, description, picture) and put an event in one with the **Series** box in the event editor; a copied event keeps its series. A series can have events at several campuses. - **Series page** `/series/`: what's coming up (event cards) and past events. Each event in a series shows "Part of …" and **Next in this series** on its page. - **Follow a series** — signed-in people follow on the series page. When a new event in the series goes live (and hasn't started) followers get one email, sent as News & announcements: only to people opted in to news, with the unsubscribe link and one-click headers. New `series` job every 15 minutes (`SERIES_JOBS_ENABLED`); an event moved into another series is announced to that series' followers. - Followed series are in "Download my data" and removed when an account is anonymised. - API: `/api/series` (list, create, change; delete for admins; `by-slug`; follow/unfollow), `seriesId` on event create/update, `?series=` on `GET /api/events`, `series` and `nextInSeries` on `GET /api/events/:id`. Creating and changing series is blocked in licence read-only mode. Audit actions `series_created`, `series_updated`, `series_deleted` (migration `20261028140000_event_series`). ## [1.47.0] - 2026-10-28 ### Added - **Copy an event** — "Copy" on each card on the Events page opens the event editor filled in from that event: details, campus, sessions, ticket options, variants and early-bird tiers, sections, the registration form, notification recipients, the feedback questions, certificates and session reminders. Everything can be changed before saving. A **New start** box at the top moves every date by the same amount — the end, the sessions, the registration deadline, early-bird deadlines and the feedback date. On save the event's allocation groups (rooms, buses, teams) are copied too, and for admins its planned costs (a cost on a ticket option goes to the option with the same name). Not copied: registrations, coupons, attachments, bundles, the short link, the go-live time, cancelled sessions, kids check-in (kids ticket and rooms) and volunteer roles. - `POST /api/events/:id/copy-from` (blocked in licence read-only mode, campus-checked for both events); `POST /api/events` takes `clonedFromId`, recorded in the `event_created` audit entry. ## [1.46.2] - 2026-10-28 ### Added - **What's new before you update** — Site settings → Licence shows the release notes for every version newer than the site, so you can decide whether to ask for the update. Updates that fix a security problem or a serious bug are marked, and show as a red banner. - **Withdraw request** — changed your mind after pressing Request update? Withdraw it on the Licence page and your provider is told not to update the site. - **Not now** — on the update banner or the Licence page: hides the "update available" reminder until the next version comes out ("Remind me again" turns it back on). Urgent updates can't be put off. - **Notices from your provider** — planned maintenance and other messages from your provider show as a banner at the top of the dashboard for site admins and supervisors, at the times given. Close one with ×; current notices are also listed on the Licence page. - **`WHATS-NEW.md`** — the release notes churches see, in plain language. The Hub reads it from git with the version tags, so a release needs its section there before tagging. Needs Cross Events Hub 1.4.0 for the notes, withdrawing and notices; with an older Hub the site works as before. ## [1.46.1] - 2026-10-28 ### Removed - The Gitea CI workflow (`.gitea/workflows/ci.yml`). There's no Actions runner, so every push left a run stuck on "Waiting". Tests and lint are run by hand before a release, and releases are deployed with `scripts/deploy.sh` on the server. ## [1.46.0] - 2026-10-28 ### Added - **Volunteer rosters** — plan who serves where (Supervisor → **Volunteer rosters**). - **Serving roles** (Welcome, Parking, Kids, Sound…) per event, or per session on a multi-session event, with the number of people needed, optional shift times and a short description. Each event or session has its own roster; nothing repeats by itself. - **Anyone with an account can volunteer:** My account → **Serving** lists events looking for people and lets you sign up for a role that isn't full. Supervisors can also put someone on a role (even beyond the number needed). Nobody can be in two roles at the same time. Supervisors get a sign-up link to share (it works for hidden events too). - **Reminders** by WhatsApp or email the day before a shift. - **"Can't make it" swaps:** the volunteer asks for cover, the event's other volunteers are told, and the first to accept takes the place straight away — no approval. The event's notification recipients get an email about every swap and every withdrawal. - **Check-in on the day:** volunteers scan the event's check-in QR code (show it on a screen or print it) with their phone camera and are checked in for that day's shifts; staff can tick people in on Staff → **Volunteers**, and undo it. - **Kids rooms:** a role can be linked to a kids room. Its volunteers count as leaders on duty in that room once they check in (for the room's ratio), and the room screen lists who is rostered but not in yet. - **Free volunteer ticket**, off by default: choose a ticket per event (or add a free "Volunteer" ticket) and everyone on the roster gets a free place on it unless they already have a ticket. It's given back when they leave the roster. - **Roster sheet** with phone numbers, check-in times and a printable view; fill rate per event; **hours served** per person across events. - Audit log entries for the volunteer ticket, role changes, people put on or taken off a roster and check-ins by hand; opening a roster is in the access log. "Download my data" includes your shifts; anonymising an account gives up its future shifts. - Background job `volunteers` (every 15 minutes, `VOLUNTEER_JOBS_ENABLED`) sends the reminders. ### Fixed - **The kids check-in ticket was offered publicly:** the free "Kids check-in" ticket from 1.45.0 showed on the event page and could be booked by anyone. It (and the new volunteer ticket) is now left out of public event pages and lists and refused on public registration; staff still see it. ## [1.45.1] - 2026-10-28 ### Fixed - **Privacy notice (built-in text)** brought up to date: kids check-in (what's kept about children and authorised adults, who sees allergies, medical and custody notes, pickup codes, offline desk lists, the 6-month deletion), multi-session attendance, session reminders, certificates and their public check, home campus, WhatsApp sign-in codes, and campus-limited staff. "Stored on South African servers" is replaced by where the data really is: the site's own database at the hosting provider in the operator list. It now also says what the site sends Cross Code's licence server (health and totals, income as a range — no personal information), and lists the kids check-in browser storage. Sites that have already published their own notice keep it: review the changes and publish a new version from Admin → Privacy → Privacy notice. - **Terms of use:** a new "Kids Check-in" section (pickup codes, parents' responsibility for their children's details), sessions and certificates, kids messages among the required messages, and account deletion from the Privacy page. Later sections are renumbered. ## [1.45.0] - 2026-10-28 ### Added - **Kids check-in** — a secure, fully digital check-in and pickup for children's ministry, run from a staff desk. No label printers needed. - **Families are kept between events** (weekly kids church): parents add their children under My account → **Kids** (date of birth, allergies, medical and custody notes) and list **authorised adults** who may collect them (no account needed). Staff can find a family by name or phone, scan the parent's family QR code, or add a new family on the spot. - **Pickup codes:** checking in gives the family a 4-character code for the day (or session), shared by the children checked in together. It shows on the parent's phone with a QR code and is sent by WhatsApp or email (and, if chosen, to an authorised adult). Anyone with the code can collect. - **"Write on the sticker" panel:** first name, room, code and a short ALLERGY/MEDICAL alert in large print, for volunteers to copy onto a blank sticker. - **Rooms** with an age range, capacity and ratio (children per leader). The desk suggests the room from the child's age; the room screen shows live cards with allergies, medical and custody notes, "I'm on duty", and warns when a room is full or over the ratio. - **Check-out** by typing or scanning the code. A wrong code is refused, shown as an alert on the room screens and recorded in the audit log; checking out without the code needs a reason. "Call parent" asks the parents to come to the room. - **Offline desk:** download the families and 20 pickup codes for the device beforehand, keep checking in without a connection, and sync afterwards. - Children show on the **attendance register** and reports: each gets a free place on the event's kids ticket the first time, and every check-in counts as attendance. - Set up per event under Supervisor → **Kids check-in setup**; works per campus. - **Privacy:** allergies, medical and custody notes are encrypted and never put in messages; opening the desk or room screens is written to the access log; families are in "Download my data" and anonymising; a new retention rule deletes a child's profile after **6 months** without a check-in (on by default); a readiness check for it. - Rooms in Rooms & groups take an age range and a ratio (`minAge`, `maxAge`, `ratio`). ### Changed - Apple and Google Wallet tickets are removed from the 2.0 plan. ## [1.44.0] - 2026-10-27 ### Added - **Staff for some campuses** (Admin → Users → "Limit to campuses", while campuses are on). A supervisor or staff member limited to some campuses sees only those campuses' events plus events for all campuses — in every list, report, dashboard, the scanner and offline scanning. - **Events for all campuses:** they can scan, register people and take payments at the door, but not change them, cash them up or refund them (the event editor opens read-only). - **New events** go at one of their campuses; they can't move events to another campus. - **Admins and supervisors for every campus only:** the site banner, payment reconciliation and open online checkouts, and donations not linked to an event. - **Messages:** broadcasts only to people at their campuses or attendees of their events (no typed-in addresses). **Coupons:** only for their campuses' events. - Another campus's records answer "not found"; the **scanner says which campus** a ticket is for. Staff still see their own registrations for any campus's event. - Their dashboard says which campuses they work with. Admins are never limited, and limits are ignored while campuses are off (the Campuses tab warns first). Changing someone's limits is in the audit log; a campus with staff limited to it can't be deleted. - Every staff and supervisor route declares how it handles campus limits, and a test fails on any that doesn't (`tests/campusScopeRoutes.test.js`). ## [1.43.0] - 2026-10-27 ### Added - **Campuses** (Site settings → Campuses, off by default) for a church with more than one campus in one install. Churches with one campus see no campus fields anywhere. - Admins turn campuses on, then add, order, archive and delete campuses: name, web address, address, contact, colour, logo, default event location, and staff who get that campus's daily summary. A campus with events can't be deleted, only archived. Turning campuses off hides everything campus-related and deletes nothing. - **Events** belong to one campus or to **All campuses** (church-wide). Choosing a campus fills in its default location; moving an event to another campus is in the audit log. The Events list in the dashboard shows each event's campus and has a campus filter. - **Public site:** a campus filter on the events page, remembered in the visitor's browser and starting on their home campus; a campus shows its own events plus church-wide ones. The campus shows on event cards, the event page and ticket PDFs. **Campus pages** at `/campus/` (also in the sitemap). - **Home campus** on the profile page. - **Reports and dashboards:** a campus filter on Reports (all reports and the funnel) and on the admin and supervisor dashboards' past-month tiles, with a church-wide total. - **Broadcasts:** "Everyone at a campus" in Email and WhatsApp broadcasts — people whose home campus it is, plus (ticked) people who registered for its events in the last 12 months. News consent still applies. - **Daily summary:** campus recipients also get the summary of their campus's events. - The Hub heartbeat reports whether campuses are on and how many there are (`campusCount`). - Campus-scoped staff (supervisors and staff limited to some campuses) follow in 1.44.0. - The privacy notice lists the new `hope_events_campus` browser-storage item. ### Fixed - "Request update" (1.42.0) wasn't written to the audit log: the `hub_update_requested` action was missing from the database. The request itself always worked. ## [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 ### Changed - **"Request update" instead of the deploy command.** When a new version is out, Site settings → Licence shows a **Request update** button instead of `bash scripts/deploy.sh …`. It sends a signed request to the Hub (`docs/hub-protocol.md` §3a), which tells the provider; the site never updates itself. Afterwards it shows "Update requested on …" until the site runs that version, and the "update available" banner for admins goes away. Logged in the audit log (`hub_update_requested`). Needs Cross Events Hub 1.1.0; an older Hub answers "The Hub doesn't take update requests yet". ## [1.41.3] - 2026-10-27 ### Changed - **The platform is now called Cross Events** (and the Hub, Cross Events Hub): Site settings → Licence, the "update available" banner, the setup wizard, the audit log, help and the docs. Technical names stay as they are (`hope-events` repo, PM2 and nginx names, install folder, browser storage keys), so existing installs and sign-ins keep working. ## [1.41.2] - 2026-10-27 ### Fixed - **Background jobs page showed last-run times two hours ahead** (e.g. 12:55 at 10:55). Prisma's Postgres adapter dropped the time-zone offset of pg-boss's timestamps; the query now reads them as UTC. Job history itself was never wrong. `APP_TIMEZONE` is now in `backend/.env.example` and SETTINGS.md. ## [1.41.1] - 2026-10-27 ### Changed - **No licence now means read-only**, the same as a suspended licence: a site that isn't connected to the Hub can't create events, registrations or payments until a licence key is connected (admins see a red banner). `LICENCE_CHECK_DISABLED=true` switches this off outside production, for the end-to-end tests. - **Read-only mode also blocks editing events**, their options and their variants (suspended, revoked and unlicensed sites). - The site **checks in with the Hub 30 seconds after starting**, and 30 seconds after a licence key is connected, instead of waiting up to 15 minutes. ### Fixed - A site the Hub no longer knows (`INSTALL_NOT_FOUND`, e.g. the licence was released) kept showing "Active" on its old licence. It now drops the connection and licence, and shows "No licence". ## [1.41.0] - 2026-10-26 ### Added - **Hope Events Hub connection** (`docs/hub-protocol.md`). Each install connects to the Hub (`events-hub.crosscode.co.za`) with a licence key: - **Licence step in `/setup`** (on the last screen), and **Site settings → Licence** for existing installs: connect, see the licence (licensed to, plan, end date, grace period), the last check-in, and "Check now". - A **heartbeat every 15 minutes** (`hub-heartbeat` job; `HUB_HEARTBEAT_ENABLED=false` to switch off): version, health (database, background jobs, last backup, free disk, server errors, pending migrations) and totals (users, events, registrations, tickets, check-ins, payment providers, income as a range only). Never anyone's personal information. - **Licences are checked on the site** with the Hub's public key, so a Hub outage never switches a site off and a licence can't be faked by editing the database: - **Grace period** (licence past its end date, default 14 days): everything works; **only site admins** see "Licence needs renewing — X days left". - **Suspended or revoked**: read-only — no new events, registrations, tickets, payments, waitlist places, coupons or bundles. Tickets still scan; all data can still be viewed and exported; refunds, cancellations and privacy requests still work. - Not connected yet: works as before; admins see "Connect to the Hub". - **Update available**: admins see when a newer version is out, with the command to run. - **`/health`** — status, version, database, background jobs and last backup, for monitoring. - **Install script** (`scripts/install.sh`): a fresh Ubuntu server to a running site in one command — Node 20, PostgreSQL, PM2, nginx, HTTPS, configuration, migrations, build; then `/setup`. ### Changed - The generic settings endpoints never read or write the Hub connection (install id, secret, licence). ## [1.40.0] - 2026-10-23 ### Added - **POPIA toolkit, part 3.** Three new tabs on Admin → Privacy (POPIA): - **Readiness** (now the first tab): a checklist with a score — Information Officer and legal details set, privacy notice published, operators described (no generic names, a location for each), retention reviewed and the job running, no overdue requests, breaches reported to the Regulator, unsubscribe links working (`BACKEND_URL` on https), email set up, WhatsApp STOP replies arriving, two-factor login required, backups running. Each open item links to where you fix it. - **Retention**: how long personal information is kept, with what each setting would affect right now. A nightly job (`retention`, 03:30; `RETENTION_JOBS_ENABLED=false` to switch off) applies it: - **Inactive accounts** — no login, registration, payment or being named as an attendee for **5 years**: a warning by email (or WhatsApp) 30 days before, then the account is anonymised. Logging in keeps it. Never staff, supervisors or admins, and never while they have a registration for an upcoming event. **On by default.** - **Attendee form answers** — deleted 12 months after the event. - **Login history** — kept 24 months. - **Payer names and emails in Yoco/PayFast notifications** — removed after 24 months (payments themselves are kept). - **Audit log, access log and "view as" sessions** — kept 5 years. - Medical details, visit statistics and backups keep their existing settings, shown alongside. "Run now" applies them straight away. - **Breaches**: a register of security compromises (what happened, what information, who, consequences, what was done, advice to the people affected), with status and the dates the Information Regulator and the people affected were told. Each entry has a draft message for the people affected and a summary for the Regulator's form, ready to copy. - **Children's and medical information** is flagged in the access log (medical lists, and anything about an event that asks for parental consent), with a filter. - The privacy notice gets a `{retention}` placeholder — one line per retention period, following the settings. The built-in notice uses it; if you already published your own version, add a line with `{retention}` to your retention section. ## [1.39.0] - 2026-10-23 ### Added - **POPIA toolkit, part 2: the admin side.** A new **Admin → Privacy (POPIA)** page with four tabs: - **Privacy notice editor.** The privacy notice is now editable. It starts from the built-in text (updated for 1.38.0's privacy page, news opt-in, unsubscribe and STOP), one box per section; add, remove and reorder sections, save drafts, preview, and **publish numbered versions**. Placeholders such as `{org}`, `{ioName}`, `{ioEmail}`, `{medicalRetentionDays}` and `{operators}` are filled in when the notice is shown, so it follows Site settings and the operator register. Earlier versions stay readable on the privacy page (`/legal/privacy?version=N`). - **Re-accepting the notice.** When publishing, tick "Significant change" (and say what changed) to ask everyone to accept the new version: they're asked once, after their next login, with a link to delete their account instead. Sign-up records which version was accepted. Acceptances are counted per version. - **Operators** — the register of outside services that handle personal information (Yoco, PayFast, WAWP, WhatsApp, email and hosting providers, Google Maps, Sentry), with what each receives and where. Those in use are listed in the notice. - **Consent log** — every news opt-in/opt-out (and how), every privacy notice acceptance, and every parental consent answer, searchable by person. - **Access log** — who downloaded, emailed or opened personal information in bulk: report PDFs/Excel files (and reports emailed or WhatsApped), attendance registers, certificate downloads, room/group lists, attendee form answers, the parental consent and medical lists, database backups, and every "view as" session. With how many records each time. - The contact page shows the Information Officer (when set in Site settings → Legal), with a link to the privacy notice. - "Download my data" includes the privacy notice versions you accepted. ### Changed - Deleting someone's personal data also removes the IP addresses kept with their consent and notice records (the records stay as proof). ## [1.38.0] - 2026-10-23 ### Added - **POPIA toolkit, part 1: privacy for the people in the system.** - **Privacy page** (My account → Privacy): choose News & announcements by email and/or WhatsApp, see the history of those choices, **download my data** (a readable PDF, or the complete copy as JSON: account, registrations and the people registered, form answers, parental consent, payments, tickets and check-ins, certificates, feedback, communication choices), **ask for a correction**, and **delete my account**. - **Two kinds of bulk message.** When emailing or WhatsApping attendees, or sending a broadcast, choose **Event update** (about an event the recipients registered for — goes to everyone selected) or **News & announcements** (only to people who opted in, with an unsubscribe link). Attendee messages default to event updates, broadcasts to news, and the next-event promo automation is always news. Previews say how many people were skipped. - **Unsubscribe**: every news email ends with an unsubscribe link and carries one-click unsubscribe headers (Gmail, Apple Mail); every event update says why it was sent and links to the preferences. News WhatsApps end with "Reply STOP" and a link. Unsubscribed addresses without an account are remembered too. - **WhatsApp STOP**: replying STOP (or "unsubscribe") to the church's number stops WhatsApp news and sends a confirmation. Needs WAWP's webhook pointed at the URL shown in Site settings → WhatsApp (it carries a secret, since WAWP doesn't sign webhooks). - **News opt-in**: an unticked "news and announcements" box on sign-up. Existing accounts stay opted in (logged as "existing account") and are asked once, after their next login, to confirm or opt out. Every change is logged with when and how. - **Data requests** (Admin → Data requests): correction and deletion requests with a 30-day due date, emailed to the Information Officer and admins, with a daily reminder for ones due within a week or overdue (`privacy` job, 08:00; `PRIVACY_JOBS_ENABLED=false` to switch off). Completing or rejecting a request emails the person and is in the audit log. ### Changed - **Deleting an account is now a request.** "Delete my account" (and "Also delete my personal data" when closing an account) closes the account straight away; the personal information is deleted when an admin completes the request — after any registration for an upcoming event has been cancelled or the event is over. - **Deleting personal data now goes much further.** Before, it only cleared the account's name, email and phone. Now it also removes the names and details of the people they registered (and their own details on other people's bookings), form answers, parental-consent details, sponsor names, feedback authorship, pending transfer requests, certificate names, login history, and payer names/emails kept from Yoco and PayFast notifications. Payments, registrations, tickets and check-ins are kept, as "Deleted User", for the books and reports. Admin → Users → Anonymise uses the same deletion, and is refused while the person has a registration for an upcoming event. - "Download my data" is blocked while an admin is viewing as someone else. ## [1.37.4] - 2026-10-23 ### Fixed - **Deploy script** (`scripts/deploy.sh`): without a tag it now deploys the latest `main`. The PM2 config is per install: `ecosystem.config.js` is no longer in git (the repo has `ecosystem.config.example.js`), so deploys stop overwriting the install's app names and port; the script keeps the install's copy across checkouts and rollbacks, and creates it from the example on a fresh install. The script also runs from a temporary copy (so checking out a new version of it mid-deploy is safe), and a failure rolls back once. ## [1.37.3] - 2026-10-23 ### Fixed - The production build (and so the deploy) failed on unescaped quotes in the Payments help text. ## [1.37.2] - 2026-10-23 ### Added - **Payment status checks** for when a provider's notification never arrives. Payments → Reconcile has a new "Waiting for payment" list: online checkouts from the last 14 days with no payment yet, each with "Check status" (and "Check all"). For PayFast it looks the payment up in PayFast's transaction history and, if PayFast received it, records it exactly as the notification would have (same amount check, tickets and emails). A background job does this every 15 minutes for checkouts between 10 minutes and 3 days old (`payment-status`, switch off with `PAYMENT_STATUS_JOB_ENABLED=false`). Yoco's API has no way to look a payment up, so Yoco checkouts show "can't check" — find them in the Yoco portal and record them with Reconcile, as before. - **Test connection** on the PayFast settings card: checks the saved merchant ID and passphrase with PayFast. ## [1.37.1] - 2026-10-23 ### Changed - **No "Pay online" when it can't be used.** When no payment provider is switched on, or the amount is under the R15 minimum, the registration success page, My Events ("Make payment" and "Make donation"), the donate page, "Sponsor a spot", the donation box on the register form and the supervisor Payment Link tab no longer offer online payment. Where it helps, they say why and to pay at the event instead. - Roadmap: SnapScan and Zapper are dropped (Yoco and PayFast are enough); later releases move up two versions — POPIA toolkit is next as 1.38.0. ## [1.37.0] - 2026-10-23 ### Added - **PayFast.** A second online payment provider (card, instant EFT and more). Switch it on in Site settings → Payments, then enter the merchant ID, merchant key and salt passphrase from your PayFast (or Sandbox) dashboard and choose Sandbox or Live. Payments are confirmed by PayFast's notification (ITN) at `/api/webhooks/payfast`, which is checked the way PayFast requires: the signature, that it came from PayFast, that PayFast confirms it, and that the amount matches the checkout. PayFast starts switched off. - **Choosing how to pay.** When more than one provider is on, payers choose on a new "Pay online" page (`/pay/…`). Payment links in emails, WhatsApp and invoices go there too, so they work for every provider. - Payer-facing wording no longer says Yoco: "Pay online" after registering, a neutral redirect message, and the Terms and Privacy pages name both providers (Yoco or PayFast), including that PayFast may receive your name and email to fill in its payment page. - A payment of a different amount from the checkout (e.g. changed along the way) isn't recorded automatically: it waits in "Unreconciled Online Payments" with a note explaining why. ## [1.36.0] - 2026-10-23 ### Added - **Site settings → Payments** (replaces the Yoco tab): turn each online payment provider on or off and set their order. The first one enabled and set up is used by default. Yoco's keys and webhook settings are on the same tab. Yoco is the only provider for now; PayFast, SnapScan and Zapper follow in the next releases. If no provider is on and set up, online payments are off and people pay at the door. ### Changed - Online payments go through one payment provider layer (`backend/src/payments`). Yoco works exactly as before: the same checkout, the same webhook URL (`/api/webhooks/yoco`) and the same reconciliation. - **Online payments must be at least R15**, for every kind of online payment (balance, part-payment, donation, sponsorship). A smaller balance is paid at the door. - Payments record which provider took them (`provider`, e.g. "yoco"); existing online payments are marked as Yoco. The payment method (card, Apple Pay…) is unchanged, so cashups and reports add up as before. Provider fees are still never deducted or added — they're handled at cashup. - Yoco transactions are now "provider transactions" (`/api/provider-transactions`, with `/api/yoco-transactions` still working). The Payments page's reconcile list is called "Unreconciled Online Payments" and shows the provider. The database table is renamed in place, so stored transactions are kept. - The checkout endpoint is now `POST /api/payments/checkout` (with an optional `provider`); `/api/payments/yoco-checkout` still works. ## [1.35.1] - 2026-10-23 ### Added - **Waitlist per session.** On pick-sessions events, a full session shows "Join waitlist" in the session list, and the waitlist works per session: when a place in that session frees up, the next person waiting for it gets the offer. Offers never run past the session's start, and nobody is offered a session that has started or was cancelled. The claim link ticks the session for them. My Events, the claim page and the supervisor Waitlist page show which session an entry is for. - **"All sessions" tickets on pick-sessions events let people choose their sessions.** When an event's "How people book" is "Pick sessions", every ticket now shows the session list. A ticket set to "All sessions" is still one ticket at one price, whatever is ticked. The ticket then only scans on the ticked sessions (online and offline), and the attendance register, certificates, session reminders and session capacity follow them. Tickets and the ticket email list the ticked dates. A ticket set to "Pick sessions" is still charged per session. Events booked as "The whole course" show no session list. Bookings made before this cover every session, as before. - **Session picker at the door.** The At the door "Select items" pop-up now has the session picker for per-session tickets, so walk-ins can be booked straight in. For a new attendee, a place in today's session is selected by default when there's room. ### Changed - Per-session tickets show their list of sessions straight away (on the registration page, Manual registration, At the door and the self-service kiosk). Before, the list only appeared after pressing "+", so it wasn't obvious you could choose sessions. Ticking a session sets the quantity to 1. ### Fixed - Per-session stock limits on pick-sessions tickets weren't being enforced, and the public event page lost all stock information on events with such a ticket. - The offline-scanning service worker served the app's script files from its cache first, for good. On a development server, where those files keep their names when they change, a browser that had opened the scanner kept running old code on every page, even after a hard reload. It now fetches them from the network and uses the cache only when offline. Its cache is renamed, so old copies are cleared. - At the door, editing a registration that has per-session tickets could no longer be saved ("below the quantity already issued"). - Whole-course tickets: the waitlist now also counts room in sessions that have a capacity, so it no longer says "places available" when a session is full. Places held for waitlist offers now count towards session capacity. ## [1.35.0] - 2026-10-23 ### Added - **Pick sessions.** A multi-day event can let people choose which sessions to come to — day passes for a conference, or a weekly drop-in class. In the event wizard choose "How people book: Pick sessions", then in Items & Pricing set a ticket to "Pick sessions (price per session)". People tick the sessions they want when they register; each session is its own line and its own ticket, at the per-session price (early-bird and staff prices apply per session; late-joiner pricing doesn't). A session can be booked until it starts (staff can book until it ends). Whole-course tickets can still be sold alongside, and stop selling when the course starts. - **Session capacity**: in pick-sessions events each session can have a capacity, covering picked places plus whole-course tickets. Full sessions can't be ticked. A per-session ticket's stock limit is places per session. - Picked-session tickets only scan on their own session ("This ticket is for Class 2 (2026-11-11)…"), on and offline. The attendance register shows one row per person with a dash for sessions they didn't book, and completion and certificates count the sessions they booked. Session reminders go only to the people booked on that session. Tickets, printouts and the ticket email show the session's date. - The session picker is on the public registration page, Manual registration and the self-service kiosk. - The roadmap to 2.0 and a handover note are now in the repo: `docs/ROADMAP-v2.md`, `docs/HANDOVER.md` (plus the previous round's spec, `docs/FEATURES-ROUND-1.md`). ### Changed - Per-session tickets can't be changed from My Events' "edit booking" (book more sessions by registering again); they still count towards the total. At the door, per-session tickets are booked from Manual registration (the page says so). ## [1.34.0] - 2026-10-22 ### Added - **Background jobs page** (Admin → Site Settings → Background jobs): every scheduled job with its schedule, next run and last 10 runs (start, finish, result or error), and a "Run now" button (recorded in the audit log). - **End-to-end tests** with Playwright (`npm run test:e2e`): they start their own backend and frontend against a separate, freshly seeded database and cover the public pages, free and paid registration through payment, ticket, check-in and cashup, multi-day check-in with the attendance register and certificates, creating a multi-session event in the wizard, the self-service kiosk, and the jobs page. - **CI workflow** (`.gitea/workflows/ci.yml`): backend tests, frontend lint, typecheck and build, and the end-to-end tests on every push and pull request. It runs once a Gitea Actions runner is registered. - **Deploy script** (`scripts/deploy.sh `): backs up the database, checks out the tag, installs, migrates, builds and reloads PM2, going back to the previous version if a step fails before the reload. CI runs it over SSH for `v*` tags once the `DEPLOY_*` secrets are set. ### Changed - Timed background jobs (daily summary, waitlist, feedback, session reminders and certificates, consent, analytics rollup, backup, temp cleanup) now run on a job queue in Postgres (pg-boss) instead of in-process timers. Each runs once per schedule even with more than one server process, failed runs are retried, and a slow run never overlaps the next. Schedules are cron, in `APP_TIMEZONE` (Africa/Johannesburg by default) rather than the server's clock; change one with `JOB_SCHEDULE_`, or turn all jobs off with `JOBS_ENABLED=false`. The existing `*_ENABLED` flags still work; the old `*_JOB_INTERVAL_MS` settings are replaced by the schedules. If the queue can't start, the jobs run on timers as before. - The server lets a running job finish before it stops or restarts. ### Fixed - At the door, the Check-In tab counted every past session's check-in on a multi-day ticket, so from the second session the ticket showed as fully used. It now counts only today's session. ## [1.33.0] - 2026-10-22 ### Added - **Multi-day events.** An event can run over several sessions, e.g. every Wednesday 18:30–20:30 for 5 weeks. In the event wizard choose "Multiple sessions", create the dates from a repeat pattern (daily or weekly, every N, on chosen weekdays, for a number of sessions or until a date), then edit any session's label, times or location, add one-off dates, or cancel a session (kept for history). People register and pay once and get one ticket for every session. - The event page shows the schedule (past sessions greyed out, the next one highlighted, cancelled ones struck through). Event cards show "5 sessions · Wed 4 Nov – Wed 2 Dec", and multi-day events stay listed until their last session, sorted by their next one. Calendar files have one entry per session. Ticket PDFs, printed tickets and the ticket email give the session range. - **Late joining**: a multi-day event closes registration when its first session starts, unless late joining is on (until session N, set per event). Late joiners pay full price, a pro-rata price for the sessions still to come (rounded to the nearest R10, at least R10), or a fixed late price — main tickets only, and never more than the normal price. The event and registration pages say when the late price applies. - **Per-session check-in**: a multi-day ticket is checked in once per session. The scanner uses today's session (staff can pick another), shows the session on the confirm screen, and says "Already checked in for Week 3 at 18:42" on a second scan. Each event chooses whether check-in is open the whole day of a session (the default) or only from 2 hours before it until it ends. Offline mode downloads the list for today's session, and synced scans count for the session at their scan time. - **Session reminders**: optional per event — 1 hour, 3 hours and/or 1 day before each session, by email and/or WhatsApp (each person's notification preference still applies). Off by default. - **Attendance register** (Dashboard → Attendance): attendees × sessions with ticks, totals per session, completion, search and filters (completed, not completed, missed the last two sessions), and Excel/PDF export. Supervisors can tick someone present or absent, recorded in the audit log. Also works for single-date events (one "Checked in" column). - **Completion certificates**: optional per event, in the wizard's new Attendance step. Four designs (Classic, Modern, Church, Kids) with the site logo and colour, your title and wording ({name}, {event}, {sessionsAttended}, {totalSessions}, {endDate}), an optional signature name, role and image, and who qualifies (every session, at least N sessions, or at least N%). "Preview certificate" shows a sample. Certificates are issued automatically when the event ends (and can be sent automatically), or from the attendance register: issue now, issue to one person anyway, send, download all as one PDF, or revoke. People download theirs under My Certificates on My Events. Each has a code and QR code that anyone can check on the public page `/certificates/verify/`, which shows only the name, event and dates. - Saving an event where sessions moved or were cancelled offers a "Message attendees" link, since registrants aren't told automatically. - A background job every 5 minutes sends due session reminders and issues certificates (`SESSION_JOBS_ENABLED=false` to turn it off). The church's timezone for "today" defaults to Africa/Johannesburg (`APP_TIMEZONE` to change). ### Changed - The event wizard has a ninth step, Attendance, for late joining, check-in window, session reminders and certificates. ## [1.32.0] - 2026-10-22 ### Added - Event cards on the home page and events list show a diagonal "Early bird" ribbon in the top-right corner while the event has an early-bird tier running (deadline not passed and places left on that tier). It isn't shown when the event is sold out, registration is closed or not open yet, or the event is contact-only. ## [1.31.1] - 2026-10-22 ### Added - Settings → Organisation has a "Google Search Console verification" field. Paste the HTML tag from Search Console and the site outputs it on every page, so each deployment can verify its own domain without uploading a file. ## [1.31.0] - 2026-10-22 ### Added - The registration funnel's traffic source works without tagged links: visits from Facebook, Instagram, Google, X, LinkedIn and other sites are recognised from where the visitor came from (and Facebook's/Google's click ids). Links without a tag used to count as "direct". WhatsApp still only shows from tagged links (`?utm_source=whatsapp`), since it doesn't pass that on. - The event page's Share button shares the link tagged `?utm_source=share`, and Save QR encodes it tagged `?utm_source=qr`, so those visits show separately. - Event pages tell search engines about the event in Google's event format (schema.org `Event`): name, dates, venue, picture, organiser, ticket prices in Rand and whether it's sold out. Google can then show events with their date, venue and ticket link in search results and in its event listings. Contact-only events are listed without tickets. ### Changed - Event pages, the events list and the home page tell search engines their one official address, so `?utm_source=…`, `?src=…` and alias links all count towards the same page in search rankings. Shared event links also carry the event's address. ## [1.30.1] - 2026-10-22 ### Changed - All tickets now share the design of the tickets printed from the user dashboard: rounded white cards with a light border and soft shadow, the date beside the event name, and the QR code in the middle. This covers the PDF sent by email and WhatsApp (now 6 per page, so the QR codes are bigger) and printing from Event Tickets (staff) and At the door (supervisor). Printed names are now escaped, so a name with `<` or `&` prints correctly. ## [1.30.0] - 2026-10-22 ### Added - The register form asks for an optional **Donation amount** under the ticket options. Pick a suggested amount (worked out from the ticket total), enter a custom amount (min R15), or choose None. The donation shows in the total and is paid in the same Yoco checkout as the tickets. It's recorded as a separate donation to the event, so it never counts towards the registration's balance. ### Fixed - Event pages with a waitlist crashed with "Attempted to call soldOutLines() from the server". The sold-out helper now lives in `lib/waitlist.ts` so the server page can call it. ## [1.29.1] - 2026-10-21 ### Changed - The Coupon codes page matches the Bundle deals page and works on phones. Codes show as cards with the discount, events, uses, restrictions, dates and limits. On phones, the edit form and the list of uses open full-width from the bottom, and the discount type is picked from three buttons. - The coupons list hides codes that are off, expired or used up unless you tick "Show codes that are off, expired or used up". Search also matches event names. - When creating or editing a code, the Events list shows upcoming events only, soonest first, with a search box and a "Show past events" option. Past events already on the code stay listed so they can be unticked. ## [1.29.0] - 2026-10-21 Run `npm run prisma:deploy` in the backend when deploying. This release adds a migration. ### Added - Bundle deals now come in four types, chosen when you create one: - **Exact set**: these tickets in these numbers for one price, e.g. 2 adults + 3 kids for R220. This is how bundles worked before. - **Pick any**: any mix of the qualifying tickets for a set price, e.g. any 4 of Adult or Child for R250, so 2 + 2 and 4 + 0 both count. - **Buy X get Y free**: in every set of qualifying tickets the cheapest are free, e.g. buy 3, get 1 free. - **Group discount**: from a group size up, every qualifying ticket costs less (a price per ticket or a percentage off), e.g. 10+ tickets: R70 each. It applies once, to the whole group, and never makes a ticket dearer. - The deals list and the "Complete bundle" cards on the register form, at the door, manual registration and the kiosk describe each type in one line, e.g. "Any 4 of Adult, Child for R250". For a group discount the button reads "Complete group" and adds the tickets still needed. - `npm run set-demo`: Family Fun Day also has a pick-any deal, "Lunch for four" (any 4 lunch packs for R220). ## [1.28.3] - 2026-10-21 ### Fixed - Bundle deals edit form: each ticket row's quantity box filled the whole row, which pushed the ticket picker off the side and added a sideways scrollbar. The quantity box is narrow again, with the ticket picker beside it. ## [1.28.2] - 2026-10-21 ### Changed - The Bundle deals page has a new layout that works on phones. It shows upcoming events only, soonest first, with a "Show past events" option. Bundles show as cards with their tickets, price, saving, uses and dates. On a phone, the edit form opens full-width from the bottom, and its price section shows the standard price, the bundle price and the saving side by side. ## [1.28.1] - 2026-10-21 ### Added - At the door, manual registration and the self-service kiosk now list the event's bundle deals and show the same bundle cards as the register form: once a ticket from a bundle is picked, **Complete bundle** tops up the ticket numbers, and **+** adds another full set. ### Fixed - At the door now has the same "← Back to dashboard" link as the other dashboard pages. - At the door's "less than already paid" warning shows the total after bundle deals. ## [1.28.0] - 2026-10-21 Run `npm run prisma:deploy` in the backend when deploying. This release adds a migration. ### Added - **Bundle deals**: sell a set of tickets together for one price, e.g. 5 Adult + 3 Child for R500 instead of R550. Supervisors set them up per event under Dashboard → **Bundle deals**: the tickets and quantities (one variant or any variant), the price, optional dates, and on/off. - Bundles apply automatically, with no code, as many times as a registration's tickets allow; leftover tickets are charged as usual. A bundle only applies when it's cheaper than the tickets at the prices actually charged, early-bird and staff prices included. When several compete, the one that saves the most is used first. This works for online registration, manual registration, at the door and on the kiosk. - The event page and the register form list the event's deals, and every basket shows the saving live. On the register form, once a ticket from a bundle is picked, the bundle appears with what's missing and a **Complete bundle** button that tops up the ticket numbers. Once it's complete, **+** adds another full set. Invoices, receipts, emails, WhatsApp messages and the Yoco payment page show it as its own line, e.g. "Bundle: Family deal ×2". - The Discounts report lists bundle deals next to coupon codes. Each bundle shows how often it's been used and the total saving given. - `npm run set-demo`: Family Fun Day sells a **Family deal** bundle (2 adults + 3 kids for R220) in place of the old Family pass ticket. ### Changed - Coupon codes now work out after bundle deals, on what's left. Registration.discountTotal now holds bundle and coupon discounts together, with the bundle part in the new `bundleDiscount`. - Removing a code from a registration keeps its bundle deal. When an early-bird tier expires before payment and prices change, bundle deals are worked out again and coupon amounts are kept. - Registrations keep a bundle they already have, even after it's turned off or its dates pass. Deleting a bundle that has been used turns it off instead. ## [1.27.1] - 2026-10-21 ### Added - `npm run set-demo` also stages ten completed events from the past year, with door sales recorded by staff, staff cash counts, check-ins, refunds, donations and post-event feedback. Their cashups go through every path: a quick close; full closes with card fees, a cash deposit fee, a written-off shortfall, cash kept on hand and an unaccounted amount; a close, reopen and re-close; pending EFT money that was later received and some still outstanding; and one event left open with the cash counted, ready for a live cashup. Funnel stats older than 90 days are stored as daily totals, the way the app rolls them up. See `backend/DEMO_DATA.md`. ## [1.27.0] - 2026-10-21 Run `npm run prisma:deploy` in the backend when deploying. This release adds a migration. ### Added - Cashups now record where each payment method's money ended up. For cash, card, EFT and other, the expected takings are split into what's **in the bank**, **cash on hand**, and **pending** (on the card machine or Yoco report, or with a proof of payment), with a reference for the pending amount. Card fees, bank charges, cash shortfalls and other losses are **written off** with a reason. Each method shows what's still **unaccounted**. Closing with an unaccounted amount is allowed after a warning, and the amount comes off profit, as variance did before. - When staff have counted the cash, cash on hand is worked out for you: the count, less what reached the bank and any deposit fee written off as a bank charge. - Pending money on a closed event can be marked **received** or **written off** later from the cashup screen, without reopening the event. Each one is logged with who did it and when. - Reopening an event starts the next cashup from the last one, with any pending money settled since folded in. - Write-offs show as **Bank & card charges** on the cashup screen and in the Cashup, Finance and Profit reports. The Cashup report has new In bank, On hand, Pending, Written off and Unaccounted columns. ### Changed - Net profit now subtracts write-offs as their own line instead of showing card fees and bank charges as missing income. The net figure is the same. - Every dashboard page uses the same back link: the small "← Back to dashboard" link above the page title, as on the Waitlist page. The grey Back buttons are gone. Site settings, profile, donate and manual registration, which had no way back, now have one too. ## [1.26.1] - 2026-10-21 ### Added - `npm run set-demo` in the backend replaces the database contents with demo data for showing the platform to other churches. It keeps the site settings and the admin account, and stages six upcoming events with registrations, payments, tickets, a waitlist, camp cabins, coupons, costs and funnel stats. See `backend/DEMO_DATA.md`. ## [1.26.0] - 2026-10-21 ### Changed - Upgraded Prisma from 5.22 to 7.10. Prisma 7 connects through the `@prisma/adapter-pg` driver adapter (node-postgres) instead of the Rust query engine. The database URL moved from `schema.prisma` to the new `backend/prisma.config.js`, which loads `backend/.env` itself. All Prisma clients are now created in `src/config/db.js`, and the server shares one client instead of opening two connection pools. No schema or migration changes. - Prisma 7 checks TLS certificates on database connections. A `DATABASE_URL` that uses SSL with a self-signed or otherwise invalid certificate now fails to connect where Prisma 5 accepted it. - `npm run dev` in the backend now uses Node's built-in `node --watch` instead of `nodemon`. - The frontend now passes ESLint with no errors or warnings, down from 1,137, and `next build` runs ESLint again. It was skipped before (`eslint.ignoreDuringBuilds`), which is how the issues built up. - API data is now typed. `src/types` describes the records the backend returns, modelled on the Prisma schema, and `apiFetch` returns `unknown` unless the caller names a type, so untyped responses no longer pass silently. - Effects list everything they depend on. Data loaders are wrapped in `useCallback`, so a page reloads when its inputs change instead of showing stale data. - The pricing helpers that were copied into several pages now live in `src/lib/pricing.ts`. ### Fixed - Internal links on the home page, the 404 page and "Forgot your password?" now navigate client-side instead of reloading the whole page. - Changing the page size on Admin → Users fetched the list twice; it now fetches once. - At the door, the refund history now shows a refund's reason. The page was reading a field that doesn't exist, so the reason never appeared. - In the Master Orders report, a ticket option named like one of the fixed columns (e.g. "name") could overwrite that column's value. - Removed code that could never run: an unreachable "Pay with Yoco" button on the registration form, an unused attendee-forms block on the registration success page, unused export helpers in Reports, and fonts that were downloaded but never applied. ### Security - Backend `npm audit` now reports 0 vulnerabilities: - Patched `follow-redirects` (pulled in by `axios`) to 1.16.1, which fixes leaking credential headers on cross-origin redirects. - Removed `nodemon`, the only backend package that pulled in `braces`. - Jest's coverage loader now uses `js-yaml` 4, which drops the `sprintf-js` advisory. - Frontend: overrode `postcss-selector-parser` to 7.1.7, used by the Tailwind 3 build. The generated CSS is byte-identical. The remaining frontend findings (7 high) are all the same `braces` advisory (GHSA-vfj7-8cjw-p6xm). It has no patched release, comes in only through build and lint tools (Tailwind 3 and `eslint-config-next`), and only ever handles glob patterns from our own config, never user input. ## [1.25.1] - 2026-10-20 ### Fixed - On mobile, the cookie consent banner now sits above the bottom navigation bar instead of being hidden behind it. - The floating help button moves up above the cookie consent banner while it is showing, so the banner no longer covers it. ## [1.25.0] - 2026-10-20 ### Added - A **Yoco** tab in Site Settings for online payments: - **Secret key:** shown masked like a card number (`sk_test_***…aba`) with a Test/Live badge. Yoco checks a new key before it is saved. - **Webhook secret:** **Generate** registers this server's webhook URL (`BACKEND_URL/api/webhooks/yoco`, editable) with Yoco and saves the secret Yoco returns. **Enter manually** takes the secret of a webhook you registered yourself. - **Registered webhooks:** every webhook on the Yoco account, with its URL and mode. It shows which one is active and warns when a URL isn't this server. Each can be deleted; deleting the active one also removes its stored secret. - New admin endpoints under `/api/yoco` (config and webhooks). Changes are written to the admin audit log, without the secret values. ### Changed - The Yoco secret key and webhook secret are now stored in the database, AES-256-GCM encrypted, instead of only in `backend/.env`. `YOCO_SECRET_KEY` and `YOCO_WEBHOOK_SECRET` still work as fallbacks when the database has no value. `npm run migrate:env-to-db` moves them across. - Yoco secrets are never returned by `/api/settings/all` and can't be changed through `PUT /api/settings`. - Starting a checkout or sponsorship without a Yoco key now gives a clear "online payments are not configured" message instead of failing at Yoco. ## [1.24.0] - 2026-10-19 ### Changed - Ticket transfers now need the new holder to accept. - "Transfer" (in My Events, or At the door → Tickets) sends the person a link by email and/or WhatsApp, to the details typed. - Nothing changes on the ticket until they accept on the new `/transfer/` page. They can also decline. - On accepting, the transfer completes as before: new QR code, ticket delivery, account activation link, parental consent on youth events. - My Events shows "Waiting for … to accept" with a Cancel button. - Offers expire after 7 days or when the event starts, and a new offer replaces an open one. - Privacy for group tickets and transfers: there is no user search, and nothing reveals whether an email or phone number belongs to an account. - Registration responses no longer include named attendees' account links. - If an email and phone point at two different accounts, this is no longer reported to the person typing them. The email's account is used. - Terms of Use and Privacy Policy updated for everything added since 1.12: - booking for other people, ticket transfers, and youth-event consent with health information and how long it is kept; - who can see what (door staff, group leaders, supervisors), and read-only admin support access; - sponsorships, waitlists, discount codes and feedback; - two-factor authentication and offline scanning. - The Privacy Policy has a full **cookie policy**: every item the site stores in the browser (necessary, staff-only and optional), the optional visit statistics, and the third-party cookies from the Google Maps embed and Yoco checkout. - A new "Cookie settings" link in the footer (and a button in the policy) lets visitors change their choice. - The API docs page (`/docs`) now lists every mounted route. 45 were missing, including dashboard stats, backups, attachments, the audit log, ticket transfer links and WhatsApp admin. ### Fixed - After activating an account, the visitor is now really signed in. The token was saved under a key the app never read, so the "auto-login" didn't work. ### Notes - `npm install` succeeds in the root, `backend` and `frontend` with no missing packages. - The remaining `npm audit` findings are all in development/build tools (Jest, nodemon, ESLint, Tailwind's build), and none affect the running site. - `braces` and `sprintf-js` have no patched release. - `postcss-selector-parser` 7 would break Tailwind 3. - Requires the `add_transfer_requests` database migration. ## [1.23.0] - 2026-10-19 ### Added - Impersonate user (Admin → Manage users → Impersonate): an admin can see the site exactly as a user does, to help with problems such as "my ticket isn't showing". - A reason is required, and the session lasts at most 30 minutes. - A bright "Viewing as [name]" banner with a countdown and "End impersonation" shows on every page. - Impersonation is strictly read-only. - A server-side guard, mounted before every route, refuses any change (registrations, payments, refunds, cancellations, profile, consent, messages and everything else) made with an impersonation token. - Viewing pages doesn't trigger the price refresh it normally does. - Admins can't be impersonated, and the admin must have two-factor authentication on. - Impersonation is recorded in the audit log: start, end, reason, and every page and API call, including blocked attempts. - The audit log page lists recent sessions with their full trail. - New setting: email users when an admin views their account (Site Settings → Legal → Support access; off by default). - New `/api/admin/impersonate` endpoints. - Requires the `add_impersonation` database migration. ## [1.22.0] - 2026-10-19 ### Added - Registration funnel stats (first-party, no third-party analytics), showing where people drop off between seeing an event and paying. - A new cookie notice asks visitors once. Only those who choose "Allow" are counted, using a random anonymous visit id. - We record the event page view and the start of registration. The submit and paid stages come from the registration itself. - Only the stage, the traffic source and the device type are stored. No name, IP address or User-Agent is kept. - New report, **Registration funnel**: counts and conversion % per stage over a date range, a daily trend, and breakdowns by traffic source, device and ticket option. - Selecting several events compares them. - Sources come from `utm_source` links and from short links, which now add `?src=` when redirecting. - A "Conversion (past month)" tile on the supervisor and admin dashboards covers live events. - Raw visit records are rolled up into daily totals after 90 days by a daily job (`ANALYTICS_ROLLUP_ENABLED=false` to turn it off). - The privacy policy's cookies section now describes these statistics. - New `/api/analytics` endpoints. - Requires the `add_funnel_analytics` database migration. ## [1.21.0] - 2026-10-19 ### Added - Post-event feedback, set up in a new Feedback step in the event wizard. - Questions use the form builder. - You pick when it's sent (the default is the morning after the event) and who gets it: everyone who checked in, or everyone registered. - Each person gets a personal link by email (and WhatsApp where they use it). - Anyone who hasn't answered gets one reminder 3 days later. - Answers can be anonymous or named. - "Send now" is available, and the questions lock once people start answering. - New form field types: **Rating (1–5 stars)** and **Multiple choice**. They're used for feedback, and can also go on attendee forms (registration page, My Events, the kiosk, manual registration and Supervisor → Forms). - New report, **Feedback summary**: - response rate; - average rating per question, with star distribution; - multiple-choice and yes/no breakdowns as bar charts; - a list of text answers (with names unless the form is anonymous). - Select several events to compare their ratings (e.g. Camp 2025 vs Camp 2026). Exports to PDF and Excel like other reports. - New `/api/feedback` endpoints and a job every 15 minutes (`FEEDBACK_JOB_ENABLED=false` to turn it off). - Requires the `add_feedback_forms` database migration. ## [1.20.0] - 2026-10-19 ### Added - Sponsor a spot: a new event setting, "Allow sponsorships" (event wizard → Sponsor a spot). - It adds a "Sponsor a spot" button on the event page so people can fund a place for someone who can't afford it. - Sponsors choose one or more whole spots (at the main ticket price) or a custom amount, and pay through Yoco. Guests just give a name and email. - Sponsors can give anonymously, or add a name and a message for the organisers. - An optional goal ("12 of 20 spots sponsored") and public progress bar. - Each sponsorship is recorded as a donation tagged to the event, in that event's sponsorship pool. - Supervisors assign pool money to registrations with the existing donation assign/unassign flow, fully or partly. - Under Payments → Donations, sponsorships are labelled, there's an "Only the sponsorship pool" filter, and the sponsor's message is shown. - Who receives help is never shown to sponsors. - Sponsors get a "Thank you for sponsoring a spot" receipt. - Automations has a new "Thank Your Sponsors" email for events with sponsorships. - Email attendees can target an event's sponsors (`filter.audience: 'sponsors'`). - The Donations breakdown report has sponsorship pool columns per event: received, assigned and remaining. - New `/api/sponsorships` endpoints. - Requires the `add_sponsorships` database migration. ## [1.19.0] - 2026-10-19 ### Added - Rooms & groups (Supervisor → Rooms & groups), for camps and lockdowns: put attendees into rooms, cabins, small groups, teams or buses. - Each event can have several allocation sets (e.g. "Rooms" and "Buses"). Each set has groups with an optional capacity, an optional gender restriction and an optional leader (a staff member). - A drag-and-drop board puts people not yet placed on the left and groups, with capacity counters, on the right. Full groups and groups for the other gender won't accept a person. - Auto-allocate fills groups evenly with everyone not yet placed, respecting capacity and gender. It can keep people on the same booking together or spread them out. - Printable lists per group (with leader) and a master list. On youth events they can include medical and emergency details from consent forms; viewing those is recorded in the audit log. - "Show on tickets" prints the group on each person's ticket and shows it in My Events. - Email and WhatsApp attendees can be sent to one group ("Bus 2 leaves at 07:30"). Messages go to whoever booked for the people in it. - Group leaders see their people under Staff → My groups. Medical details are shown to supervisors only. - New event setting "Ask each person's gender" (under Named attendees). It adds a gender choice for each named person on the registration page, at the door, on the kiosk, in manual registration and in My Events, and is needed for gender-split rooms. - New `/api/allocations` endpoints. - Requires the `add_room_allocation` database migration. ## [1.18.0] - 2026-10-19 ### Added - Ticket transfer. On My Events, "Transfer" hands a ticket to someone else before the event: enter their name and email or phone. - The new holder gets the ticket by email/WhatsApp with a new QR code. If they're new, an inactive account is created and they get an activation link. - The old QR code stops working, so screenshots of it won't scan. Scanning it says who the ticket was transferred to, and offline-mode sync flags it. - For a ticket covering several people, one place is split off to the new holder. - The payer stays responsible for the registration. - Transfer rules: - Only before the event starts, and only for tickets that haven't been scanned. - It can be turned off per event (new "Ticket transfer" setting in the event wizard, on by default). Supervisors can always transfer, from At the door → Tickets. - On youth events, the new holder's date of birth, and a parent's details for a minor, are needed, and a new consent request is sent. - The previous holder's attendee form answers and consent medical details are removed. - Every transfer is recorded in the audit log. - New endpoints `POST /api/tickets/:id/transfer` and `GET /api/tickets/:id/transfers`. - Requires the `add_ticket_transfer` database migration. ## [1.17.0] - 2026-10-19 ### Added - Offline ticket scanning. While online, staff pick an event and section on the scanner and tap "Enable offline mode". The section (or the whole event) is locked to their device and its tickets are downloaded to the device. - With no connection, scans are checked against that list and queued on the device. - The panel shows when the list was downloaded and how many scans are waiting. - Queued scans sync automatically when the device is back online (or with "Sync now"), and check-in messages go out then. - "Release section" ends offline mode and deletes the list from the device. - Only one device can hold a section at a time (a whole-event lock clashes with every section). While a section is locked, other devices see who holds it and can't scan it, online or offline, so a ticket can never be redeemed twice by two offline devices. - Syncing is idempotent and never redeems more than is left on a ticket. Anything that needs a person to look goes into a sync report: tickets not found, cancelled registrations, used-up tickets, scans outside the locked section, and check-ins without consent. - Supervisor → Offline scanning page: active locks with force release (for a lost or flat phone; its scans still sync if it reconnects, and are flagged), and sync reports to review. Locks, releases, force-releases and syncs are recorded in the audit log. - The scanner is installable as an app (web app manifest), and a service worker caches the scanner page and its scripts so it opens with no connection. - The app now stays signed in with the last confirmed profile when it's reloaded without a connection, instead of sending the user to the login page. - New `/api/scan-locks` endpoints. - Requires the `add_offline_scanning` database migration. ### Changed - `POST /api/tickets/scan/:qrCode` now accepts `sectionId` and checks it on the server; this was previously only checked in the browser. - It now refuses (423) scans in a section that another device has locked for offline scanning. ## [1.16.0] - 2026-10-19 ### Added - Waitlist for sold-out tickets. A new event setting (event wizard → Visibility) turns it on, with how long offered places are held (24 hours by default) and whether someone can be offered fewer places than they asked for. - Sold-out tickets show "Join waitlist" on the event page, the register page and the events list. Guests can join on events that allow guest registration. - When places free up, the next person is emailed/WhatsApped a claim link, and the places are held for them so nobody else can buy them. Places free up through a cancellation (by the person or staff), a smaller booking, or a raised stock limit. - The claim link opens the register page with the places pre-selected, and works without logging in. - Unclaimed offers expire (checked every 10 minutes) and move on to the next person. - People can leave a waitlist from My Events, which now lists their waitlists and any places held for them. - Supervisor → Waitlist page: the queue per event, with offer now (even over the stock limit), move up/down and remove. - The daily summary email shows each event's waitlist count. - New `/api/waitlist` endpoints. `POST /api/registrations` accepts `waitlistToken`. - Requires the `add_waitlist` database migration. ### Fixed - Manual registrations (Manual registration, At the door, the kiosk) and adding places to an existing booking never checked stock, so either could take an option over its stock limit. Both are now checked like a normal registration. - Stock is now counted in one place (`utils/stock.js`) for registration checks, `availableCount` and `isSoldOut`, including places held for waitlist offers. ## [1.15.0] - 2026-10-19 ### Added - Parental consent for youth events. A new "Requires parental consent" event setting (event wizard → Visibility) has its own consent text and optional medical info, emergency contact and photo consent questions. It turns on named attendees automatically. - Registering then needs a name and date of birth for every main-ticket place. Anyone under 18 on the event's start date needs a parent or guardian's name, email and phone. - This applies on the registration page, manual registration, at the door, the kiosk, and when editing names in My Events. - The parent gets an email and a WhatsApp (always both) with a link to a new consent page (`/consent/`). There they read the text, answer the optional questions, type their full name and confirm they're the parent or guardian, then give or decline. - The system records the time, IP, device, signed name, and the exact consent text and version shown. - Medical and emergency details are stored encrypted. - The registrant and the event's notification recipients are told the outcome. - Tickets are still issued, but the scanner blocks check-in until consent is given, showing why. Supervisors can override, and the override is recorded in the audit log. On a youth event, a ticket with no named attendee counts as missing consent. - A daily 09:00 job reminds unanswered requests after 2 days, then every 3 days until the event. It also deletes medical and emergency details a set number of days after the event (Site Settings → Legal, default 30). `CONSENT_JOBS_ENABLED=false` turns it off. - Supervisor → Parental consent page: consent status per attendee, resend one or all pending requests, re-request consent after the consent text changes, and a printable, confidential medical & emergency list. Every view of the list is recorded in the audit log. - New reports: "Parental consent status" and "Medical & emergency list". - My Events shows each attendee's consent status, with a "Resend consent" button. - Anonymising or closing an account also clears that person's attendees' parent, date-of-birth, medical and emergency details. - New endpoints under `/api/consent`. `GET /api/tickets/scan-preview/:qrCode` now returns `consentStatus`, and `POST /api/tickets/scan/:qrCode` accepts `overrideConsent`. - Requires the `add_parental_consent` database migration. ## [1.14.0] - 2026-10-19 ### Added - Group tickets (named attendees). A new "Named attendees" event setting (event wizard → Visibility) lets someone registering several people give each main-ticket place a name, with an optional email and phone. It's offered on the registration page, Manual registration, At the door and the self-service kiosk. - Each named person gets their own single-person ticket, with their name on the ticket PDF, the scanner's confirm screen and the staff ticket list. Places left unnamed share one quantity ticket as before. - The payer chooses whether every ticket comes to them or each person gets their own by email/WhatsApp; anyone without contact details falls back to the payer. - The payer stays the account owner for billing, invoices and payments. - An attendee whose email or phone matches an existing account is linked to it (never when the email and phone belong to two different accounts). Their ticket then appears in their own My Events, marked "Booked by …", and they can open and submit their own attendee form. - My Events → registration popup has a new "People" section for adding or changing names and contact details, switching ticket delivery, and sending an attendee a link to fill in their own form (`/forms?registrationId=…&attendeeId=…`). An attendee whose ticket has been scanned can't be removed. - Attendee forms now show one block per named person, labelled with their name, and each response is saved against that attendee. - New endpoints `PUT /api/registrations/:id/attendees` and `POST /api/registrations/:id/attendees/:attendeeId/send-form-link`. `POST /api/registrations` and `/manual` accept `attendees` and `ticketDelivery`. - Requires the `add_named_attendees` database migration. ### Changed - Reducing the quantity of a main ticket removes the newest names beyond the new quantity. - Check-in confirmations for a named ticket go to that person when the registration sends each person their own tickets. - Unauthenticated guest registration now matches an existing account by phone as well as email, and is refused (409) when the email and phone belong to two different accounts, instead of silently reusing whichever account the email matched. - Free registrations now issue tickets through the same generator as paid ones, instead of a separate copy of the logic. ### Security - Registration details (`GET /api/registrations/:id`) hide attendees' email addresses and phone numbers from anyone other than the payer and staff, such as an attendee opening their form link. ## [1.13.0] - 2026-10-19 ### Added - Coupon codes. Supervisors create percentage, fixed-amount or free ("comp") codes under Supervisor → Coupon codes. - Codes can be limited to particular events, ticket options or variants, a date window, total and per-person uses (one per person by default), a minimum number of tickets, and specific people, roles (e.g. Staff and above) or an email domain. Restricted codes need a logged-in account, so they can't be shared around. - By default the better of the code and the early-bird price wins; a code can instead stack on top of early-bird pricing. - People enter codes under "Have a code?" on the registration page and in My Events (for registrations not yet paid in full). Staff can apply them in Manual registration, At the door and the self-service kiosk. - The discount is locked in when it's applied, the same way early-bird prices are. It appears as its own line on invoices, receipts, registration and payment emails, WhatsApp messages and the Yoco checkout. - Editing a registration's items recalculates percentage and free codes; fixed-amount codes keep their amount. Cancelling a registration frees the use. A free code that covers everything marks the registration paid and sends the tickets. - Use limits are enforced under a database lock, so the last available use can't be claimed twice. - Staff price: a ticket option or variant can carry a staff price (event wizard → Items & pricing) that Staff and above pay automatically when it's lower than the normal price. - New "Discounts (coupon codes)" report (Reports → Financial), showing uses and value given away per code and event. The Finance report's "What was sold" is now shown after discounts. - Coupon activity in the admin audit log: codes created, edited and turned off, and codes applied or removed by staff. - New endpoints: `POST /api/coupons/validate`, `GET|POST /api/coupons`, `GET|PUT /api/coupons/:id`, `GET /api/coupons/redemptions`, `POST|DELETE /api/registrations/:id/coupon`. `POST /api/registrations` and `/manual` accept `couponCode`. - Registration responses now include `discountTotal` and `subtotalComputed`. - Requires the `add_coupon_codes` database migration (`npm run prisma:deploy` in `backend`). ### Fixed - Yoco checkout line items priced each item at its most recent price times the whole quantity. When a line spanned several price tranches (some tickets at early-bird, some at full price), the item lines didn't match the amount charged. They now list each price actually charged. - The free-registration check on `POST /api/registrations` and `/manual` had the same fault: it used the latest price for the whole quantity instead of the real total. ## [1.12.0] - 2026-10-19 ### Added - Two-factor authentication is now required for Admin and Supervisor accounts. An admin or supervisor without it is sent a code at their next login (by email, or WhatsApp when SMTP isn't set up), and entering it turns two-factor on — the same code step as before, with a note explaining why. Trusted devices don't skip this first code. They can change whether codes come by email or WhatsApp from Profile & Security, but can no longer turn two-factor off (`POST /api/users/2fa/disable` returns 403 for them). - Existing admin and supervisor sessions without two-factor are ended on their next request (`401` with `code: "TWO_FACTOR_REQUIRED"`), and the login page explains why. Promoting a user to supervisor or admin also ends their sessions if they don't have two-factor yet, so they enrol at their next login. An admin "Reset 2FA" for a supervisor/admin now means they set it up again at their next login. - The requirement is skipped when no channel can deliver a code — no SMTP configured and no WhatsApp — so a fresh install (or the setup wizard, which also gets a short grace period) never locks the first admin out. `TWO_FACTOR_REQUIRED_ROLES=false` turns the requirement off as an emergency switch. - `FEATURES.md`, a repo-root overview of everything the platform does — roles, public site, events, registration, payments, tickets, messaging, dashboards, cashup, reports, settings, security, background jobs, and a page map. ### Changed - `info.md` (the overview for prospective churches) brought up to date with features added since it was written — donations, invoices and receipts, cashup and costs, profit reporting, audit trail, scheduled messaging, self-service kiosk, scan points, backups, branding, and privacy controls. ## [1.11.0] - 2026-10-08 ### Added - Optional two-factor authentication. Any user can turn it on from Profile & Security and choose to receive a 6-digit code by email or WhatsApp; the chosen channel is confirmed with a code before it takes effect. At login the code is asked for after the password, expires after 10 minutes and allows 5 attempts, with a "Resend code" option. If a WhatsApp code can't be sent, it falls back to the account's email address. - "Trust this device for 30 days" on the code step, so a remembered device skips the code. Trusted devices are forgotten when the password is changed or reset, when sessions are signed out everywhere, and when two-factor is turned off. - Admins can reset two-factor authentication for a user who can no longer receive codes ("Reset 2FA" on the Users page). Turning two-factor on or off shows in Account activity. - The self-service kiosk asks supervisors with two-factor on for their code at setup. Changing the event now re-confirms the password against the existing kiosk session (`POST /api/users/verify-password`) instead of logging in again. ### Changed - `POST /api/users/login` returns `{ twoFactorRequired, challengeId, method, destination }` instead of a token for accounts with two-factor on; the token is issued by the new `POST /api/users/login/2fa`. Accounts without two-factor are unaffected. Requires the `add_two_factor` database migration (`npm run prisma:deploy` in `backend`). ## [1.10.6] - 2026-10-08 ### Fixed - The frontend production build (`next build`) no longer hangs or fails when the backend isn't reachable. With no `NEXT_PUBLIC_API_URL`/`API_URL` set, the root layout fetched a relative `/api/settings` URL that never settled during prerender, so every page timed out after 60 seconds; server-side fetches now fail fast when no API base is configured. The home page and the Events page also no longer fail the build when `/api/events` can't be reached — they build with an empty list and fill in on the first revalidation. At runtime a failed fetch still errors, so the last good page keeps being served. ### Security - Updated dependencies to clear `npm audit` advisories: `express`, `multer`, `proxy-addr`, `qs` and others in the backend, `next` (15.5.27) and `sharp` (0.35.5) in the frontend, and `nodemailer` from 9 to 10 (requires Node.js 20 or newer). The root package now overrides `shell-quote` to a patched release, since every `concurrently` version pins a vulnerable one. Backend production dependencies now report no known vulnerabilities; the remaining advisories are in development tooling (`nodemon`, `jest`, `tailwindcss` 3) and have no non-breaking fix. - Dependency install scripts are now explicitly allow-listed via `allowScripts` in the backend and frontend `package.json` (Prisma, `@sentry/cli`, `unrs-resolver`), so npm no longer blocks them. ## [1.10.5] - 2026-10-01 ### Fixed - Events that have already started but not yet finished now show on the home page and the Events page. Both pages were hiding an event as soon as its start time passed; they now keep it listed until its end time, which matches what `GET /api/events` already returns. ## [1.10.4] - 2026-09-01 ### Fixed - "Add to calendar" (`GET /api/events/:id/ics`) always failed with a 400 in production: the `ics` library's `url` field requires a scheme (`https://...`), but `FRONTEND_URL`/`APP_BASE_URL` was configured without one, so `createEvent()` rejected it before generating any output. A missing scheme is now assumed to be `https://` instead of failing. ## [1.10.3] - 2026-08-28 ### Fixed - Creating an event was never recorded in the admin audit log — 1.10.0 added `event_created` as a logged action on the frontend's filter list, but the backend's `createEvent` never actually called `logAdminAction`, only `updateEvent`/`deleteEvent` did. Event creation is now logged the same way. - Staff cancelling a registration via `PUT /api/registrations/:id` (the staff status-change endpoint, separate from the owner-facing `DELETE /:id` cancel route) wasn't logged at all — only the `DELETE` path logged `registration_cancelled`. Both paths now log it, verified against all six audit categories promised in 1.10.0 (refunds, donation assign/unassign, manual registrations, staff-initiated cancellations, event create/update/delete, settings changes) with no other gaps found. - Added a "Back to dashboard" link to Admin → Audit log, matching the back-link pattern already used on the Cashup page. ## [1.10.2] - 2026-08-28 ### Fixed - Sentry wasn't instrumenting Express (`[Sentry] express is not instrumented` at startup): `express`, `cors`, and `@prisma/client` were required at the top of `backend/src/index.js` before `Sentry.init()` ran, but Sentry's auto-instrumentation patches those modules via a require hook that only works if `Sentry.init()` runs first. `Sentry.init()` now runs immediately after `dotenv.config()`, before any of the libraries it instruments are required. ## [1.10.1] - 2026-08-28 ### Security - Fixed a path-traversal vulnerability in event-image, branding (logo/favicon), and event-attachment uploads: the stored filename embedded the client-supplied `originalname` unsanitized, so a crafted filename (e.g. containing `../`) could write the uploaded file outside the intended `public/uploads` subfolder anywhere the server process could write. Uploaded files are now always saved under a server-generated random name; the original filename is preserved only as display metadata. - `express-rate-limit` was declared as a root-only dependency despite being required directly by the backend (`backend/src/index.js`) — a plain `cd backend && npm install`, as documented in the deployment guide, would not have installed it. It's now a proper `backend/package.json` dependency. - Bumped `next` (frontend) off a version affected by a critical unauthenticated RCE in the React Flight protocol (GHSA-9qr9-h5gf-34mp) and several other CVEs, and switched it from an exact pin to `^15.5.24` so future patch releases install automatically. - Bumped `multer`, `nodemailer`, `jsonwebtoken`, and `uuid` (backend) to versions fixing DoS, SMTP/CRLF-injection, HMAC-verification, and buffer-bounds advisories; added an `overrides` entry so the vulnerable `uuid` nested under `exceljs` is also patched. Ran `npm audit fix` across all three workspaces (root/backend/frontend) — 0 known vulnerabilities remain. - `jwt.verify()` now pins `algorithms: ['HS256']` explicitly rather than trusting the algorithm from the token header. - Uploaded assets served from `/uploads` now get `Content-Security-Policy: default-src 'none'; sandbox` and `X-Content-Type-Options: nosniff`, so an uploaded SVG containing a `