# mcrence/church-monitoring-system architecture

> Architecture diagram of the GitHub repository mcrence/church-monitoring-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mcrence/church-monitoring-system
- Repository: https://github.com/mcrence/church-monitoring-system

## Overview

Church Monitoring System is a staff-facing web application for participant records, event attendance, sponsorship and child-care follow-up, with separate guardian and church-goer access. The principal workflow is staff use of the web client to manage records or check-ins, with the server enforcing access and persisting data; staff can then review attendance and participation reports. The graph also preserves import, history, audit, access, and attendance-risk capabilities documented in the README. Several relationships are grounded only in README descriptions or imports; unsampled handler details are not inferred.

Main entry points: [`server/index.js`](https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js) (HTTP API and workflows), [`client/src/App.jsx`](https://github.com/mcrence/church-monitoring-system/blob/main/client/src/App.jsx) (Church web app), [`analytics-service/app.py`](https://github.com/mcrence/church-monitoring-system/blob/main/analytics-service/app.py) (Risk scoring API), [`client/src/offlineCheckinQueue.js`](https://github.com/mcrence/church-monitoring-system/blob/main/client/src/offlineCheckinQueue.js) (Offline check-in queue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_client["Church web app<br/>[App.jsx]"]
  node_offline[("Offline check-in queue")]
end

subgraph group_server["Application services"]
  node_api["HTTP API and workflows<br/>[index.js]"]
  node_store[("Church monitoring database")]
  node_imports["Schedule and record import<br/>[import-file.js]"]
  node_passcode["Guardian passcodes"]
  node_audit["Staff permissions and audit<br/>[index.js]"]
  node_alerts["Email and SMS delivery<br/>[gmail-api.js]"]
  node_sms["SMS integration<br/>[semaphore-sms.js]"]
end

subgraph group_domain["Monitoring domains"]
  node_participants["Participant records"]
  node_attendance["Attendance and check-in<br/>[index.js]"]
  node_participation["Participation summaries<br/>[participation.js]"]
  node_history["Education history"]
  node_sponsorship["Sponsorship operations"]
  node_goer["Church-goer access<br/>[goer-access.js]"]
  node_reports["Attendance analytics"]
  node_risk["At-risk summaries<br/>[at-risk-summary.js]"]
  node_prediction["Attendance prediction"]
end

subgraph group_analytics["Risk analytics"]
  node_analytics_api["Risk scoring API<br/>[app.py]"]
  node_scoring["Risk score function<br/>[risk_scoring.py]"]
end

node_staff(("Staff and guardians"))

node_staff -->|"uses"| node_client
node_client -.->|"requests"| node_api
node_client -->|"queues check-ins"| node_offline
node_api -->|"queries"| node_store
node_api -->|"inspects files"| node_imports
node_api -->|"uses"| node_participants
node_api -->|"handles check-ins"| node_attendance
node_api -->|"uses"| node_participation
node_api -.->|"serves history"| node_history
node_api -->|"initializes"| node_sponsorship
node_api -->|"checks access"| node_goer
node_api -.->|"verifies portal access"| node_passcode
node_api -->|"serves reports"| node_reports
node_api -.->|"provides follow-up"| node_risk
node_api -.->|"scores attendance"| node_prediction
node_api -->|"manages permissions and audit"| node_audit
node_api -.->|"sends email"| node_alerts
node_api -.->|"sends SMS"| node_sms
node_analytics_api -->|"calls"| node_scoring

click node_client "https://github.com/mcrence/church-monitoring-system/blob/main/client/src/App.jsx"
click node_offline "https://github.com/mcrence/church-monitoring-system/blob/main/client/src/offlineCheckinQueue.js"
click node_api "https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js"
click node_store "https://github.com/mcrence/church-monitoring-system/blob/main/church_monitoringdb.sql"
click node_imports "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/import-file.js"
click node_participants "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participant-utils.js"
click node_attendance "https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js"
click node_participation "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participation.js"
click node_history "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/education-history.js"
click node_sponsorship "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/sponsorship-tables.js"
click node_goer "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/goer-access.js"
click node_passcode "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participant-passcode.js"
click node_reports "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/attendance-analytics.js"
click node_risk "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/at-risk-summary.js"
click node_prediction "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/attendance-prediction.js"
click node_audit "https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js"
click node_alerts "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/gmail-api.js"
click node_sms "https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/semaphore-sms.js"
click node_analytics_api "https://github.com/mcrence/church-monitoring-system/blob/main/analytics-service/app.py"
click node_scoring "https://github.com/mcrence/church-monitoring-system/blob/main/analytics-service/risk_scoring.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_offline toneBlue
class node_api,node_store,node_imports,node_passcode,node_audit,node_alerts,node_sms toneAmber
class node_participants,node_attendance,node_participation,node_history,node_sponsorship,node_goer,node_reports,node_risk,node_prediction toneMint
class node_analytics_api,node_scoring toneRose
class node_staff toneIndigo
```

## Components

### Web experience

- [Church web app](https://github.com/mcrence/church-monitoring-system/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Offline check-in queue](https://github.com/mcrence/church-monitoring-system/blob/main/client/src/offlineCheckinQueue.js): `client/src/offlineCheckinQueue.js`

### Application services

- [HTTP API and workflows](https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js): `server/index.js`
- [Church monitoring database](https://github.com/mcrence/church-monitoring-system/blob/main/church_monitoringdb.sql): `church_monitoringdb.sql`
- [Schedule and record import](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/import-file.js): `server/utils/import-file.js`
- [Guardian passcodes](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participant-passcode.js): `server/utils/participant-passcode.js`
- [Staff permissions and audit](https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js): `server/index.js`
- [Email and SMS delivery](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/gmail-api.js): `server/utils/gmail-api.js`
- [SMS integration](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/semaphore-sms.js): `server/utils/semaphore-sms.js`

### Monitoring domains

- [Participant records](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participant-utils.js): `server/utils/participant-utils.js`
- [Attendance and check-in](https://github.com/mcrence/church-monitoring-system/blob/main/server/index.js): `server/index.js`
- [Participation summaries](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/participation.js): `server/utils/participation.js`
- [Education history](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/education-history.js): `server/utils/education-history.js`
- [Sponsorship operations](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/sponsorship-tables.js): `server/utils/sponsorship-tables.js`
- [Church-goer access](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/goer-access.js): `server/utils/goer-access.js`
- [Attendance analytics](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/attendance-analytics.js): `server/utils/attendance-analytics.js`
- [At-risk summaries](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/at-risk-summary.js): `server/utils/at-risk-summary.js`
- [Attendance prediction](https://github.com/mcrence/church-monitoring-system/blob/main/server/utils/attendance-prediction.js): `server/utils/attendance-prediction.js`

### Risk analytics

- [Risk scoring API](https://github.com/mcrence/church-monitoring-system/blob/main/analytics-service/app.py): `analytics-service/app.py`
- [Risk score function](https://github.com/mcrence/church-monitoring-system/blob/main/analytics-service/risk_scoring.py): `analytics-service/risk_scoring.py`

### Other components

- **Staff and guardians**

## Connections

- Staff and guardians → Church web app: uses (evidence: `README.md`)
- Church web app → HTTP API and workflows: requests
- Church web app → Offline check-in queue: queues check-ins (evidence: `client/src/App.jsx`)
- HTTP API and workflows → Church monitoring database: queries (evidence: `server/index.js`)
- HTTP API and workflows → Schedule and record import: inspects files (evidence: `server/index.js`)
- HTTP API and workflows → Participant records: uses (evidence: `server/index.js`)
- HTTP API and workflows → Attendance and check-in: handles check-ins (evidence: `README.md`)
- HTTP API and workflows → Participation summaries: uses (evidence: `server/index.js`)
- HTTP API and workflows → Education history: serves history (evidence: `server/index.js`)
- HTTP API and workflows → Sponsorship operations: initializes (evidence: `server/index.js`)
- HTTP API and workflows → Church-goer access: checks access (evidence: `server/index.js`)
- HTTP API and workflows → Guardian passcodes: verifies portal access (evidence: `server/index.js`)
- HTTP API and workflows → Attendance analytics: serves reports (evidence: `README.md`)
- HTTP API and workflows → At-risk summaries: provides follow-up (evidence: `server/index.js`)
- HTTP API and workflows → Attendance prediction: scores attendance (evidence: `server/index.js`)
- HTTP API and workflows → Staff permissions and audit: manages permissions and audit (evidence: `README.md`)
- HTTP API and workflows → Email and SMS delivery: sends email (evidence: `server/index.js`)
- HTTP API and workflows → SMS integration: sends SMS (evidence: `server/index.js`)
- Risk scoring API → Risk score function: calls (evidence: `analytics-service/app.py`)
