# gabtolomea/lgutreasury architecture

> Architecture diagram of the GitHub repository gabtolomea/lgutreasury, 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/gabtolomea/lgutreasury
- Repository: https://github.com/gabtolomea/lgutreasury

## Overview

LGUTreasury is an ASP.NET Core treasury and revenue-collection application. Its central workflow records a payment for a payee, associates collection line items with revenue types, and persists the result; the app also supports record review, dashboards, reports, revenue setup, user administration, and recurring bills for long-term payees. Controller excerpts show database access, payment persistence, dashboard aggregation, and report generation. Other controller behavior is represented from the SOURCE INDEX; the README provides no further capability details.

Main entry points: [`Controllers/RecordController.cs`](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/RecordController.cs) (Payment records), [`Data/ApplicationDbContext.cs`](https://github.com/gabtolomea/lgutreasury/blob/main/Data/ApplicationDbContext.cs) (Application database), [`Controllers/LongTermTenant.cs`](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/LongTermTenant.cs) (Long-term billing), [`Models/PaymentRecord.cs`](https://github.com/gabtolomea/lgutreasury/blob/main/Models/PaymentRecord.cs) (Payment data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Payment Collection"]
  node_records["Payment records"]
  node_payees["Payee directory<br/>[Payee.cs]"]
  node_transactions["Payment data<br/>[PaymentRecord.cs]"]
  node_lineitems["Collection line items<br/>[RecordLineItem.cs]"]
  node_requests["Edit requests<br/>[Editrequests.cs]"]
  node_deleted["Deleted records<br/>[DeleteRecord.cs]"]
end

subgraph group_oversight["Reporting &amp; Oversight"]
  node_dashboard["Dashboard analytics<br/>[HomeController.cs]"]
  node_analytics["Revenue analytics"]
  node_reporting["Report generation"]
  node_reportlog["Report history<br/>[ReportLog.cs]"]
end

subgraph group_configuration["Revenue &amp; Accounts"]
  node_accounts["User accounts"]
  node_administration["User administration<br/>[AdminController.cs]"]
  node_revenueadmin["Revenue setup"]
  node_revenuetypes["Revenue definitions<br/>[RevenueType.cs]"]
end

subgraph group_billing["Recurring Billing"]
  node_billing["Long-term billing<br/>[LongTermTenant.cs]"]
  node_tenants["Long-term payees<br/>[LongTermPayee.cs]"]
  node_billingtypes["Tenant billing types"]
  node_billingoptions["Billing options"]
  node_monthlybills["Monthly bills<br/>[MonthlyBill.cs]"]
end

node_staff(("Treasury staff"))
node_store[("Application database")]

node_records -->|"reads and writes"| node_store
node_records -->|"creates and searches"| node_payees
node_records -->|"records payments"| node_transactions
node_records -->|"adds line items"| node_lineitems
node_records -->|"handles requests"| node_requests
node_records -->|"archives records"| node_deleted
node_dashboard -->|"queries aggregates"| node_store
node_analytics -->|"queries revenue"| node_store
node_reporting -->|"loads and logs"| node_store
node_reporting -->|"records history"| node_reportlog
node_accounts -->|"accesses accounts"| node_store
node_administration -->|"manages accounts"| node_store
node_revenueadmin -->|"manages revenue"| node_store
node_billing -->|"manages billing"| node_store
node_billing -->|"manages tenants"| node_tenants
node_billing -->|"configures billing"| node_billingtypes
node_billing -->|"uses options"| node_billingoptions
node_billing -->|"manages bills"| node_monthlybills
node_transactions -->|"references payee"| node_payees
node_transactions -->|"has line items"| node_lineitems
node_tenants -->|"has billing types"| node_billingtypes
node_tenants -->|"has monthly bills"| node_monthlybills
node_billingtypes -->|"has bills"| node_monthlybills
node_lineitems -->|"references type"| node_revenuetypes
node_revenueadmin -->|"configures types"| node_revenuetypes
node_staff -.->|"uses"| node_records
node_staff -.->|"views"| node_dashboard
node_staff -.->|"generates reports"| node_reporting

click node_records "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/RecordController.cs"
click node_payees "https://github.com/gabtolomea/lgutreasury/blob/main/Models/Payee.cs"
click node_transactions "https://github.com/gabtolomea/lgutreasury/blob/main/Models/PaymentRecord.cs"
click node_lineitems "https://github.com/gabtolomea/lgutreasury/blob/main/Models/RecordLineItem.cs"
click node_requests "https://github.com/gabtolomea/lgutreasury/blob/main/Models/Editrequests.cs"
click node_deleted "https://github.com/gabtolomea/lgutreasury/blob/main/Models/DeleteRecord.cs"
click node_dashboard "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/HomeController.cs"
click node_analytics "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AnalyticsController.cs"
click node_reporting "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/Reportcontroller.cs"
click node_reportlog "https://github.com/gabtolomea/lgutreasury/blob/main/Models/ReportLog.cs"
click node_accounts "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AccountController.cs"
click node_administration "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AdminController.cs"
click node_revenueadmin "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/Revenuetypecontoller.cs"
click node_revenuetypes "https://github.com/gabtolomea/lgutreasury/blob/main/Models/RevenueType.cs"
click node_billing "https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/LongTermTenant.cs"
click node_tenants "https://github.com/gabtolomea/lgutreasury/blob/main/Models/LongTermPayee.cs"
click node_billingtypes "https://github.com/gabtolomea/lgutreasury/blob/main/Models/AccountBillingType.cs"
click node_billingoptions "https://github.com/gabtolomea/lgutreasury/blob/main/Models/BillingTypeOption.cs"
click node_monthlybills "https://github.com/gabtolomea/lgutreasury/blob/main/Models/MonthlyBill.cs"
click node_store "https://github.com/gabtolomea/lgutreasury/blob/main/Data/ApplicationDbContext.cs"

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_records,node_payees,node_transactions,node_lineitems,node_requests,node_deleted toneBlue
class node_dashboard,node_analytics,node_reporting,node_reportlog,node_store toneAmber
class node_accounts,node_administration,node_revenueadmin,node_revenuetypes toneMint
class node_billing,node_tenants,node_billingtypes,node_billingoptions,node_monthlybills toneRose
class node_staff toneIndigo
```

## Components

### Payment Collection

- [Payment records](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/RecordController.cs): `Controllers/RecordController.cs`
- [Payee directory](https://github.com/gabtolomea/lgutreasury/blob/main/Models/Payee.cs): `Models/Payee.cs`
- [Payment data](https://github.com/gabtolomea/lgutreasury/blob/main/Models/PaymentRecord.cs): `Models/PaymentRecord.cs`
- [Collection line items](https://github.com/gabtolomea/lgutreasury/blob/main/Models/RecordLineItem.cs): `Models/RecordLineItem.cs`
- [Edit requests](https://github.com/gabtolomea/lgutreasury/blob/main/Models/Editrequests.cs): `Models/Editrequests.cs`
- [Deleted records](https://github.com/gabtolomea/lgutreasury/blob/main/Models/DeleteRecord.cs): `Models/DeleteRecord.cs`

### Reporting & Oversight

- [Dashboard analytics](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Revenue analytics](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AnalyticsController.cs): `Controllers/AnalyticsController.cs`
- [Report generation](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/Reportcontroller.cs): `Controllers/Reportcontroller.cs`
- [Report history](https://github.com/gabtolomea/lgutreasury/blob/main/Models/ReportLog.cs): `Models/ReportLog.cs`

### Revenue & Accounts

- [User accounts](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [User administration](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/AdminController.cs): `Controllers/AdminController.cs`
- [Revenue setup](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/Revenuetypecontoller.cs): `Controllers/Revenuetypecontoller.cs`
- [Revenue definitions](https://github.com/gabtolomea/lgutreasury/blob/main/Models/RevenueType.cs): `Models/RevenueType.cs`

### Recurring Billing

- [Long-term billing](https://github.com/gabtolomea/lgutreasury/blob/main/Controllers/LongTermTenant.cs): `Controllers/LongTermTenant.cs`
- [Long-term payees](https://github.com/gabtolomea/lgutreasury/blob/main/Models/LongTermPayee.cs): `Models/LongTermPayee.cs`
- [Tenant billing types](https://github.com/gabtolomea/lgutreasury/blob/main/Models/AccountBillingType.cs): `Models/AccountBillingType.cs`
- [Billing options](https://github.com/gabtolomea/lgutreasury/blob/main/Models/BillingTypeOption.cs): `Models/BillingTypeOption.cs`
- [Monthly bills](https://github.com/gabtolomea/lgutreasury/blob/main/Models/MonthlyBill.cs): `Models/MonthlyBill.cs`

### Other components

- **Treasury staff**
- [Application database](https://github.com/gabtolomea/lgutreasury/blob/main/Data/ApplicationDbContext.cs): `Data/ApplicationDbContext.cs`

## Connections

- Payment records → Application database: reads and writes (evidence: `Controllers/RecordController.cs`)
- Payment records → Payee directory: creates and searches (evidence: `Controllers/RecordController.cs`)
- Payment records → Payment data: records payments (evidence: `Controllers/RecordController.cs`)
- Payment records → Collection line items: adds line items (evidence: `Controllers/RecordController.cs`)
- Payment records → Edit requests: handles requests (evidence: `Controllers/RecordController.cs`)
- Payment records → Deleted records: archives records (evidence: `Controllers/RecordController.cs`)
- Dashboard analytics → Application database: queries aggregates (evidence: `Controllers/HomeController.cs`)
- Revenue analytics → Application database: queries revenue (evidence: `Controllers/AnalyticsController.cs`)
- Report generation → Application database: loads and logs (evidence: `Controllers/Reportcontroller.cs`)
- Report generation → Report history: records history (evidence: `Controllers/Reportcontroller.cs`)
- User accounts → Application database: accesses accounts (evidence: `Controllers/AccountController.cs`)
- User administration → Application database: manages accounts (evidence: `Controllers/AdminController.cs`)
- Revenue setup → Application database: manages revenue (evidence: `Controllers/Revenuetypecontoller.cs`)
- Long-term billing → Application database: manages billing (evidence: `Controllers/LongTermTenant.cs`)
- Long-term billing → Long-term payees: manages tenants (evidence: `Controllers/LongTermTenant.cs`)
- Long-term billing → Tenant billing types: configures billing (evidence: `Controllers/LongTermTenant.cs`)
- Long-term billing → Billing options: uses options (evidence: `Controllers/LongTermTenant.cs`)
- Long-term billing → Monthly bills: manages bills (evidence: `Controllers/LongTermTenant.cs`)
- Payment data → Payee directory: references payee (evidence: `Models/PaymentRecord.cs`)
- Payment data → Collection line items: has line items (evidence: `Models/PaymentRecord.cs`)
- Long-term payees → Tenant billing types: has billing types (evidence: `Models/LongTermPayee.cs`)
- Long-term payees → Monthly bills: has monthly bills (evidence: `Models/LongTermPayee.cs`)
- Tenant billing types → Monthly bills: has bills (evidence: `Models/AccountBillingType.cs`)
- Collection line items → Revenue definitions: references type (evidence: `Models/RecordLineItem.cs`)
- Revenue setup → Revenue definitions: configures types (evidence: `Controllers/Revenuetypecontoller.cs`)
- Treasury staff → Payment records: uses
- Treasury staff → Dashboard analytics: views
- Treasury staff → Report generation: generates reports
