Files
crosscode-platform/apps/app/README.md
T
joshuaandClaude Opus 5.5 bb36e06fa4 app: the Church App's foundation; docs for Hub 2.26.1 and two years of devotionals
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>
2026-12-01 00:20:07 +02:00

3.3 KiB

Church App

The church-branded web app (PWA) for its members, with the House of Prayer as its headline (ROADMAP-v3 §7, phase 6; plan and decisions in docs/APP-1.0-PLAN.md). Served at app.<church's address> (or <church>.crosscode.co.za), added to the home screen, with no app-store release. Anyone can browse its public content; booking a prayer slot, a prayer request and notification settings need a sign-in through the church's Accounts. The admin is at /admin.

State: being built (from 2026-12-01). Not released; app@1.0.0 is tagged when the plan is built. Done so far (the foundation, plan §1, §2, §10, §12):

  • Backend: Express + Prisma + pg-boss (ES modules, as the Website). Registers with the Hub (CCP- licence key, product app) and sends the heartbeat with the active-member band the App tier is billed on; links itself to the church's Accounts once the Hub lists it; the church profile from Accounts (colours made safe, font pairing, corners).
  • Signing in (backend/src/auth/): anyone with an account at the church's Accounts becomes a Member. A sign-in lasts 8 days, renewed by each visit, up to 90 days (decision 7). Roles (Owner, Church admin, Content admin, Devotional writer, Prayer coordinator, Pastoral care) are the App's own; every one needs a sign-in with 2FA to use what it adds. The first Owner is whoever signs in with the Hub's admin email (HUB_ADMIN_EMAIL), verified in Accounts. Accounts' user.updated (WhatsApp STOP included), user.export and user.deleted are handled.
  • Active members: the last day a member used the App signed in, written at most once a day (in the church's timezone); the heartbeat reports only the band.
  • Modules: House of Prayer, Prayer requests, Announcements, Devotionals and Events can each be switched off (PUT /api/v1/admin/modules); Home and the tab bar only show what's on.
  • Frontend: Next.js 16, mobile first: the header, the bottom tab bar (Home, Prayer, Events, Devotional, Me), the church's colours, fonts and footer; the manifest and icons from the profile (its icon, else its initials on its colour; a maskable one too); the service worker (offline shell, pages kept for offline, a signed-in member's pages forgotten once they're signed out, no push); "Add to home screen" (Android's prompt, the iPhone's steps); Me; the admin's first dashboard. The modules' screens say what's coming.

Still to come (plan §3–§15): the House of Prayer, prayer requests, announcements, devotionals (Cross Code's from the Hub: the next 2 weeks, today included, fetched each night; and the church's own), events and the feed, email and WhatsApp, the rest of the admin, the export, backups, the demo church and scenarios, scripts/products/app.sh, e2e and Lighthouse.

  • backend/: npm run dev, npm test (Node's test runner through tsx), npm run build. The schema is in prisma/schema.prisma.
  • frontend/: npm run dev (port 3400, sends /api to the backend on 5400).

Local development: Postgres in backend/.env (DATABASE_URL, APP_URL=http://localhost:3400), npx prisma migrate deploy, then npm run dev in both folders. Set LINKS_ALLOW_PRIVATE=true to link to an Accounts on http://localhost. The service worker only runs in a production build (npm run build && npm start).