website 1.8.0: demo scenarios (the scenario's people lead, Events' events through the feed)

- `npm run demo -- --profile <p> --scenario <p>`: each profile's `scenarioTeam` names four
  parts, roles and portraits; the names are the scenario's people from @crosscode/demo, the
  pastor first (home page and messages' speaker).
- With a linked Cross Events, a scenario load makes no events of its own, turns on Show events
  from and fetches Events' whole feed at once; an unreachable Events doesn't fail the load.
- A scenario on a site with no church profile saves the scenario's church, not Acacia Hill.
- crosscode script: `crosscode demo <church> website --scenario` passes it on and refuses a
  Website before 1.8.0; the Website installs and builds packages/demo.
- Docs: HANDOVER, APP-1.0-PLAN, VERSIONS, CHANGELOGs, What's New.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 15:23:12 +02:00
co-authored by Claude Opus 5.5
parent b2a163bb39
commit c8e270dbf1
17 changed files with 315 additions and 76 deletions
+14 -5
View File
@@ -11,12 +11,14 @@ crosscode demo <church> --profile <profile> [--admin-email <email>]
(small, events, ministry, multicampus, or from
3.8.0 a demo scenario's church); a backup
is taken first, one admin account is kept
crosscode demo <church> website --profile <profile>
crosscode demo <church> website --profile <profile> [--scenario <profile>]
replace the Website's content with a demo church
(heritage-parish, heritage-city, bold-youth,
bold-plant, community-family, community-town,
clean-modern, clean-campus); a backup is taken
first; the church's profile, settings and admins stay
first; the church's profile, settings and admins stay;
from 1.8.0, --scenario: the scenario's people lead,
and a linked Cross Events' events show instead
crosscode demo <church> accounts --profile <scenario> [--scenario <scenario>]
a demo scenario's church (profile, logo, icon) and
people in Accounts (the eight scenarios, as the
@@ -136,7 +138,7 @@ cmd_demo() {
if [ "$product" = website ]; then
[[ " $WEBSITE_DEMO_PROFILES " == *" $profile "* ]] || die "--profile: one of $WEBSITE_DEMO_PROFILES."
[ -z "$email" ] || die "--admin-email: the Website's demo keeps every admin."
cmd_demo_website "$church" "$profile"
cmd_demo_website "$church" "$profile" "$scenario"
return
fi
[[ " $DEMO_PROFILES " == *" $profile "* ]] || die "--profile: one of $DEMO_PROFILES."
@@ -201,7 +203,8 @@ cmd_demo_accounts() {
# the eight demo churches, keeping the church's profile, the site settings and the admins. Backup
# first; then reloaded, so nothing cached from before is shown.
cmd_demo_website() {
local church="$1" profile="$2" dir user app
local church="$1" profile="$2" scenario="${3:-}" dir user app
local -a scenario_args=()
require_root
load_church "$church"
church_has_product website || die "$church has no Church Website."
@@ -211,12 +214,18 @@ cmd_demo_website() {
user="$(pvar website USER)"
app="$(website_app "$dir")"
[ -f "$app/backend/src/demo/seeds.ts" ] || die "This release of the Website ($(checkout_ref "$dir" website)) has no demo profiles (1.3.0 or later has)."
if [ -n "$scenario" ]; then
# 1.8.0: the scenario's people lead, and Cross Events' events show through the feed.
grep -q scenarioTeam "$app/backend/src/demo/seeds.ts" ||
die "This release of the Website ($(checkout_ref "$dir" website)) has no demo scenarios (1.8.0 or later has)."
scenario_args=(--scenario "$scenario")
fi
step "Website: backup first"
website_backup "$dir" "$user" || die "The backup failed, so the demo wasn't loaded."
step "Website: demo ($profile)"
run_as "$user" "$app/backend" npm run --silent demo -- --profile "$profile" --force ||
run_as "$user" "$app/backend" npm run --silent demo -- --profile "$profile" "${scenario_args[@]+"${scenario_args[@]}"}" --force ||
die "The demo wasn't loaded (see above). If it got as far as changing anything, the backup from just now has the content from before."
step "Website: reloading PM2"