# ebisike/ichurch architecture

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

- Interactive diagram: https://gitdiagram.com/ebisike/ichurch
- Repository: https://github.com/ebisike/ichurch

## Overview

iChurch is a multi-organisation church-management application. Users sign in to an organisation and use its management screens for members, attendance, events, finance, users, and administration; service classes implement the domain operations, with database access shared across them. The tree and source index support these major areas, but the README is empty and many screens were not sampled, so some capability links are documented only by source references and are omitted where ownership is unclear.

Main entry points: [`app/Services/init.php`](https://github.com/ebisike/ichurch/blob/master/app/Services/init.php) (Service initialization), [`app/public/shared/_sidebar.php`](https://github.com/ebisike/ichurch/blob/master/app/public/shared/_sidebar.php) (Navigation and controllers), [`app/Services/DB.php`](https://github.com/ebisike/ichurch/blob/master/app/Services/DB.php) (Database access), [`app/Services/Members.php`](https://github.com/ebisike/ichurch/blob/master/app/Services/Members.php) (Member records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and setup"]
  node_signin["Sign in<br/>[signin.php]"]
  node_signup["Organisation signup<br/>[signup.php]"]
  node_account["Account sessions"]
  node_organisations["Organisations<br/>[Organisations.php]"]
  node_admin["Platform admin<br/>[AdminUser.php]"]
  node_subscription["Subscription requests<br/>[Subscriptions.php]"]
end

subgraph group_community["Church community"]
  node_members["Member records<br/>[Members.php]"]
  node_children["Children records<br/>[Children.php]"]
  node_family["Family tree<br/>[FamilyTree.php]"]
  node_firsttimers["First timers<br/>[FirstTimers.php]"]
  node_fellowship["House fellowships"]
end

subgraph group_operations["Church operations"]
  node_attendance["Attendance<br/>[Attendance.php]"]
  node_events["Events<br/>[Events.php]"]
  node_calendar["Calendar<br/>[Calendar.php]"]
  node_transactions["Finance transactions<br/>[Transactions.php]"]
  node_accounting["Account statements"]
  node_balance["Account balance<br/>[Balance.php]"]
  node_users["User management<br/>[Users.php]"]
  node_roles["Role assignments<br/>[UsersInRole.php]"]
  node_reports["Reports<br/>[Reports.php]"]
  node_dashboard["Management dashboard<br/>[index.php]"]
end

subgraph group_platform["Platform services"]
  node_database[("Database access<br/>[DB.php]")]
  node_bootstrap["Service initialization<br/>[init.php]"]
  node_sidebar["Navigation and controllers<br/>[_sidebar.php]"]
  node_topbar["Alerts and summary<br/>[_topbar.php]"]
end

node_user(("Church user"))

node_user -->|"signs in"| node_signin
node_user -->|"registers"| node_signup
node_signin -.->|"authenticates"| node_account
node_signup -.->|"creates organisation"| node_organisations
node_bootstrap -->|"initializes"| node_database
node_bootstrap -->|"loads"| node_organisations
node_bootstrap -->|"loads"| node_members
node_bootstrap -->|"loads"| node_children
node_bootstrap -->|"loads"| node_family
node_bootstrap -->|"loads"| node_users
node_bootstrap -->|"loads"| node_roles
node_bootstrap -->|"loads"| node_attendance
node_bootstrap -->|"loads"| node_events
node_bootstrap -->|"loads"| node_calendar
node_bootstrap -->|"loads"| node_transactions
node_bootstrap -->|"loads"| node_balance
node_bootstrap -->|"loads"| node_accounting
node_bootstrap -->|"loads"| node_firsttimers
node_bootstrap -->|"loads"| node_fellowship
node_bootstrap -->|"loads"| node_subscription
node_bootstrap -->|"loads"| node_admin
node_sidebar -->|"requires"| node_bootstrap
node_sidebar -->|"checks roles"| node_users
node_sidebar -->|"links navigation"| node_members
node_sidebar -->|"links navigation"| node_attendance
node_sidebar -->|"links navigation"| node_events
node_topbar -->|"checks roles"| node_roles
node_topbar -->|"reads balance"| node_balance
node_topbar -.->|"reads alerts"| node_members
node_dashboard -->|"reads records"| node_children
node_dashboard -->|"uses account"| node_account
node_accounting -->|"reads transactions"| node_transactions
node_admin -->|"manages requests"| node_subscription
node_admin -.->|"queries"| node_database
node_members -.->|"reads and writes"| node_database
node_children -.->|"reads and writes"| node_database
node_organisations -.->|"reads and writes"| node_database
node_users -->|"updates assignments"| node_roles

click node_signin "https://github.com/ebisike/ichurch/blob/master/app/signin.php"
click node_signup "https://github.com/ebisike/ichurch/blob/master/app/signup.php"
click node_account "https://github.com/ebisike/ichurch/blob/master/app/Services/AccountController.php"
click node_organisations "https://github.com/ebisike/ichurch/blob/master/app/Services/Organisations.php"
click node_admin "https://github.com/ebisike/ichurch/blob/master/app/Services/AdminUser.php"
click node_subscription "https://github.com/ebisike/ichurch/blob/master/app/Services/Subscriptions.php"
click node_members "https://github.com/ebisike/ichurch/blob/master/app/Services/Members.php"
click node_children "https://github.com/ebisike/ichurch/blob/master/app/Services/Children.php"
click node_family "https://github.com/ebisike/ichurch/blob/master/app/Services/FamilyTree.php"
click node_firsttimers "https://github.com/ebisike/ichurch/blob/master/app/Services/FirstTimers.php"
click node_fellowship "https://github.com/ebisike/ichurch/blob/master/app/Services/HouseFellowship.php"
click node_attendance "https://github.com/ebisike/ichurch/blob/master/app/Services/Attendance.php"
click node_events "https://github.com/ebisike/ichurch/blob/master/app/Services/Events.php"
click node_calendar "https://github.com/ebisike/ichurch/blob/master/app/Services/Calendar.php"
click node_transactions "https://github.com/ebisike/ichurch/blob/master/app/Services/Transactions.php"
click node_accounting "https://github.com/ebisike/ichurch/blob/master/app/Services/AccountStatement.php"
click node_balance "https://github.com/ebisike/ichurch/blob/master/app/Services/Balance.php"
click node_users "https://github.com/ebisike/ichurch/blob/master/app/Services/Users.php"
click node_roles "https://github.com/ebisike/ichurch/blob/master/app/Services/UsersInRole.php"
click node_reports "https://github.com/ebisike/ichurch/blob/master/app/Services/Reports.php"
click node_dashboard "https://github.com/ebisike/ichurch/blob/master/app/public/mgt/index.php"
click node_database "https://github.com/ebisike/ichurch/blob/master/app/Services/DB.php"
click node_bootstrap "https://github.com/ebisike/ichurch/blob/master/app/Services/init.php"
click node_sidebar "https://github.com/ebisike/ichurch/blob/master/app/public/shared/_sidebar.php"
click node_topbar "https://github.com/ebisike/ichurch/blob/master/app/public/shared/_topbar.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_signin,node_signup,node_account,node_organisations,node_admin,node_subscription,node_user toneBlue
class node_members,node_children,node_family,node_firsttimers,node_fellowship toneAmber
class node_attendance,node_events,node_calendar,node_transactions,node_accounting,node_balance,node_users,node_roles,node_reports,node_dashboard toneMint
class node_database,node_bootstrap,node_sidebar,node_topbar toneRose
```

## Components

### Access and setup

- [Sign in](https://github.com/ebisike/ichurch/blob/master/app/signin.php): `app/signin.php`
- [Organisation signup](https://github.com/ebisike/ichurch/blob/master/app/signup.php): `app/signup.php`
- [Account sessions](https://github.com/ebisike/ichurch/blob/master/app/Services/AccountController.php): `app/Services/AccountController.php`
- [Organisations](https://github.com/ebisike/ichurch/blob/master/app/Services/Organisations.php): `app/Services/Organisations.php`
- [Platform admin](https://github.com/ebisike/ichurch/blob/master/app/Services/AdminUser.php): `app/Services/AdminUser.php`
- [Subscription requests](https://github.com/ebisike/ichurch/blob/master/app/Services/Subscriptions.php): `app/Services/Subscriptions.php`

### Church community

- [Member records](https://github.com/ebisike/ichurch/blob/master/app/Services/Members.php): `app/Services/Members.php`
- [Children records](https://github.com/ebisike/ichurch/blob/master/app/Services/Children.php): `app/Services/Children.php`
- [Family tree](https://github.com/ebisike/ichurch/blob/master/app/Services/FamilyTree.php): `app/Services/FamilyTree.php`
- [First timers](https://github.com/ebisike/ichurch/blob/master/app/Services/FirstTimers.php): `app/Services/FirstTimers.php`
- [House fellowships](https://github.com/ebisike/ichurch/blob/master/app/Services/HouseFellowship.php): `app/Services/HouseFellowship.php`

### Church operations

- [Attendance](https://github.com/ebisike/ichurch/blob/master/app/Services/Attendance.php): `app/Services/Attendance.php`
- [Events](https://github.com/ebisike/ichurch/blob/master/app/Services/Events.php): `app/Services/Events.php`
- [Calendar](https://github.com/ebisike/ichurch/blob/master/app/Services/Calendar.php): `app/Services/Calendar.php`
- [Finance transactions](https://github.com/ebisike/ichurch/blob/master/app/Services/Transactions.php): `app/Services/Transactions.php`
- [Account statements](https://github.com/ebisike/ichurch/blob/master/app/Services/AccountStatement.php): `app/Services/AccountStatement.php`
- [Account balance](https://github.com/ebisike/ichurch/blob/master/app/Services/Balance.php): `app/Services/Balance.php`
- [User management](https://github.com/ebisike/ichurch/blob/master/app/Services/Users.php): `app/Services/Users.php`
- [Role assignments](https://github.com/ebisike/ichurch/blob/master/app/Services/UsersInRole.php): `app/Services/UsersInRole.php`
- [Reports](https://github.com/ebisike/ichurch/blob/master/app/Services/Reports.php): `app/Services/Reports.php`
- [Management dashboard](https://github.com/ebisike/ichurch/blob/master/app/public/mgt/index.php): `app/public/mgt/index.php`

### Platform services

- [Database access](https://github.com/ebisike/ichurch/blob/master/app/Services/DB.php): `app/Services/DB.php`
- [Service initialization](https://github.com/ebisike/ichurch/blob/master/app/Services/init.php): `app/Services/init.php`
- [Navigation and controllers](https://github.com/ebisike/ichurch/blob/master/app/public/shared/_sidebar.php): `app/public/shared/_sidebar.php`
- [Alerts and summary](https://github.com/ebisike/ichurch/blob/master/app/public/shared/_topbar.php): `app/public/shared/_topbar.php`

### Other components

- **Church user**

## Connections

- Church user → Sign in: signs in (evidence: `app/signin.php`)
- Church user → Organisation signup: registers (evidence: `app/signup.php`)
- Sign in → Account sessions: authenticates
- Organisation signup → Organisations: creates organisation
- Service initialization → Database access: initializes (evidence: `app/Services/init.php`)
- Service initialization → Organisations: loads (evidence: `app/Services/init.php`)
- Service initialization → Member records: loads (evidence: `app/Services/init.php`)
- Service initialization → Children records: loads (evidence: `app/Services/init.php`)
- Service initialization → Family tree: loads (evidence: `app/Services/init.php`)
- Service initialization → User management: loads (evidence: `app/Services/init.php`)
- Service initialization → Role assignments: loads (evidence: `app/Services/init.php`)
- Service initialization → Attendance: loads (evidence: `app/Services/init.php`)
- Service initialization → Events: loads (evidence: `app/Services/init.php`)
- Service initialization → Calendar: loads (evidence: `app/Services/init.php`)
- Service initialization → Finance transactions: loads (evidence: `app/Services/init.php`)
- Service initialization → Account balance: loads (evidence: `app/Services/init.php`)
- Service initialization → Account statements: loads (evidence: `app/Services/init.php`)
- Service initialization → First timers: loads (evidence: `app/Services/init.php`)
- Service initialization → House fellowships: loads (evidence: `app/Services/init.php`)
- Service initialization → Subscription requests: loads (evidence: `app/Services/init.php`)
- Service initialization → Platform admin: loads (evidence: `app/Services/init.php`)
- Navigation and controllers → Service initialization: requires (evidence: `app/public/shared/_sidebar.php`)
- Navigation and controllers → User management: checks roles (evidence: `app/public/shared/_sidebar.php`)
- Navigation and controllers → Member records: links navigation (evidence: `app/public/shared/_sidebar.php`)
- Navigation and controllers → Attendance: links navigation (evidence: `app/public/shared/_sidebar.php`)
- Navigation and controllers → Events: links navigation (evidence: `app/public/shared/_sidebar.php`)
- Alerts and summary → Role assignments: checks roles (evidence: `app/public/shared/_topbar.php`)
- Alerts and summary → Account balance: reads balance (evidence: `app/public/shared/_topbar.php`)
- Alerts and summary → Member records: reads alerts (evidence: `app/public/shared/_topbar.php`)
- Management dashboard → Children records: reads records (evidence: `app/public/mgt/index.php`)
- Management dashboard → Account sessions: uses account (evidence: `app/public/mgt/index.php`)
- Account statements → Finance transactions: reads transactions (evidence: `app/Services/AccountStatement.php`)
- Platform admin → Subscription requests: manages requests (evidence: `app/Services/AdminUser.php`)
- Platform admin → Database access: queries
- Member records → Database access: reads and writes
- Children records → Database access: reads and writes
- Organisations → Database access: reads and writes
- User management → Role assignments: updates assignments (evidence: `app/Services/Users.php`)
