crosscode.church-export/1 with its app part, in plain terms with refs made
for the export: members as people with every role, the wall's rules,
commitments as rules (with skips), "I prayed" marks, campaigns, testimonies,
prayer requests with their updates and moderation (who and why; the whole
export is encrypted by the agent), the emergency numbers, announcements,
the church's own devotionals (not Cross Code's) and simple events; uploaded
images listed under uploads/. scripts/export-church.ts writes export.json
for the crosscode script (app.sh comes with slice 7). A test checks the
schema and that no internal id is in it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As the Website's: a gzipped pg_dump into backend/backups every night (02:40,
after Accounts' and the Website's) and on Back up now, named as the
crosscode script names them (app-YYYYMMDD-HHMMSS.sql.gz); a failed dump
leaves no file; the newest kept (14 by default). After each, a snapshot of
backend/uploads, hard-linking what hasn't changed. Settings → Backups lists
both, backs up now, downloads (audited) and sets how many to keep and what's
nightly; Owner and Church admin only. The heartbeat reports the newest
backup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Photos (JPEG, PNG, WebP, checked by their bytes) uploaded in the admin are
turned upright, stripped of their metadata and kept at most 2000 px wide in
backend/uploads (UPLOAD_DIR), served at /api/uploads (never a listing, a
sandboxing CSP). Content keeps the image's full address, so an upload and an
image from elsewhere work alike. 5 GB included or the licence's storage
limit; an image still in use can't be deleted. The announcement, campaign
and event forms get Upload a photo next to the address. Migration media.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Members and roles: members searched by name or email with what they hold;
roles given and taken by an Owner or Church admin (only an Owner makes or
changes an Owner, nobody changes their own), or someone added by email with
a role through Accounts' people.ensure. Background jobs: each job's switch
and schedule (winning over the .env) and Run now. The audit log and the
access log in plain words, 100 at a time. The dashboard's overview adds the
setup checklist (the church's details and icon, the wall's rules, prayer
coordinators, a first announcement, sharing the App), this week's coverage
and gaps, what waits for the prayer team and recent changes, each for the
roles it's about; Share the App marks the checklist.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The church's one set of settings from Accounts (messaging.get; the SMTP
password and WAWP token sealed with the link's secret, kept encrypted in
AppSetting messaging_settings), fetched when the App links to Accounts, on
Accounts' signed messaging.changed, once a day and on the admin's Fetch again.
messages-send (every minute): the outbox by email (nodemailer) and WhatsApp
(WAWP), STOP checked before every WhatsApp (the member and anyone with the
same number), email instead for what a member asked for (never
announcements), retries after 2, 4, 8 and 16 minutes, a reminder never after
its slot started, nothing more than 3 days late. announcement-sends and
devotional-sends queue "Also send it" at the publish time and today's
devotional at each member's time. Members' choices (NotificationSettings),
news consent kept from Accounts, MessageCount for the heartbeat's messages,
the admin's Email and WhatsApp API with Send a test.
Migration messaging (checked on PostgreSQL 18). 110 backend tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Public pages: Home with today's devotional, the latest announcements (pinned
first) and what's on; Announcements and each one's page (markdown without
HTML, a button, Article JSON-LD; members-only ones ask for a sign-in and are
noindex); Devotional (the passage in full with its copyright line, Read in
YouVersion, the prayer), each day's page, the archive by month and the
Acknowledgements; Events and each one's page (Register on the Events site for
Cross Events', a canonical to the origin, Event JSON-LD on the App's own).
A sitemap of the public pages, named in robots.txt.
Admin: Announcements (schedule, end, pin, campus, who sees it, also send it),
Events (simple events, Linked products: publish and show events from), and
Devotionals (Cross Code's or our own, Sync now, a month's days, writing, the
CSV import with its preview, keep or replace days already filled).
@crosscode/seo 1.1.0: articleJsonLd. The backend gives the App's own address
and the sitemap's list, and a simple event's crosscode.event/1 for its page.
Checked in a browser on a throwaway PostgreSQL: the pages for a visitor, the
JSON-LD, a members-only announcement asking for a sign-in, the sitemap, a
Content admin publishing an announcement and a Devotional writer saving one;
no page errors. 94 backend tests, 19 seo tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Announcements: public or members-only, pinned, a campus, a publish time and an
end, an optional button, markdown text; Content admins write them; the
heartbeat counts the last 30 days; "also send it" flags kept for §8.
Devotionals: Cross Code's from the Hub each night and on Sync now (the next
2 weeks from today in the church's timezone, with the licence; exactly those
days replaced, the rest kept, a Hub outage changes nothing), or the church's
own by its Devotional writers, by hand or the same CSV import as the Hub's
(preview, then replace or skip days already filled). Only KJV and BSB; the
passage with its copyright line and Read in YouVersion; today's or the most
recent; the archive by month; members-only ones; the acknowledgements.
Events: simple events in the church's timezone, and the feed both ways as the
Website's (publish its own as crosscode.event/1 with removals; read-only copies
of Cross Events' and the Website's, Register on the Events site, canonical to
the origin). Jobs event-feed (15 min) and crosscode-devotionals (01:15).
Migration 20261204000000_content (checked on PostgreSQL 18: applies, no diff).
93 backend tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Private by default (the prayer team only) or shared with members after a
coordinator approves it, with the first name or "Anonymous"; fully anonymous
requests when the church allows them (off by default). Coordinators approve,
redact (the sender told what changed) or remove (with a reason); anyone on the
team can escalate to Pastoral care (email and WhatsApp at once, an Owner or
Church admin when nobody has the role): it leaves the shared list and the sender
sees nothing different. "I prayed" counts without who, "Answered!" updates,
private replies from the team, closing after 30 days (7-90) and deletion 12
months later (prayer-requests-tidy). Every list with a sender is access-logged;
messages never carry a request's text; nothing in the heartbeat. Export and
delete for a member's requests. Shared helpers: parse (http.ts), accessLog
(lib/accessLog.ts). Migration 20261203000000_prayer_requests (checked on
PostgreSQL 18: applies, no diff). 78 backend tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commitments stored as rules (start, length, once/daily/weekly, end, skips) in the
church's timezone, daylight saving included; the day's coverage as counts only,
cached until a booking changes, live over server-sent events (X-Accel-Buffering
off, a comment every 25 s). Booking, skipping, changing, cancelling within the
8-hour rule, renewing (a signed single-use link), "I prayed" (self-reported).
Campaigns and moderated testimonies; the admin's bookings with names, always
access-logged; booking on a member's behalf. Reminders (every minute) and
renewal notices (14 and 3 days before) queued in an outbox for the messaging
slice. The heartbeat's prayer counts; export and delete for a member's prayer.
Migration 20261202000000_house_of_prayer (checked on PostgreSQL 18: applies, no
diff). 66 backend tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apps/app (not released; app@1.0.0 is built in slices, APP-1.0-PLAN §15):
- backend (Express, Prisma, pg-boss, as the Website): the Hub client
(CCP-, product app, the active-member band in the heartbeat), links
and church.changed, sign-in through Accounts (everyone a Member; 8 days
renewed up to 90; every role only with 2FA; the first Owner from
HUB_ADMIN_EMAIL), Accounts' user.updated/export/deleted, active members
once a day, modules on and off, GET /api/v1/app. Migration init.
- frontend (Next.js 16): header, tab bar, footer, manifest and icons from
the church profile, service worker, Add to home screen, Me, the admin's
first dashboard.
- env.template.json, PM2 template, README, CHANGELOG, WHATS-NEW; 27 tests.
Docs: the Hub runs 2.26.1 with two years of Cross Code's devotionals; an
App gets 2 weeks, today included. HANDOVER lists the App's slices.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>