contracts: hub.storageRequestSchema and its reply, a sample and JSON Schemas. Website: an Owner or Admin asks for more 5 GB steps under Media library (signed to the Hub); the heartbeat reports the licence's storage limit, so the Hub emails the church at 80% and when full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
110 lines
9.1 KiB
Markdown
110 lines
9.1 KiB
Markdown
# 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 `<h1>`; 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 <id>`): 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).
|
|
- **People** (§10): Owners and Admins add someone by email (their account comes from the church's
|
|
Accounts through `people.ensure`, with a "choose your password" email when it's new), change
|
|
roles and remove access. Only an Owner touches Owners; nobody changes themselves; a lower role or
|
|
removal ends that person's sessions at once. A Ministry leader is tied to their ministry.
|
|
- **Messages** (§7): from the church's YouTube channel or playlist automatically (YouTube's public
|
|
feed, every hour, no API key; each new video goes live by itself), or by hand with a YouTube or
|
|
Spotify link; speaker, series, passage and notes; publish, unpublish, hide. A video is never
|
|
added twice; one from the feed can only be hidden (deleting it would bring it back).
|
|
- **Simple events** (§8): date and time or all day, place, description, photo and an optional
|
|
link; publish, cancel, remove. Both publish on their own, not with the site (decision 9).
|
|
- **Photos made safe and fast** (§3): every upload is turned upright, **stripped of its metadata**
|
|
(a phone photo can carry where it was taken), kept at most 2400 px wide, and saved at 480, 960
|
|
and 1600 px in WebP and JPEG; the pages pick the size the screen needs (`<picture>`, `srcset`).
|
|
Every file counts towards storage; a photo the library can't read is refused. (sharp 0.35:
|
|
prebuilt binaries, no build step on the servers.)
|
|
- **The event feed** (§8, roadmap §4), both ways, as Cross Events 2.4: **Publish my events** serves
|
|
the Website's published simple events as `crosscode.event/1` (`GET /api/feed/v1/events`,
|
|
`?updatedSince=`; unpublished and removed ones in `deleted` for 90 days) and tells linked siblings
|
|
with a signed `event.changed`; **Show events from** fetches each linked sibling's feed every 15
|
|
minutes and at once on its signed `event.changed`, keeping read-only copies that link back to the
|
|
origin (for registering), only of events that really come from that sibling, one bad event
|
|
skipped, and the last good copy kept when a fetch fails. Admin → **Linked products**: Connect,
|
|
Disconnect, Show events from, Publish my events, Check now. Accounts' signed `church.changed` now
|
|
fetches the church profile again at once.
|
|
- **Church details** (§2, decision 10): the church's name, colours, fonts and corners, logo,
|
|
service times, contact and social links, saved through Accounts' `church.update` as the signed-in
|
|
admin; live at once on all the church's sites (not drafts), refused when someone changed them in
|
|
between.
|
|
- **Settings** (§10): Google Search Console and Bing verification codes (shown on the home page),
|
|
the Coming soon line, and the menu's order. **Audit log** for Owners and Admins; **recent edits**
|
|
on the dashboard.
|
|
- **Search engines** (§11): a share image made from the church's colours and name for pages without
|
|
their own; `Event` structured data on the Website's own event pages, `VideoObject` /
|
|
`PodcastEpisode` for messages, `BreadcrumbList` on every page but home; a page's old address
|
|
sends people on to the new one (permanent redirect) once published.
|
|
- **Two editors at once** (§4): a save that someone else's save overtook is refused, saying who, and
|
|
nothing is overwritten. **A Ministry leader's events**: an event can belong to a ministry; its
|
|
Ministry leader adds and changes it, an Editor publishes it. **Choose your template** with the
|
|
church's own content: each template can be previewed on the real site before it's chosen.
|
|
- A simple event with an outside link still has its own page here, with a "More information"
|
|
button (its address in the event feed).
|
|
- **Get more storage** (§10, decision 12; contracts 1.18.0, Hub 2.22.0): an Owner or Admin asks
|
|
under Media library (5 GB steps); the request goes to the Hub, which emails Cross Code, and the
|
|
new limit arrives with a heartbeat. The heartbeat now reports the licence's storage limit, so the
|
|
Hub emails the church at 80% and when it's full.
|
|
- 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 <church> website` (needs the church's Accounts; served on
|
|
`www.<address>`, or the Cross Code address itself), and the installer shared by Accounts and the
|
|
Website (`install_app`).
|