feat(website): the admin, with drafts, preview, publish and restore

Admin API and screens: dashboard and setup checklist, template and
style, pages and blocks, ministries, leadership, media library with
the storage limit, publish and history. Pending changes with who and
when, discard one, one Publish, restore any version (each version
keeps the working copy's rows, never sent to visitors). Preview on
the site's own addresses with a bar (widths, back, publish); shared
preview links for 7 days or until revoked. Roles checked, same-origin
changes only. Publish refreshes the public pages at once
(WEBSITE_CONTENT_CACHE_SECONDS). E2E on a production build: the
admin's flows and axe on every screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:30:29 +02:00
co-authored by Claude Opus 5.5
parent 3caa1d1e1a
commit 84c5b0c08e
44 changed files with 2404 additions and 65 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
import { defineConfig, devices } from "@playwright/test";
// The Website end to end (docs/WEBSITE-1.0-PLAN.md §13): the real backend on an in-memory database
// with the demo church (e2e/server.ts), and the Next.js pages. Run with `npx playwright test` in
// with the demo church (e2e/server.ts), and the Next.js pages (a production build). Run with `npx playwright test` in
// apps/website. Nothing needs a database.
export default defineConfig({
testDir: "./e2e",
@@ -23,12 +23,13 @@ export default defineConfig({
stdout: "pipe",
},
{
command: "npx next dev -p 3310",
// A production build, as churches run it (next dev's Fast Refresh remounts pages mid-test).
command: "npx next build && npx next start -p 3310",
cwd: "frontend",
url: "http://localhost:3310/robots.txt",
timeout: 180_000,
timeout: 300_000,
reuseExistingServer: false,
env: { WEBSITE_API_URL: "http://127.0.0.1:5310" },
env: { WEBSITE_API_URL: "http://127.0.0.1:5310", WEBSITE_CONTENT_CACHE_SECONDS: "0" },
},
],
});