# ophireumtechnology/phumulani architecture

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

- Interactive diagram: https://gitdiagram.com/ophireumtechnology/phumulani
- Repository: https://github.com/ophireumtechnology/phumulani

## Overview

Phumulani is a nonprofit community-services and organizational operations platform. Its principal workflow is member access to program and service support, including enrollment and staff coordination; administrators also manage fundraising, grants, impact reporting, governance, and volunteer operations. The platform adds human-supervised AI capabilities and an enterprise email command center. The graph emphasizes documented capabilities and source-index-visible dependencies; unsampled subsystem wiring is not inferred.

Main entry points: [`src/views/MasterAdministratorView.tsx`](https://github.com/ophireumtechnology/phumulani/blob/main/src/views/MasterAdministratorView.tsx) (Master administration), [`src/services/postgresPersistenceAdapter.ts`](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/postgresPersistenceAdapter.ts) (PostgreSQL persistence), [`src/services/db.ts`](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/db.ts) (Client data service), [`src/components/portal/MemberSelfServiceSection.tsx`](https://github.com/ophireumtechnology/phumulani/blob/main/src/components/portal/MemberSelfServiceSection.tsx) (Member self-service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_app["Application shell<br/>[App.tsx]"]
  node_member_portal["Member self-service"]
  node_community_view["Community portal"]
  node_email_center["Email command center"]
end

subgraph group_services["Community Services"]
  node_service_delivery["Service delivery"]
  node_casework["Member casework"]
  node_enrollment["Program enrollment"]
  node_programs["Community programs"]
end

subgraph group_development["Funding &amp; Impact"]
  node_funding_ui["Funding command center"]
  node_funding_service["Funding management"]
  node_fundraising["Fundraising CRM"]
  node_impact["MEAL &amp; impact"]
end

subgraph group_operations["Administration &amp; AI"]
  node_master_admin["Master administration"]
  node_reporting["Operational reporting"]
  node_events["Events &amp; safeguarding"]
  node_ai_workforce["AI workforce"]
  node_workflow["Workflow automation"]
  node_email_service["Email operations"]
  node_email_dispatch["Email dispatch"]
end

subgraph group_platform["Platform Services"]
  node_identity["Authentication &amp; access"]
  node_db[("Client data service<br/>[db.ts]")]
  node_persistence[("PostgreSQL persistence")]
  node_types["Domain types"]
end

node_visitor(("Community member"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_community_view
node_app -->|"subscribes"| node_db
node_community_view -.->|"presents"| node_member_portal
node_member_portal -->|"requests enrollment"| node_enrollment
node_member_portal -->|"reads and updates"| node_db
node_member_portal -.->|"tracks services"| node_service_delivery
node_service_delivery -.->|"coordinates"| node_casework
node_service_delivery -.->|"uses programs"| node_programs
node_enrollment -->|"uses storage"| node_db
node_master_admin -.->|"exposes funding"| node_funding_ui
node_funding_ui -->|"calls"| node_funding_service
node_funding_service -->|"uses storage"| node_db
node_master_admin -.->|"exposes impact"| node_impact
node_master_admin -.->|"provides reports"| node_reporting
node_reporting -->|"reads records"| node_persistence
node_reporting -->|"gets programs"| node_enrollment
node_events -->|"stores state"| node_persistence
node_master_admin -.->|"manages workforce"| node_ai_workforce
node_master_admin -.->|"configures workflows"| node_workflow
node_email_center -.->|"uses operations"| node_email_service
node_email_service -.->|"dispatches through"| node_email_dispatch
node_email_dispatch -->|"records dispatch"| node_persistence
node_email_dispatch -.->|"uses approvals"| node_identity
node_identity -->|"uses adapter"| node_persistence
node_persistence -.->|"persists data"| node_db
node_funding_service -->|"uses domain types"| node_types
node_enrollment -.->|"uses domain types"| node_types

click node_app "https://github.com/ophireumtechnology/phumulani/blob/main/src/App.tsx"
click node_member_portal "https://github.com/ophireumtechnology/phumulani/blob/main/src/components/portal/MemberSelfServiceSection.tsx"
click node_community_view "https://github.com/ophireumtechnology/phumulani/blob/main/src/views/CommunityPortalView.tsx"
click node_service_delivery "https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/phase35/IntegratedServiceDeliveryTab.tsx"
click node_casework "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/memberCaseworkerService.ts"
click node_enrollment "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/programEnrollmentService.ts"
click node_programs "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/communityProgramsService.ts"
click node_master_admin "https://github.com/ophireumtechnology/phumulani/blob/main/src/views/MasterAdministratorView.tsx"
click node_funding_ui "https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/funding/FundraisingPipelinesTab.tsx"
click node_funding_service "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/fundingCommandService.ts"
click node_fundraising "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/fundraisingService.ts"
click node_impact "https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/ProgramImpactTab.tsx"
click node_reporting "https://github.com/ophireumtechnology/phumulani/blob/main/src/server/operationalReportingService.ts"
click node_events "https://github.com/ophireumtechnology/phumulani/blob/main/src/server/operationalEventService.ts"
click node_ai_workforce "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/unifiedAiWorkforceService.ts"
click node_workflow "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/workflowAutomationEngine.ts"
click node_email_center "https://github.com/ophireumtechnology/phumulani/blob/main/src/views/EmailCommandCenterView.tsx"
click node_email_service "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/emailEnterpriseService.ts"
click node_email_dispatch "https://github.com/ophireumtechnology/phumulani/blob/main/src/email/services/EmailDispatchService.ts"
click node_identity "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/authSecurityService.ts"
click node_db "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/db.ts"
click node_persistence "https://github.com/ophireumtechnology/phumulani/blob/main/src/services/postgresPersistenceAdapter.ts"
click node_types "https://github.com/ophireumtechnology/phumulani/tree/main/src/types"

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_member_portal,node_community_view,node_email_center toneBlue
class node_service_delivery,node_casework,node_enrollment,node_programs toneAmber
class node_funding_ui,node_funding_service,node_fundraising,node_impact toneMint
class node_master_admin,node_reporting,node_events,node_ai_workforce,node_workflow,node_email_service,node_email_dispatch toneRose
class node_identity,node_db,node_persistence,node_types,node_visitor toneIndigo
```

## Components

### User Experience

- [Application shell](https://github.com/ophireumtechnology/phumulani/blob/main/src/App.tsx): `src/App.tsx`
- [Member self-service](https://github.com/ophireumtechnology/phumulani/blob/main/src/components/portal/MemberSelfServiceSection.tsx): `src/components/portal/MemberSelfServiceSection.tsx`
- [Community portal](https://github.com/ophireumtechnology/phumulani/blob/main/src/views/CommunityPortalView.tsx): `src/views/CommunityPortalView.tsx`
- [Email command center](https://github.com/ophireumtechnology/phumulani/blob/main/src/views/EmailCommandCenterView.tsx): `src/views/EmailCommandCenterView.tsx`

### Community Services

- [Service delivery](https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/phase35/IntegratedServiceDeliveryTab.tsx): `src/components/masterAdmin/phase35/IntegratedServiceDeliveryTab.tsx`
- [Member casework](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/memberCaseworkerService.ts): `src/services/memberCaseworkerService.ts`
- [Program enrollment](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/programEnrollmentService.ts): `src/services/programEnrollmentService.ts`
- [Community programs](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/communityProgramsService.ts): `src/services/communityProgramsService.ts`

### Funding & Impact

- [Funding command center](https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/funding/FundraisingPipelinesTab.tsx): `src/components/masterAdmin/funding/FundraisingPipelinesTab.tsx`
- [Funding management](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/fundingCommandService.ts): `src/services/fundingCommandService.ts`
- [Fundraising CRM](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/fundraisingService.ts): `src/services/fundraisingService.ts`
- [MEAL & impact](https://github.com/ophireumtechnology/phumulani/blob/main/src/components/masterAdmin/ProgramImpactTab.tsx): `src/components/masterAdmin/ProgramImpactTab.tsx`

### Administration & AI

- [Master administration](https://github.com/ophireumtechnology/phumulani/blob/main/src/views/MasterAdministratorView.tsx): `src/views/MasterAdministratorView.tsx`
- [Operational reporting](https://github.com/ophireumtechnology/phumulani/blob/main/src/server/operationalReportingService.ts): `src/server/operationalReportingService.ts`
- [Events & safeguarding](https://github.com/ophireumtechnology/phumulani/blob/main/src/server/operationalEventService.ts): `src/server/operationalEventService.ts`
- [AI workforce](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/unifiedAiWorkforceService.ts): `src/services/unifiedAiWorkforceService.ts`
- [Workflow automation](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/workflowAutomationEngine.ts): `src/services/workflowAutomationEngine.ts`
- [Email operations](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/emailEnterpriseService.ts): `src/services/emailEnterpriseService.ts`
- [Email dispatch](https://github.com/ophireumtechnology/phumulani/blob/main/src/email/services/EmailDispatchService.ts): `src/email/services/EmailDispatchService.ts`

### Platform Services

- [Authentication & access](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/authSecurityService.ts): `src/services/authSecurityService.ts`
- [Client data service](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/db.ts): `src/services/db.ts`
- [PostgreSQL persistence](https://github.com/ophireumtechnology/phumulani/blob/main/src/services/postgresPersistenceAdapter.ts): `src/services/postgresPersistenceAdapter.ts`
- [Domain types](https://github.com/ophireumtechnology/phumulani/tree/main/src/types): `src/types`

### Other components

- **Community member**

## Connections

- Community member → Application shell: opens (evidence: `src/App.tsx`)
- Application shell → Community portal: renders (evidence: `src/App.tsx`)
- Application shell → Client data service: subscribes (evidence: `src/App.tsx`)
- Community portal → Member self-service: presents
- Member self-service → Program enrollment: requests enrollment (evidence: `src/components/portal/MemberSelfServiceSection.tsx`)
- Member self-service → Client data service: reads and updates (evidence: `src/components/portal/MemberSelfServiceSection.tsx`)
- Member self-service → Service delivery: tracks services
- Service delivery → Member casework: coordinates
- Service delivery → Community programs: uses programs
- Program enrollment → Client data service: uses storage (evidence: `src/services/programEnrollmentService.ts`)
- Master administration → Funding command center: exposes funding
- Funding command center → Funding management: calls (evidence: `src/components/masterAdmin/funding/FundraisingPipelinesTab.tsx`)
- Funding management → Client data service: uses storage (evidence: `src/services/fundingCommandService.ts`)
- Master administration → MEAL & impact: exposes impact
- Master administration → Operational reporting: provides reports
- Operational reporting → PostgreSQL persistence: reads records (evidence: `src/server/operationalReportingService.ts`)
- Operational reporting → Program enrollment: gets programs (evidence: `src/server/operationalReportingService.ts`)
- Events & safeguarding → PostgreSQL persistence: stores state (evidence: `src/server/operationalEventService.ts`)
- Master administration → AI workforce: manages workforce
- Master administration → Workflow automation: configures workflows
- Email command center → Email operations: uses operations
- Email operations → Email dispatch: dispatches through
- Email dispatch → PostgreSQL persistence: records dispatch (evidence: `src/email/services/EmailDispatchService.ts`)
- Email dispatch → Authentication & access: uses approvals
- Authentication & access → PostgreSQL persistence: uses adapter (evidence: `src/services/authSecurityService.ts`)
- PostgreSQL persistence → Client data service: persists data
- Funding management → Domain types: uses domain types (evidence: `src/services/fundingCommandService.ts`)
- Program enrollment → Domain types: uses domain types (evidence: `src/services/programEnrollmentService.ts`)
