# ncuben/enkonzweni-church-managemet-system architecture

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

- Interactive diagram: https://gitdiagram.com/ncuben/enkonzweni-church-managemet-system
- Repository: https://github.com/ncuben/enkonzweni-church-managemet-system

## Overview

eNkonzweni is a PHP/MySQL church administration system. Its user-facing workflow starts with staff login and a dashboard, then supports management of church branches, members, staff, events, groups, locations, and offerings; reports provide directories for several records. The sampled pages show direct database access rather than a separate service or repository layer. Several important pages are identified by the tree and README but were not sampled, so their internal calls and data flows are not asserted here.

Main entry points: [`reports.php`](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/reports.php) (Report links), [`login.php`](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/login.php) (Staff login), [`dashboard.php`](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/dashboard.php) (Dashboard), [`index.php`](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/index.php) (Public home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and overview"]
  node_login["Staff login<br/>[login.php]"]
  node_dashboard["Dashboard<br/>[dashboard.php]"]
  node_public_home["Public home<br/>[index.php]"]
end

subgraph group_church["Church administration"]
  node_church_edit["Church records<br/>[church.php]"]
  node_branch_directory["Church directory<br/>[churches.php]"]
  node_locations["Locations<br/>[location.php]"]
  node_church_types["Church types<br/>[type.php]"]
  node_events["Events<br/>[events.php]"]
end

subgraph group_people["People and finance"]
  node_members["Member records<br/>[member.php]"]
  node_member_directory["Member directory<br/>[members.php]"]
  node_groups["Age groups<br/>[groups.php]"]
  node_staff["Staff records<br/>[staff.php]"]
  node_pastors["Pastor directory<br/>[pastors.php]"]
  node_offerings["Tithes and offerings<br/>[offering.php]"]
  node_registration["Registration page<br/>[register.php]"]
  node_roles["Staff roles<br/>[role.php]"]
end

subgraph group_insights["Directories and reports"]
  node_reports["Report links<br/>[reports.php]"]
end

node_visitor(("Staff user"))
node_mysql[("MySQL database")]

node_visitor -->|"submits credentials"| node_login
node_login -->|"redirects on login"| node_dashboard
node_dashboard -->|"reads counts"| node_mysql
node_public_home -->|"reads branches, events"| node_mysql
node_church_edit -->|"reads locations and types"| node_mysql
node_events -->|"writes event"| node_mysql
node_groups -->|"writes group"| node_mysql
node_locations -->|"writes location"| node_mysql
node_offerings -->|"writes offering"| node_mysql
node_staff -->|"reads roles"| node_mysql
node_reports -->|"links directory"| node_pastors
node_reports -->|"links directory"| node_branch_directory

click node_login "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/login.php"
click node_dashboard "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/dashboard.php"
click node_public_home "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/index.php"
click node_church_edit "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/church.php"
click node_branch_directory "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/churches.php"
click node_locations "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/location.php"
click node_church_types "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/type.php"
click node_events "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/events.php"
click node_members "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/member.php"
click node_member_directory "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/members.php"
click node_groups "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/groups.php"
click node_staff "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/staff.php"
click node_pastors "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/pastors.php"
click node_offerings "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/offering.php"
click node_registration "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/register.php"
click node_reports "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/reports.php"
click node_roles "https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/role.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_login,node_dashboard,node_public_home,node_visitor toneBlue
class node_church_edit,node_branch_directory,node_locations,node_church_types,node_events,node_mysql toneAmber
class node_members,node_member_directory,node_groups,node_staff,node_pastors,node_offerings,node_registration,node_roles toneMint
class node_reports toneRose
```

## Components

### Access and overview

- [Staff login](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/login.php): `login.php`
- [Dashboard](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/dashboard.php): `dashboard.php`
- [Public home](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/index.php): `index.php`

### Church administration

- [Church records](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/church.php): `church.php`
- [Church directory](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/churches.php): `churches.php`
- [Locations](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/location.php): `location.php`
- [Church types](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/type.php): `type.php`
- [Events](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/events.php): `events.php`

### People and finance

- [Member records](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/member.php): `member.php`
- [Member directory](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/members.php): `members.php`
- [Age groups](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/groups.php): `groups.php`
- [Staff records](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/staff.php): `staff.php`
- [Pastor directory](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/pastors.php): `pastors.php`
- [Tithes and offerings](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/offering.php): `offering.php`
- [Registration page](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/register.php): `register.php`
- [Staff roles](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/role.php): `role.php`

### Directories and reports

- [Report links](https://github.com/ncuben/enkonzweni-church-managemet-system/blob/master/reports.php): `reports.php`

### Other components

- **Staff user**
- **MySQL database**

## Connections

- Staff user → Staff login: submits credentials (evidence: `login.php`)
- Staff login → Dashboard: redirects on login (evidence: `login.php`)
- Dashboard → MySQL database: reads counts (evidence: `dashboard.php`)
- Public home → MySQL database: reads branches, events (evidence: `index.php`)
- Church records → MySQL database: reads locations and types (evidence: `church.php`)
- Events → MySQL database: writes event (evidence: `events.php`)
- Age groups → MySQL database: writes group (evidence: `groups.php`)
- Locations → MySQL database: writes location (evidence: `location.php`)
- Tithes and offerings → MySQL database: writes offering (evidence: `offering.php`)
- Staff records → MySQL database: reads roles (evidence: `staff.php`)
- Report links → Pastor directory: links directory (evidence: `reports.php`)
- Report links → Church directory: links directory (evidence: `reports.php`)
