Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edac4ee767 | ||
|
|
090453e14a | ||
|
|
9c87208428 | ||
|
|
f931226e74 |
@@ -4,7 +4,8 @@
|
||||
* (freshPostgres, below), and the demo church published. The pages run as a production build on
|
||||
* 3310 and send /api here.
|
||||
*
|
||||
* Test helpers: POST /test/demo?template=<id> loads the demo church on that template;
|
||||
* Test helpers: POST /test/demo?template=<id> loads the demo church on that template (or
|
||||
* ?profile=<id>, a demo profile);
|
||||
* POST /test/design { variants?, style?, home? } changes the design and publishes again.
|
||||
*/
|
||||
import { execSync } from 'node:child_process';
|
||||
@@ -15,7 +16,7 @@ import express from 'express';
|
||||
import pg from 'pg';
|
||||
import sharp from 'sharp';
|
||||
import { PrismaPg } from '@prisma/adapter-pg';
|
||||
import { websiteTemplateSchema } from '@crosscode/contracts';
|
||||
import { agent, websiteTemplateSchema } from '@crosscode/contracts';
|
||||
import { PrismaClient } from '../backend/src/generated/prisma/client.js';
|
||||
import { createApp } from '../backend/src/app.js';
|
||||
import { createCtx } from '../backend/src/context.js';
|
||||
@@ -67,6 +68,14 @@ await loadDemo(ctx, websiteTemplateSchema.parse(process.env.DEMO_TEMPLATE ?? 'he
|
||||
|
||||
const app = express();
|
||||
app.post('/test/demo', async (req, res) => {
|
||||
// ?profile=<id>: one of the demo profiles (the crosscode-site screenshots of another church on
|
||||
// a template); it keeps the church profile the template demo saved (Acacia Hill).
|
||||
const profile = String(req.query.profile ?? '');
|
||||
if (profile) {
|
||||
if (!(agent.WEBSITE_DEMO_PROFILES as readonly string[]).includes(profile)) return res.status(400).json({ error: 'profile' });
|
||||
await loadDemo(ctx, profile as agent.WebsiteDemoProfile, { uploadDir: uploads });
|
||||
return res.json({ ok: true, profile });
|
||||
}
|
||||
const t = websiteTemplateSchema.safeParse(req.query.template);
|
||||
if (!t.success) return res.status(400).json({ error: 'template' });
|
||||
await loadDemo(ctx, t.data, { uploadDir: uploads });
|
||||
|
||||
+20
-3
@@ -11,12 +11,12 @@ separately below; the two often differ.
|
||||
| What | Repo | Latest | Tag | Released |
|
||||
|------|------|--------|-----|----------|
|
||||
| Cross Events | `crosscode-platform` (`apps/events`) | **3.7.1** | `events@3.7.1` | 2026-11-26 |
|
||||
| Church Website | `crosscode-platform` (`apps/website`) | **1.5.0** | `website@1.5.0` | 2026-11-27 |
|
||||
| Church Website | `crosscode-platform` (`apps/website`) | **1.6.0** | `website@1.6.0` | 2026-11-27 |
|
||||
| Accounts | `crosscode-platform` (`apps/accounts`) | **1.8.0** | `accounts@1.8.0` | 2026-11-26 |
|
||||
| Server agent | `crosscode-platform` (`apps/agent`) | **1.6.0** | `agent@1.6.0` | 2026-11-27 |
|
||||
| Contracts | `crosscode-platform` (`packages/contracts`) | **1.19.0** | `contracts@1.19.0` | 2026-11-27 |
|
||||
| Cross Code Hub | `events-hub` | **2.25.0** | `v2.25.0` | 2026-11-27 |
|
||||
| crosscode.co.za | `crosscode-site` | **1.7.0** | `v1.7.0` | 2026-11-26 |
|
||||
| crosscode.co.za | `crosscode-site` | **1.8.0** | `v1.8.0` | 2026-11-27 |
|
||||
| `crosscode` script | `crosscode-platform` (`scripts/`) | `main` | none | 2026-11-27 (last change: an uninstall keeps the Website's backup snapshots shared, `rsync -aH`) |
|
||||
|
||||
The `crosscode` script has no version: every server's copy (`/opt/crosscode/tools`) pulls `main`
|
||||
@@ -30,7 +30,7 @@ on each run, so merging to `main` and pushing releases it. Its changes are liste
|
||||
| `@crosscode/auth-client` | `packages/auth-client` | 1.1.0 (released with Events 3.0.0 and Accounts 1.1.0) |
|
||||
| `@crosscode/seo` | `packages/seo` | 1.0.0 (released with Events 2.4.0) |
|
||||
| `@crosscode/ui` | `packages/ui` | 0.3.0 (fonts, `ChurchFooter`; 0.2.0 with Accounts 1.7.0, 0.3.0 with Events 3.7.0) |
|
||||
| Website | `apps/website` | 1.5.0 (1.0.0–1.1.0 released 2026-11-26, 1.2.0–1.5.0 on 2026-11-27; installed for the demo church cross-demo2 (1.2.0) only, Hope Family Church next) |
|
||||
| Website | `apps/website` | 1.6.0 (1.0.0–1.1.0 released 2026-11-26, 1.2.0–1.6.0 on 2026-11-27; installed for the demo church cross-demo2 (1.2.0) only, Hope Family Church next) |
|
||||
| App | `apps/app` | 0.0.0 (not started, phase 6) |
|
||||
|
||||
These shared packages ship inside the apps that use them, from the same checkout, so they don't
|
||||
@@ -38,6 +38,23 @@ need their own tags until something outside this repo depends on them.
|
||||
|
||||
## What each latest release was for
|
||||
|
||||
- **crosscode.co.za 1.8.0 (2026-11-27):** each Church Website template's page shows the whole
|
||||
demo website (a gallery of Plan your visit, About us, Ministries, Leadership, Events, an event,
|
||||
Messages and Contact) and "the same template, a different church" (the template's second demo
|
||||
profile). Screenshot URLs carry a hash of the file (`?v=`): `/assets/` is cached for 30 days, so
|
||||
after deploying 1.7.1 the template grid still showed the old illustrated screenshots. The
|
||||
Website's e2e server takes `/test/demo?profile=` for these screenshots (test helper only, no
|
||||
Website release). **Not deployed yet.**
|
||||
- **Church Website 1.6.0 + crosscode.co.za 1.7.1 (2026-11-27):** the demo church has real photos:
|
||||
104 Unsplash stock photos (models; free under the Unsplash License, credited in
|
||||
`apps/website/backend/demo-photos/CREDITS.md`, 12 MB) instead of the generated "hills and sun"
|
||||
illustration: a set per demo profile, a portrait for every leader, a picture per event and a
|
||||
photo per message (before: the stand-in video's thumbnail). Faster on phones: the collage hero,
|
||||
the team's portraits and the ministry cards say their real width (`sizes`). No migration.
|
||||
Checked: backend tests (131), the Website e2e (130; the variant screenshots taken again;
|
||||
Lighthouse mobile 90–98 performance, 100 accessibility and SEO), typecheck, lint and both
|
||||
builds. crosscode.co.za 1.7.1: the 24 Church Website screenshots taken again from the new demo.
|
||||
**Not deployed yet.**
|
||||
- **Church Website 1.5.0 + crosscode script (2026-11-27):** the nightly backup also backs up the
|
||||
photos and files: a snapshot of `backend/uploads` in `backups/uploads-…/`, unchanged files hard
|
||||
links to the last snapshot (after the first full copy, a night costs only the new files), with
|
||||
|
||||
Reference in New Issue
Block a user