Aller au contenu principal

Architecture

These pages are cross-repo system maps: they document how a core ChurchApps system works end-to-end — across the apps, the API modules, and the shared libraries — rather than how any single project is set up. Read them before changing a system's behavior; read Setup to get a project running and the API section for endpoint-level reference.

The ecosystem at a glance

ChurchApps is ~20 independent repositories (not a monorepo). Client apps talk to a small set of backend APIs over HTTPS and WebSocket, and share code through npm packages published under the @churchapps scope.

┌────────────────────────────────┐            ┌──────────────────────────────────────────────┐
│ Clients │ │ Api — core modular monolith (AWS Lambda) │
│ │ │ │
│ B1Admin staff dashboard │ HTTPS │ membership attendance content │
│ B1App member portal + │ ─────────▶ │ giving messaging doing │
│ church websites │ │ │
│ B1Checkin check-in kiosk │ ◀───WS───▶ │ one MySQL database per module (6 total) │
│ B1Mobile (maintenance-only) │ └──────────────────────────────────────────────┘
│ FreePlay TV content player │ ┌──────────────────────────────────────────────┐
└───────────────┬────────────────┘ │ LessonsApi — Lessons.church backend │
│ └──────────────────────────────────────────────┘
│ shared code via npm (@churchapps/*)

helpers (cross-app interfaces) · apphelper (React components) · apihelper (Express/server utilities)

Two structural rules shape everything documented in this section:

  1. Modules are isolated. Each Api module owns its database and its tables; other modules and apps reach its data only through its REST endpoints. See Module Structure.
  2. Shared code ships as npm packages. Apps never import each other's source; anything reused crosses repo boundaries through @churchapps/helpers, @churchapps/apphelper, or @churchapps/apihelper. See Shared Libraries.

System maps

PageWhat it coversSpans
Notifications & RemindersHow anything tells a person something: the two dispatch doors, the channel escalation chain, and the reminder engineApi (messaging), B1Admin, B1App
Real-time ArchitectureThe WebSocket delivery framework behind chat, presence, and in-app deliveryApi (messaging), all web apps
Web Push NotificationsThe browser push channel: VAPID keys, subscription storage, deliveryApi (messaging), all web apps
GivingPayment providers and gateways, donation flows, funds/batches, gateway webhooksApi (giving), apphelper, B1App, B1Admin
Event RegistrationsThe registration commerce model: attendee types, selections, discount codes, payments through the giving gateway, and the waitlistApi (content + giving), B1App, B1Admin
Check-InsKiosk and self check-in, the attendance data model, room routing, the child-safety layer, label printingB1Checkin, B1App, B1Admin, Api (attendance + membership)
Website BuilderThe page/section/element tree, the element-type contract and renderers, blog, access-gated pages, SEO, and AI generationApi (content), AskApi, helpers/apphelper, B1Admin, B1App
Website Routing & Multi-SiteHow a request resolves to a church and a specific site, the multi-site siteId data model, and the Caddy custom-domain edgeB1App, Api (membership + content), B1Admin
IntegrationsThe extension surface: OAuth, API keys, webhooks, content providers, MCPApi, shared libraries, external apps
Audit Log & Undoable BatchesDefault-on auditing of every mutation at the controller choke point, and the batch layer that makes imports and bulk actions undoableApi (all modules), B1Admin, B1Transfer
astuce

When a change alters how one of these systems works — not just a page inside one app — the matching system map here should be updated in the same effort. That keeps this section trustworthy as the first stop for new contributors.