# gsravan0518/peniel_church_management architecture

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

- Interactive diagram: https://gitdiagram.com/gsravan0518/peniel_church_management
- Repository: https://github.com/gsravan0518/peniel_church_management

## Overview

Peniel Evangelical Fellowship is a church website and member-management application. Visitors browse church information and media; believers can register, share prayers, and request event bookings; pastors review requests and use a calendar with day-of notifications; admins manage users, gallery content, and messages. The React app calls an Express API backed by MongoDB. The sampled auth and scheduling code supports the specific relationships shown; other feature routes are included from the documented capabilities, but their internal calls are not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/App.jsx) (React Router), [`backend/server.js`](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/server.js) (Express API), [`frontend/src/pages/AdminDashboard.jsx`](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/AdminDashboard.jsx) (Admin Dashboard), [`backend/routes/auth.js`](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/auth.js) (Authentication API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Church Website"]
  node_app["React Router<br/>[App.jsx]"]
  node_public_pages["Public Pages<br/>[Home.jsx]"]
  node_event_pages["Events And Bookings<br/>[Events.jsx]"]
  node_prayer_page["Prayer Wall<br/>[PrayerWall.jsx]"]
  node_gallery_page["Gallery<br/>[Gallery.jsx]"]
  node_contact_page["Contact<br/>[Contact.jsx]"]
end

subgraph group_identity["Accounts And Roles"]
  node_auth_pages["Login And Registration<br/>[Login.jsx]"]
  node_auth_context["Auth Context<br/>[AuthContext.jsx]"]
  node_member_dash["Member Dashboard"]
  node_pastor_dash["Pastor Dashboard"]
  node_admin_dash["Admin Dashboard<br/>[AdminDashboard.jsx]"]
  node_auth_routes["Authentication API<br/>[auth.js]"]
end

subgraph group_ministry["Church Operations"]
  node_program_routes["Program Booking API<br/>[homePrograms.js]"]
  node_prayer_routes["Prayer API<br/>[prayers.js]"]
  node_calendar_routes["Calendar API<br/>[calendar.js]"]
  node_notification_routes["Notification API<br/>[notifications.js]"]
  node_calendar_job["Day-Of Scheduler<br/>[dayOfProgramJob.js]"]
  node_time_logic["Calendar And Time Logic<br/>[time.js]"]
end

subgraph group_backend["API And Data"]
  node_api_client["API Client<br/>[axios.js]"]
  node_server["Express API<br/>[server.js]"]
  node_admin_routes["Admin And Content APIs<br/>[dashboard.js]"]
  node_user_model["User Records<br/>[User.js]"]
  node_notification_model["Notification Records<br/>[Notification.js]"]
end

node_visitor(("Visitor Or Member"))
node_mongo[("MongoDB")]

node_visitor -->|"opens"| node_app
node_app -->|"routes"| node_public_pages
node_app -->|"routes"| node_event_pages
node_app -->|"routes"| node_prayer_page
node_app -->|"routes"| node_gallery_page
node_app -->|"routes"| node_contact_page
node_app -->|"routes"| node_auth_pages
node_app -->|"routes"| node_member_dash
node_app -->|"routes"| node_pastor_dash
node_app -->|"routes"| node_admin_dash
node_auth_pages -->|"uses"| node_auth_context
node_auth_context -->|"requests"| node_api_client
node_admin_dash -->|"requests"| node_api_client
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_program_routes
node_server -->|"mounts"| node_prayer_routes
node_server -->|"mounts"| node_calendar_routes
node_server -->|"mounts"| node_notification_routes
node_server -->|"mounts"| node_admin_routes
node_api_client -->|"HTTP requests"| node_server
node_auth_routes -->|"queries and updates"| node_user_model
node_auth_routes -->|"creates"| node_notification_model
node_calendar_job -->|"runs scheduling"| node_time_logic
node_time_logic -->|"creates day-of alerts"| node_notification_model
node_time_logic -->|"reads and writes"| node_mongo
node_user_model -->|"persists records"| node_mongo
node_notification_model -->|"persists records"| node_mongo
node_admin_dash -->|"loads dashboard"| node_admin_routes
node_admin_dash -->|"updates status"| node_program_routes

click node_app "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/App.jsx"
click node_public_pages "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Home.jsx"
click node_event_pages "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Events.jsx"
click node_prayer_page "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/PrayerWall.jsx"
click node_gallery_page "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Gallery.jsx"
click node_contact_page "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Contact.jsx"
click node_auth_pages "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Login.jsx"
click node_auth_context "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/context/AuthContext.jsx"
click node_member_dash "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/MemberDashboard.jsx"
click node_pastor_dash "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/PastorDashboard.jsx"
click node_admin_dash "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/AdminDashboard.jsx"
click node_api_client "https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/api/axios.js"
click node_server "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/server.js"
click node_auth_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/auth.js"
click node_program_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/homePrograms.js"
click node_prayer_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/prayers.js"
click node_calendar_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/calendar.js"
click node_notification_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/notifications.js"
click node_admin_routes "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/dashboard.js"
click node_user_model "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/models/User.js"
click node_notification_model "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/models/Notification.js"
click node_calendar_job "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/utils/dayOfProgramJob.js"
click node_time_logic "https://github.com/gsravan0518/peniel_church_management/blob/master/backend/utils/time.js"

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_app,node_public_pages,node_event_pages,node_prayer_page,node_gallery_page,node_contact_page toneBlue
class node_auth_pages,node_auth_context,node_member_dash,node_pastor_dash,node_admin_dash,node_auth_routes,node_mongo toneAmber
class node_program_routes,node_prayer_routes,node_calendar_routes,node_notification_routes,node_calendar_job,node_time_logic toneMint
class node_api_client,node_server,node_admin_routes,node_user_model,node_notification_model toneRose
class node_visitor toneIndigo
```

## Components

### Church Website

- [React Router](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Public Pages](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Events And Bookings](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Events.jsx): `frontend/src/pages/Events.jsx`
- [Prayer Wall](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/PrayerWall.jsx): `frontend/src/pages/PrayerWall.jsx`
- [Gallery](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Gallery.jsx): `frontend/src/pages/Gallery.jsx`
- [Contact](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Contact.jsx): `frontend/src/pages/Contact.jsx`

### Accounts And Roles

- [Login And Registration](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Auth Context](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Member Dashboard](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/MemberDashboard.jsx): `frontend/src/pages/MemberDashboard.jsx`
- [Pastor Dashboard](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/PastorDashboard.jsx): `frontend/src/pages/PastorDashboard.jsx`
- [Admin Dashboard](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Authentication API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/auth.js): `backend/routes/auth.js`

### Church Operations

- [Program Booking API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/homePrograms.js): `backend/routes/homePrograms.js`
- [Prayer API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/prayers.js): `backend/routes/prayers.js`
- [Calendar API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/calendar.js): `backend/routes/calendar.js`
- [Notification API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/notifications.js): `backend/routes/notifications.js`
- [Day-Of Scheduler](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/utils/dayOfProgramJob.js): `backend/utils/dayOfProgramJob.js`
- [Calendar And Time Logic](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/utils/time.js): `backend/utils/time.js`

### API And Data

- [API Client](https://github.com/gsravan0518/peniel_church_management/blob/master/frontend/src/api/axios.js): `frontend/src/api/axios.js`
- [Express API](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/server.js): `backend/server.js`
- [Admin And Content APIs](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/routes/dashboard.js): `backend/routes/dashboard.js`
- [User Records](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/models/User.js): `backend/models/User.js`
- [Notification Records](https://github.com/gsravan0518/peniel_church_management/blob/master/backend/models/Notification.js): `backend/models/Notification.js`

### Other components

- **Visitor Or Member**
- **MongoDB**

## Connections

- Visitor Or Member → React Router: opens
- React Router → Public Pages: routes
- React Router → Events And Bookings: routes
- React Router → Prayer Wall: routes
- React Router → Gallery: routes
- React Router → Contact: routes
- React Router → Login And Registration: routes
- React Router → Member Dashboard: routes
- React Router → Pastor Dashboard: routes
- React Router → Admin Dashboard: routes
- Login And Registration → Auth Context: uses
- Auth Context → API Client: requests
- Admin Dashboard → API Client: requests
- Express API → Authentication API: mounts
- Express API → Program Booking API: mounts
- Express API → Prayer API: mounts
- Express API → Calendar API: mounts
- Express API → Notification API: mounts
- Express API → Admin And Content APIs: mounts
- API Client → Express API: HTTP requests
- Authentication API → User Records: queries and updates
- Authentication API → Notification Records: creates
- Day-Of Scheduler → Calendar And Time Logic: runs scheduling
- Calendar And Time Logic → Notification Records: creates day-of alerts
- Calendar And Time Logic → MongoDB: reads and writes
- User Records → MongoDB: persists records
- Notification Records → MongoDB: persists records
- Admin Dashboard → Admin And Content APIs: loads dashboard
- Admin Dashboard → Program Booking API: updates status
