# Changelog — Church Website ## [Unreleased] ### Added - The app's skeleton (WEBSITE-1.0-PLAN §1): an Express + Prisma backend with `/api/health` and `/api/v1/site/status` (Coming soon until the first publish), the content model and its first migration, the section variants per template (§3, decision 16) with the template switch rules, and a Next.js frontend with the Coming soon page, an admin placeholder and `robots.txt`. - **Signing in to the admin through the church's Accounts** (§10), as Cross Events 3.x: the Hub client (protocol v2, product `website`, registers from `HUB_LICENCE_KEY`, heartbeats with aggregate counts), links (`crosscode.link/1`; the Website connects itself to the church's Accounts once the Hub lists it), `/api/auth/signin`, `/callback`, `/me`, `/signout` (then Accounts' sign-out), back-channel logout and Accounts' calls (`user.updated`, `user.export`, `user.deleted`). The Website keeps its own session (`ccw_session`, only a hash stored) and its own roles; the **first Owner** is whoever signs in with the Hub's admin email (`HUB_ADMIN_EMAIL`, verified in Accounts) while the site has none. Owners and Admins sign in with a second step (`two_factor_required_for_admins`, on by default); asked of Accounts once, then explained. - **The four templates and the public site** (§3, §5, §6): Heritage, Bold, Community and Clean, each drawing all 26 section variants its own way, with its headers, homepage order and style settings (section colour, spacing, buttons, image treatment). The church's colours are made safe by the backend (`site/palette.ts`: tints, shades and text colours checked against WCAG AA, with a note for the admin when one is changed); fonts and corners come from its shared brand style, else the template's suggestion. Pages: home, every page kind (visit, about, ministries, leadership, events, messages, give, contact, custom) with its blocks, simple event pages, a real 404, Coming soon from the church profile, `sitemap.xml` and `robots.txt`. Every page has a title, description, canonical, Open Graph and one `

`; home and contact have the church's JSON-LD. Messages load YouTube (youtube-nocookie) or Spotify only when clicked; maps are OpenStreetMap. - **Publishing** (`site/snapshot.ts`): Publish copies the working copy into a numbered version; visitors see the latest (`GET /api/v1/site/content`, with live messages and events and the church profile from Accounts, kept 10 minutes). Section data is checked per type (`site/sections.ts`); a section that doesn't fit is left out, never shown broken. Uploads are served from `/api/uploads/` (SVGs sandboxed). - **The demo church** (`npm run demo -- --template `): Acacia Hill Church, fictional, with illustrated images; refuses to replace a site its admins published unless `--force`. - **End to end** (`npx playwright test` in apps/website, no database, a production build): every template's pages pass axe (WCAG 2.2 AA) and the SEO basics, with screenshots at phone and desktop in `e2e/screens/`; the admin's flows (edit, preview, publish; discard; a shared link, revoked; restore; a template switch; a Viewer; signing in from a deep admin page) and axe on every admin screen. - **The admin** (§4, §10): a dashboard with the setup checklist, pending changes, storage and notes about the church's colours; Template and style (the template, each homepage section's layout with the recommended ones first, the homepage order, the style settings); Pages (details, search engine title and description with a search result preview, the home page's sections, other pages' blocks: add, move, hide, remove; custom pages); Ministries and Leadership; the media library (uploads checked by their bytes, alt text, storage; **uploads stop when storage is full**); and Publish and history. Roles: a Viewer reads, an Editor and above changes and publishes, a Ministry leader edits only their own ministry. Every change comes from the site itself (same origin). - **Drafts, preview and publish** (§4): every change is a draft; the pending list says what changed, who and when, and any one can be **discarded**; one **Publish** for the whole site, with a note; every version is kept and any can be **restored** into the working copy (each version keeps the working copy's rows, never sent to visitors). The **preview** shows the working copy on the site's own addresses, fully clickable, with a bar above the page (phone / tablet / desktop width, Back to editing, Publish); a **shared preview link** works signed out for 7 days or until revoked, and can't change anything. Publish refreshes the public pages at once (`WEBSITE_CONTENT_CACHE_SECONDS`, 30 by default, is how long they're kept otherwise). - The admin page signs people in and out; `/auth/problem` explains a refused sign-in. - **The church's export** (`scripts/export-church.ts`): `export.json` in `crosscode.church-export/1` with its `website` part, for `crosscode export` and uninstall. - **`crosscode`:** `scripts/products/website.sh` (the same hooks as Accounts, ports 5300 / 3300, uploads in the export), `crosscode add website` (needs the church's Accounts; served on `www.
`, or the Cross Code address itself), and the installer shared by Accounts and the Website (`install_app`).