# moneermax/ahl-el-kheir-charity-management-system architecture

> Architecture diagram of the GitHub repository moneermax/ahl-el-kheir-charity-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/moneermax/ahl-el-kheir-charity-management-system
- Repository: https://github.com/moneermax/ahl-el-kheir-charity-management-system

## Overview

Ahl El Kheir is a procedural PHP charity-management system for staff workflows spanning beneficiaries, sponsorships, finance, HR and administration. The visible entry workflow is login followed by role-based dashboard routing; domain areas then provide operational and reporting capabilities. Shared runtime layers include session/authentication helpers and PDO database access. Most domain files were not excerpted, so the graph preserves the major areas shown in the tree but omits unverified calls between them; edges are limited to relationships visible in excerpts or the source index.

Main entry points: [`index.php`](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/index.php) (Login and routing), [`modules/accounting/lib.php`](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/accounting/lib.php) (Accounting), [`modules/reports/index.php`](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/reports/index.php) (Reports), [`modules/users/index.php`](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/users/index.php) (User administration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and shared runtime"]
  node_login["Login and routing<br/>[index.php]"]
  node_session["Session and access<br/>[session.php]"]
  node_helpers["Application helpers<br/>[functions.php]"]
  node_database[("PDO database<br/>[database.php]")]
  node_dashboards["Role dashboards"]
end

subgraph group_beneficiaries["Beneficiary operations"]
  node_families["Families<br/>[index.php]"]
  node_sponsors["Sponsors<br/>[index.php]"]
  node_sponsorships["Sponsorships<br/>[index.php]"]
end

subgraph group_finance["Finance and projects"]
  node_transactions["Transactions<br/>[index.php]"]
  node_accounting["Accounting<br/>[lib.php]"]
  node_projects["Projects<br/>[index.php]"]
end

subgraph group_oversight["People and oversight"]
  node_hr["Human resources"]
  node_users["User administration<br/>[index.php]"]
  node_reports["Reports<br/>[index.php]"]
  node_search["Global search<br/>[index.php]"]
  node_messages["Messaging<br/>[index.php]"]
  node_notifications["Notifications<br/>[index.php]"]
  node_administration["System administration<br/>[database.php]"]
end

node_staff(("Staff user"))

node_staff -->|"signs in"| node_login
node_login -->|"starts session"| node_session
node_login -->|"authenticates with"| node_database
node_login -->|"loads helpers"| node_helpers
node_login -.->|"routes by role"| node_dashboards
node_users -->|"provisions employee"| node_hr
node_accounting -->|"uses accounting helpers"| node_accounting
node_reports -->|"loads registry"| node_reports

click node_login "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/index.php"
click node_session "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/session.php"
click node_helpers "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/functions.php"
click node_database "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/database.php"
click node_families "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/families/index.php"
click node_sponsors "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/sponsors/index.php"
click node_sponsorships "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/sponsorships/index.php"
click node_transactions "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/transactions/index.php"
click node_accounting "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/accounting/lib.php"
click node_hr "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/hr/lib_attendance_policy.php"
click node_users "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/users/index.php"
click node_projects "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/projects/index.php"
click node_reports "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/reports/index.php"
click node_search "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/search/index.php"
click node_messages "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/messages/index.php"
click node_notifications "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/notifications/index.php"
click node_administration "https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/system/database.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_session,node_helpers,node_database,node_dashboards,node_staff toneBlue
class node_families,node_sponsors,node_sponsorships toneAmber
class node_transactions,node_accounting,node_projects toneMint
class node_hr,node_users,node_reports,node_search,node_messages,node_notifications,node_administration toneRose
```

## Components

### Entry and shared runtime

- [Login and routing](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/index.php): `index.php`
- [Session and access](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/session.php): `config/session.php`
- [Application helpers](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/functions.php): `config/functions.php`
- [PDO database](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/config/database.php): `config/database.php`
- **Role dashboards**

### Beneficiary operations

- [Families](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/families/index.php): `modules/families/index.php`
- [Sponsors](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/sponsors/index.php): `modules/sponsors/index.php`
- [Sponsorships](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/sponsorships/index.php): `modules/sponsorships/index.php`

### Finance and projects

- [Transactions](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/transactions/index.php): `modules/transactions/index.php`
- [Accounting](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/accounting/lib.php): `modules/accounting/lib.php`
- [Projects](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/projects/index.php): `modules/projects/index.php`

### People and oversight

- [Human resources](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/hr/lib_attendance_policy.php): `modules/hr/lib_attendance_policy.php`
- [User administration](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/users/index.php): `modules/users/index.php`
- [Reports](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/reports/index.php): `modules/reports/index.php`
- [Global search](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/search/index.php): `modules/search/index.php`
- [Messaging](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/messages/index.php): `modules/messages/index.php`
- [Notifications](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/notifications/index.php): `modules/notifications/index.php`
- [System administration](https://github.com/moneermax/ahl-el-kheir-charity-management-system/blob/main/modules/system/database.php): `modules/system/database.php`

### Other components

- **Staff user**

## Connections

- Staff user → Login and routing: signs in (evidence: `index.php`)
- Login and routing → Session and access: starts session (evidence: `index.php`)
- Login and routing → PDO database: authenticates with (evidence: `index.php`)
- Login and routing → Application helpers: loads helpers (evidence: `index.php`)
- Login and routing → Role dashboards: routes by role (evidence: `index.php`)
- User administration → Human resources: provisions employee (evidence: `modules/users/index.php`)
- Accounting → Accounting: uses accounting helpers (evidence: `modules/accounting/lib.php`)
- Reports → Reports: loads registry (evidence: `modules/reports/index.php`)
