# rojojohnjoshua/capstone architecture

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

- Interactive diagram: https://gitdiagram.com/rojojohnjoshua/capstone
- Repository: https://github.com/rojojohnjoshua/capstone

## Overview

Holy Family Parish is a parishioner and staff portal for appointments, service reservations, and centralized sacramental records. Parishioners authenticate, submit requests, and track their status; administrators manage bookings and records, with reporting and operational tools alongside the main workflow. The React client uses the PHP JSON API and MySQL, while the README also documents legacy server-rendered PHP pages using the same database. Some feature connections are based on README statements or the source index because their implementation excerpts were not provided.

Main entry points: [`server/api/reservations/index.php`](https://github.com/rojojohnjoshua/capstone/blob/main/server/api/reservations/index.php) (Appointments and Reservations), [`server/config/database.php`](https://github.com/rojojohnjoshua/capstone/blob/main/server/config/database.php) (MySQL Database), [`client/src/App.jsx`](https://github.com/rojojohnjoshua/capstone/blob/main/client/src/App.jsx) (React Application), [`client/src/services/api.js`](https://github.com/rojojohnjoshua/capstone/blob/main/client/src/services/api.js) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Parishioner and Admin Portal"]
  node_webapp["React Application<br/>[App.jsx]"]
  node_authui["Login and Registration<br/>[AuthContext.jsx]"]
  node_clientapi["API Client<br/>[api.js]"]
  node_userfeatures["Parishioner Features"]
  node_adminfeatures["Admin Workspace"]
end

subgraph group_api["PHP API and Workflows"]
  node_apiinit["API Session Setup<br/>[init.php]"]
  node_authapi["Authentication API"]
  node_bookingapi["Appointments and Reservations<br/>[index.php]"]
  node_recordsapi["Records API"]
  node_reportingapi["Reporting and Admin APIs"]
end

subgraph group_ops["Parish Operations"]
  node_schedule["Schedule Rules<br/>[schedule.php]"]
  node_documents["Document Handling<br/>[documents.php]"]
  node_notifications["Notifications<br/>[notifications.php]"]
  node_sms["SMS Delivery<br/>[sms.php]"]
end

subgraph group_data["Persistence and Legacy Pages"]
  node_mysql[("MySQL Database<br/>[database.php]")]
  node_legacy["Legacy PHP Pages<br/>[init.php]"]
end

node_parishioner(("Parishioner"))
node_staff(("Parish Staff"))

node_parishioner -->|"uses portal"| node_webapp
node_staff -->|"manages services"| node_webapp
node_webapp -->|"provides access"| node_authui
node_webapp -->|"routes users"| node_userfeatures
node_webapp -->|"routes admins"| node_adminfeatures
node_authui -->|"requests auth"| node_clientapi
node_userfeatures -.->|"requests services"| node_clientapi
node_adminfeatures -.->|"requests management"| node_clientapi
node_clientapi -.->|"calls PHP API"| node_apiinit
node_apiinit -->|"sets API session"| node_authapi
node_apiinit -->|"sets API session"| node_bookingapi
node_bookingapi -->|"checks availability"| node_schedule
node_bookingapi -->|"handles documents"| node_documents
node_bookingapi -->|"creates notices"| node_notifications
node_bookingapi -->|"sends SMS"| node_sms
node_bookingapi -->|"reads and writes"| node_mysql
node_authapi -.->|"reads and writes"| node_mysql
node_recordsapi -.->|"manages records"| node_mysql
node_reportingapi -.->|"queries reports"| node_mysql
node_sms -->|"reads configuration"| node_mysql
node_legacy -->|"shares database"| node_mysql

click node_webapp "https://github.com/rojojohnjoshua/capstone/blob/main/client/src/App.jsx"
click node_authui "https://github.com/rojojohnjoshua/capstone/blob/main/client/src/context/AuthContext.jsx"
click node_clientapi "https://github.com/rojojohnjoshua/capstone/blob/main/client/src/services/api.js"
click node_userfeatures "https://github.com/rojojohnjoshua/capstone/tree/main/client/src/pages"
click node_adminfeatures "https://github.com/rojojohnjoshua/capstone/tree/main/client/src/pages/admin"
click node_apiinit "https://github.com/rojojohnjoshua/capstone/blob/main/server/config/init.php"
click node_authapi "https://github.com/rojojohnjoshua/capstone/tree/main/server/api/auth"
click node_bookingapi "https://github.com/rojojohnjoshua/capstone/blob/main/server/api/reservations/index.php"
click node_recordsapi "https://github.com/rojojohnjoshua/capstone/tree/main/server/api/records"
click node_reportingapi "https://github.com/rojojohnjoshua/capstone/tree/main/server/api/reports"
click node_schedule "https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/schedule.php"
click node_documents "https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/documents.php"
click node_notifications "https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/notifications.php"
click node_sms "https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/sms.php"
click node_mysql "https://github.com/rojojohnjoshua/capstone/blob/main/server/config/database.php"
click node_legacy "https://github.com/rojojohnjoshua/capstone/blob/main/includes/init.php"

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_webapp,node_authui,node_clientapi,node_userfeatures,node_adminfeatures toneBlue
class node_apiinit,node_authapi,node_bookingapi,node_recordsapi,node_reportingapi toneAmber
class node_schedule,node_documents,node_notifications,node_sms toneMint
class node_mysql,node_legacy toneRose
class node_parishioner,node_staff toneIndigo
```

## Components

### Parishioner and Admin Portal

- [React Application](https://github.com/rojojohnjoshua/capstone/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Login and Registration](https://github.com/rojojohnjoshua/capstone/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [API Client](https://github.com/rojojohnjoshua/capstone/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Parishioner Features](https://github.com/rojojohnjoshua/capstone/tree/main/client/src/pages): `client/src/pages`
- [Admin Workspace](https://github.com/rojojohnjoshua/capstone/tree/main/client/src/pages/admin): `client/src/pages/admin`

### PHP API and Workflows

- [API Session Setup](https://github.com/rojojohnjoshua/capstone/blob/main/server/config/init.php): `server/config/init.php`
- [Authentication API](https://github.com/rojojohnjoshua/capstone/tree/main/server/api/auth): `server/api/auth`
- [Appointments and Reservations](https://github.com/rojojohnjoshua/capstone/blob/main/server/api/reservations/index.php): `server/api/reservations/index.php`
- [Records API](https://github.com/rojojohnjoshua/capstone/tree/main/server/api/records): `server/api/records`
- [Reporting and Admin APIs](https://github.com/rojojohnjoshua/capstone/tree/main/server/api/reports): `server/api/reports`

### Parish Operations

- [Schedule Rules](https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/schedule.php): `server/utils/schedule.php`
- [Document Handling](https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/documents.php): `server/utils/documents.php`
- [Notifications](https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/notifications.php): `server/utils/notifications.php`
- [SMS Delivery](https://github.com/rojojohnjoshua/capstone/blob/main/server/utils/sms.php): `server/utils/sms.php`

### Persistence and Legacy Pages

- [MySQL Database](https://github.com/rojojohnjoshua/capstone/blob/main/server/config/database.php): `server/config/database.php`
- [Legacy PHP Pages](https://github.com/rojojohnjoshua/capstone/blob/main/includes/init.php): `includes/init.php`

### Other components

- **Parishioner**
- **Parish Staff**

## Connections

- Parishioner → React Application: uses portal (evidence: `README.md`)
- Parish Staff → React Application: manages services (evidence: `README.md`)
- React Application → Login and Registration: provides access (evidence: `client/src/App.jsx`)
- React Application → Parishioner Features: routes users (evidence: `client/src/App.jsx`)
- React Application → Admin Workspace: routes admins (evidence: `client/src/App.jsx`)
- Login and Registration → API Client: requests auth (evidence: `client/src/context/AuthContext.jsx`)
- Parishioner Features → API Client: requests services
- Admin Workspace → API Client: requests management
- API Client → API Session Setup: calls PHP API
- API Session Setup → Authentication API: sets API session (evidence: `server/config/init.php`)
- API Session Setup → Appointments and Reservations: sets API session (evidence: `server/config/init.php`)
- Appointments and Reservations → Schedule Rules: checks availability (evidence: `server/api/reservations/index.php`)
- Appointments and Reservations → Document Handling: handles documents (evidence: `server/api/reservations/index.php`)
- Appointments and Reservations → Notifications: creates notices (evidence: `server/api/reservations/index.php`)
- Appointments and Reservations → SMS Delivery: sends SMS (evidence: `server/api/reservations/index.php`)
- Appointments and Reservations → MySQL Database: reads and writes (evidence: `server/api/reservations/index.php`)
- Authentication API → MySQL Database: reads and writes
- Records API → MySQL Database: manages records
- Reporting and Admin APIs → MySQL Database: queries reports
- SMS Delivery → MySQL Database: reads configuration (evidence: `server/utils/sms.php`)
- Legacy PHP Pages → MySQL Database: shares database (evidence: `README.md`)
