# lestonggg12/philamlife architecture

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

- Interactive diagram: https://gitdiagram.com/lestonggg12/philamlife
- Repository: https://github.com/lestonggg12/philamlife

## Overview

PHILAM Village is a role-based homeowners-association management portal. Staff enter through the routed React application to manage homeowners, services, payments and receipts, financial records, reports, and administration; application data is accessed through Supabase. Shared organization settings, pagination, and receipt-rendering modules support these workflows. The tree and excerpts establish the routes and several dependencies, but do not show every page’s runtime calls, so links for unsampled behavior are left unverified or omitted.

Main entry points: [`client/src/App.jsx`](https://github.com/lestonggg12/philamlife/blob/main/client/src/App.jsx) (Routes and access), [`client/src/lib/supabaseClient.js`](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/supabaseClient.js) (Supabase client), [`client/src/pages/PaymentsPage.jsx`](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/PaymentsPage.jsx) (Payments), [`client/src/pages/OfficialReceiptsPage.jsx`](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/OfficialReceiptsPage.jsx) (Official receipts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application shell"]
  node_router["Routes and access<br/>[App.jsx]"]
end

subgraph group_community["Community operations"]
  node_homeowners["Homeowners<br/>[HomeownersPage.jsx]"]
  node_contacts["Contact manager"]
  node_services["Service management"]
  node_calendar["Event calendar"]
  node_documents["Document library"]
end

subgraph group_finance["Finance workflows"]
  node_payments["Payments<br/>[PaymentsPage.jsx]"]
  node_receipts["Official receipts"]
  node_ledger["Ledger<br/>[LedgerPage.jsx]"]
  node_overdue["Overdue accounts"]
  node_expenses["Treasurer expenses"]
  node_revenue["Service revenue"]
end

subgraph group_records["Reports and records"]
  node_reports["Reports<br/>[ReportsPage.jsx]"]
  node_activity["Activity log"]
  node_admin["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_treasurer["Treasurer dashboard"]
  node_system["System settings"]
end

subgraph group_shared["Shared services"]
  node_client["Supabase client<br/>[supabaseClient.js]"]
  node_org["Organization context"]
  node_config["Organization defaults<br/>[organization.js]"]
  node_fetchall["Full-table pagination<br/>[fetchAll.js]"]
  node_paged["Paged query helpers<br/>[pagedQuery.js]"]
  node_receiptmodel["Receipt model<br/>[receiptModel.js]"]
  node_receiptview["Receipt sheet<br/>[ReceiptSheet.jsx]"]
  node_print["Receipt printing<br/>[printReceipt.jsx]"]
end

node_staff(("Staff user"))
node_data[("Supabase data service")]

node_staff -->|"uses"| node_router
node_router -->|"routes to"| node_homeowners
node_router -->|"routes to"| node_contacts
node_router -->|"routes to"| node_services
node_router -->|"routes to"| node_calendar
node_router -->|"routes to"| node_documents
node_router -->|"routes to"| node_payments
node_router -->|"routes to"| node_receipts
node_router -->|"routes to"| node_ledger
node_router -->|"routes to"| node_overdue
node_router -->|"routes to"| node_expenses
node_router -->|"routes to"| node_revenue
node_router -.->|"routes to"| node_reports
node_router -.->|"routes to"| node_activity
node_router -->|"routes to"| node_admin
node_router -->|"routes to"| node_treasurer
node_router -->|"routes to"| node_system
node_client -->|"connects"| node_data
node_org -->|"reads settings"| node_client
node_org -->|"uses defaults"| node_config
node_contacts -->|"queries"| node_client
node_contacts -->|"fetches pages"| node_fetchall
node_services -->|"queries"| node_client
node_services -->|"fetches pages"| node_fetchall
node_homeowners -->|"uses"| node_client
node_calendar -->|"uses"| node_client
node_payments -->|"uses"| node_client
node_payments -->|"uses"| node_fetchall
node_payments -->|"uses"| node_receiptmodel
node_payments -->|"uses"| node_print
node_receipts -->|"uses"| node_client
node_receipts -->|"uses"| node_receiptmodel
node_receipts -->|"uses"| node_print
node_receipts -->|"uses"| node_paged
node_print -->|"renders"| node_receiptview
node_admin -->|"uses"| node_client
node_admin -->|"uses"| node_fetchall
node_revenue -->|"uses"| node_client
node_paged -.->|"builds queries"| node_data
node_homeowners -.->|"accesses"| node_data
node_ledger -.->|"accesses"| node_data
node_overdue -.->|"accesses"| node_data
node_expenses -.->|"accesses"| node_data
node_reports -.->|"accesses"| node_data
node_activity -.->|"accesses"| node_data
node_system -.->|"accesses"| node_data

click node_router "https://github.com/lestonggg12/philamlife/blob/main/client/src/App.jsx"
click node_homeowners "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/HomeownersPage.jsx"
click node_contacts "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ContactManagerPage.jsx"
click node_services "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ServicesManagementPage.jsx"
click node_calendar "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/EventCalendarPage.jsx"
click node_documents "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/DocumentLibraryPage.jsx"
click node_payments "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/PaymentsPage.jsx"
click node_receipts "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/OfficialReceiptsPage.jsx"
click node_ledger "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/LedgerPage.jsx"
click node_overdue "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/OverdueAccountsPage.jsx"
click node_expenses "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerExpensesPage.jsx"
click node_revenue "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerServiceRevenuePage.jsx"
click node_reports "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ReportsPage.jsx"
click node_activity "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ActivityLogPage.jsx"
click node_admin "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/AdminDashboard.jsx"
click node_treasurer "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerDashboard.jsx"
click node_system "https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/SystemSettingsPage.jsx"
click node_client "https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/supabaseClient.js"
click node_org "https://github.com/lestonggg12/philamlife/blob/main/client/src/context/OrganizationContext.jsx"
click node_config "https://github.com/lestonggg12/philamlife/blob/main/client/src/config/organization.js"
click node_fetchall "https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/fetchAll.js"
click node_paged "https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/pagedQuery.js"
click node_receiptmodel "https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/receiptModel.js"
click node_receiptview "https://github.com/lestonggg12/philamlife/blob/main/client/src/components/ReceiptSheet.jsx"
click node_print "https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/printReceipt.jsx"

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_router,node_staff toneBlue
class node_homeowners,node_contacts,node_services,node_calendar,node_documents,node_data toneAmber
class node_payments,node_receipts,node_ledger,node_overdue,node_expenses,node_revenue toneMint
class node_reports,node_activity,node_admin,node_treasurer,node_system toneRose
class node_client,node_org,node_config,node_fetchall,node_paged,node_receiptmodel,node_receiptview,node_print toneIndigo
```

## Components

### Application shell

- [Routes and access](https://github.com/lestonggg12/philamlife/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Community operations

- [Homeowners](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/HomeownersPage.jsx): `client/src/pages/HomeownersPage.jsx`
- [Contact manager](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ContactManagerPage.jsx): `client/src/pages/ContactManagerPage.jsx`
- [Service management](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ServicesManagementPage.jsx): `client/src/pages/ServicesManagementPage.jsx`
- [Event calendar](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/EventCalendarPage.jsx): `client/src/pages/EventCalendarPage.jsx`
- [Document library](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/DocumentLibraryPage.jsx): `client/src/pages/DocumentLibraryPage.jsx`

### Finance workflows

- [Payments](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/PaymentsPage.jsx): `client/src/pages/PaymentsPage.jsx`
- [Official receipts](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/OfficialReceiptsPage.jsx): `client/src/pages/OfficialReceiptsPage.jsx`
- [Ledger](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/LedgerPage.jsx): `client/src/pages/LedgerPage.jsx`
- [Overdue accounts](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/OverdueAccountsPage.jsx): `client/src/pages/OverdueAccountsPage.jsx`
- [Treasurer expenses](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerExpensesPage.jsx): `client/src/pages/TreasurerExpensesPage.jsx`
- [Service revenue](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerServiceRevenuePage.jsx): `client/src/pages/TreasurerServiceRevenuePage.jsx`

### Reports and records

- [Reports](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ReportsPage.jsx): `client/src/pages/ReportsPage.jsx`
- [Activity log](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/ActivityLogPage.jsx): `client/src/pages/ActivityLogPage.jsx`
- [Admin dashboard](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/AdminDashboard.jsx): `client/src/pages/AdminDashboard.jsx`
- [Treasurer dashboard](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/TreasurerDashboard.jsx): `client/src/pages/TreasurerDashboard.jsx`
- [System settings](https://github.com/lestonggg12/philamlife/blob/main/client/src/pages/SystemSettingsPage.jsx): `client/src/pages/SystemSettingsPage.jsx`

### Shared services

- [Supabase client](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/supabaseClient.js): `client/src/lib/supabaseClient.js`
- [Organization context](https://github.com/lestonggg12/philamlife/blob/main/client/src/context/OrganizationContext.jsx): `client/src/context/OrganizationContext.jsx`
- [Organization defaults](https://github.com/lestonggg12/philamlife/blob/main/client/src/config/organization.js): `client/src/config/organization.js`
- [Full-table pagination](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/fetchAll.js): `client/src/lib/fetchAll.js`
- [Paged query helpers](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/pagedQuery.js): `client/src/lib/pagedQuery.js`
- [Receipt model](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/receiptModel.js): `client/src/lib/receiptModel.js`
- [Receipt sheet](https://github.com/lestonggg12/philamlife/blob/main/client/src/components/ReceiptSheet.jsx): `client/src/components/ReceiptSheet.jsx`
- [Receipt printing](https://github.com/lestonggg12/philamlife/blob/main/client/src/lib/printReceipt.jsx): `client/src/lib/printReceipt.jsx`

### Other components

- **Staff user**
- **Supabase data service**

## Connections

- Staff user → Routes and access: uses (evidence: `client/src/App.jsx`)
- Routes and access → Homeowners: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Contact manager: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Service management: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Event calendar: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Document library: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Payments: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Official receipts: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Ledger: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Overdue accounts: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Treasurer expenses: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Service revenue: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Reports: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Activity log: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Admin dashboard: routes to (evidence: `client/src/App.jsx`)
- Routes and access → Treasurer dashboard: routes to (evidence: `client/src/App.jsx`)
- Routes and access → System settings: routes to (evidence: `client/src/App.jsx`)
- Supabase client → Supabase data service: connects (evidence: `client/src/lib/supabaseClient.js`)
- Organization context → Supabase client: reads settings (evidence: `client/src/context/OrganizationContext.jsx`)
- Organization context → Organization defaults: uses defaults (evidence: `client/src/context/OrganizationContext.jsx`)
- Contact manager → Supabase client: queries (evidence: `client/src/pages/ContactManagerPage.jsx`)
- Contact manager → Full-table pagination: fetches pages (evidence: `client/src/pages/ContactManagerPage.jsx`)
- Service management → Supabase client: queries (evidence: `client/src/pages/ServicesManagementPage.jsx`)
- Service management → Full-table pagination: fetches pages (evidence: `client/src/pages/ServicesManagementPage.jsx`)
- Homeowners → Supabase client: uses (evidence: `client/src/pages/HomeownersPage.jsx`)
- Event calendar → Supabase client: uses (evidence: `client/src/pages/EventCalendarPage.jsx`)
- Payments → Supabase client: uses (evidence: `client/src/pages/PaymentsPage.jsx`)
- Payments → Full-table pagination: uses (evidence: `client/src/pages/PaymentsPage.jsx`)
- Payments → Receipt model: uses (evidence: `client/src/pages/PaymentsPage.jsx`)
- Payments → Receipt printing: uses (evidence: `client/src/pages/PaymentsPage.jsx`)
- Official receipts → Supabase client: uses (evidence: `client/src/pages/OfficialReceiptsPage.jsx`)
- Official receipts → Receipt model: uses (evidence: `client/src/pages/OfficialReceiptsPage.jsx`)
- Official receipts → Receipt printing: uses (evidence: `client/src/pages/OfficialReceiptsPage.jsx`)
- Official receipts → Paged query helpers: uses (evidence: `client/src/pages/OfficialReceiptsPage.jsx`)
- Receipt printing → Receipt sheet: renders (evidence: `client/src/lib/printReceipt.jsx`)
- Admin dashboard → Supabase client: uses (evidence: `client/src/pages/AdminDashboard.jsx`)
- Admin dashboard → Full-table pagination: uses (evidence: `client/src/pages/AdminDashboard.jsx`)
- Service revenue → Supabase client: uses (evidence: `client/src/pages/TreasurerServiceRevenuePage.jsx`)
- Paged query helpers → Supabase data service: builds queries
- Homeowners → Supabase data service: accesses
- Ledger → Supabase data service: accesses
- Overdue accounts → Supabase data service: accesses
- Treasurer expenses → Supabase data service: accesses
- Reports → Supabase data service: accesses
- Activity log → Supabase data service: accesses
- System settings → Supabase data service: accesses
