# coker91/credit-hp architecture

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

- Interactive diagram: https://gitdiagram.com/coker91/credit-hp
- Repository: https://github.com/coker91/credit-hp

## Overview

Credit HP is a Laravel/Filament application for managing phone-installment contracts and monitoring collections, capital, and profit. Operators manage customers, products, guarantors, contracts, and payments; installment schedules and payment status feed the monitoring matrix and overdue views. The README documents WhatsApp reminders through Evolution API, with a Fonnte fallback visible in the sampled service. The graph reflects documented capabilities and sampled service behavior; unsampled resource and widget wiring is not inferred.

Main entry points: [`app/Providers/Filament/AdminPanelProvider.php`](https://github.com/coker91/credit-hp/blob/main/app/Providers/Filament/AdminPanelProvider.php) (Admin Panel), [`app/Services/WaService.php`](https://github.com/coker91/credit-hp/blob/main/app/Services/WaService.php) (WhatsApp Sender), [`app/Filament/Resources/ContractResource.php`](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource.php) (Contract Management), [`app/Filament/Resources/PaymentResource.php`](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/PaymentResource.php) (Payment Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operations["Admin Operations"]
  node_panel["Admin Panel"]
  node_customers["Customer Management"]
  node_products["Product Management"]
  node_guarantors["Guarantor Management"]
  node_users["User Management<br/>[UserResource.php]"]
end

subgraph group_collections["Installment Collections"]
  node_contracts["Contract Management"]
  node_contract_pages["Contract Pages<br/>[CreateContract.php]"]
  node_payments["Payment Management"]
  node_payment_pages["Payment Pages<br/>[CreatePayment.php]"]
  node_payment_relation["Contract Payments"]
end

subgraph group_monitoring["Monitoring"]
  node_matrix["Installment Matrix"]
  node_matrix_view["Matrix Display"]
  node_matrix_column["Installment Statuses"]
  node_stats["Business Metrics"]
  node_cashflow["Cashflow Chart"]
  node_overdue["Overdue Monitor"]
end

subgraph group_domain["Domain Services"]
  node_installments["Schedule Service"]
  node_wa_service["WhatsApp Sender<br/>[WaService.php]"]
  node_contracts_model["Contract Records<br/>[Contract.php]"]
  node_payments_model["Payment Records<br/>[Payment.php]"]
  node_customers_model["Customer Records<br/>[Customer.php]"]
  node_products_model["Product Records<br/>[Product.php]"]
  node_guarantors_model["Guarantor Records<br/>[Guarantor.php]"]
end

node_operator(("Admin Operator"))
node_evolution{{"Evolution API"}}
node_fonnte{{"Fonnte Gateway"}}

node_operator -->|"uses"| node_panel
node_panel -->|"offers"| node_customers
node_panel -->|"offers"| node_products
node_panel -->|"offers"| node_guarantors
node_panel -->|"offers"| node_users
node_panel -->|"offers"| node_contracts
node_panel -->|"offers"| node_payments
node_panel -->|"offers"| node_matrix
node_contracts -->|"provides pages"| node_contract_pages
node_payments -->|"provides pages"| node_payment_pages
node_contracts -->|"manages payments"| node_payment_relation
node_payment_relation -->|"updates"| node_payments_model
node_installments -->|"creates schedules"| node_payments_model
node_matrix -->|"renders"| node_matrix_view
node_matrix_view -->|"displays"| node_matrix_column
node_matrix -->|"sends reminders"| node_wa_service
node_payments -->|"sends reminders"| node_wa_service
node_wa_service -->|"sends message"| node_evolution
node_wa_service -.->|"fallback send"| node_fonnte

click node_panel "https://github.com/coker91/credit-hp/blob/main/app/Providers/Filament/AdminPanelProvider.php"
click node_customers "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/CustomerResource.php"
click node_products "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ProductResource.php"
click node_guarantors "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/GuarantorResource.php"
click node_users "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/UserResource.php"
click node_contracts "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource.php"
click node_contract_pages "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource/Pages/CreateContract.php"
click node_payments "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/PaymentResource.php"
click node_payment_pages "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/PaymentResource/Pages/CreatePayment.php"
click node_payment_relation "https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource/RelationManagers/PaymentsRelationManager.php"
click node_matrix "https://github.com/coker91/credit-hp/blob/main/app/Filament/Pages/MatrixCicilanPage.php"
click node_matrix_view "https://github.com/coker91/credit-hp/blob/main/resources/views/filament/pages/matrix-cicilan-page.blade.php"
click node_matrix_column "https://github.com/coker91/credit-hp/blob/main/resources/views/filament/tables/columns/installment-matrix.blade.php"
click node_stats "https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/StatsOverviewWidget.php"
click node_cashflow "https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/CashflowChartWidget.php"
click node_overdue "https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/LatestOverdueWidget.php"
click node_installments "https://github.com/coker91/credit-hp/blob/main/app/Services/InstallmentService.php"
click node_wa_service "https://github.com/coker91/credit-hp/blob/main/app/Services/WaService.php"
click node_contracts_model "https://github.com/coker91/credit-hp/blob/main/app/Models/Contract.php"
click node_payments_model "https://github.com/coker91/credit-hp/blob/main/app/Models/Payment.php"
click node_customers_model "https://github.com/coker91/credit-hp/blob/main/app/Models/Customer.php"
click node_products_model "https://github.com/coker91/credit-hp/blob/main/app/Models/Product.php"
click node_guarantors_model "https://github.com/coker91/credit-hp/blob/main/app/Models/Guarantor.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_panel,node_customers,node_products,node_guarantors,node_users toneBlue
class node_contracts,node_contract_pages,node_payments,node_payment_pages,node_payment_relation toneAmber
class node_matrix,node_matrix_view,node_matrix_column,node_stats,node_cashflow,node_overdue,node_evolution toneMint
class node_installments,node_wa_service,node_contracts_model,node_payments_model,node_customers_model,node_products_model,node_guarantors_model toneRose
class node_operator,node_fonnte toneIndigo
```

## Components

### Admin Operations

- [Admin Panel](https://github.com/coker91/credit-hp/blob/main/app/Providers/Filament/AdminPanelProvider.php): `app/Providers/Filament/AdminPanelProvider.php`
- [Customer Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/CustomerResource.php): `app/Filament/Resources/CustomerResource.php`
- [Product Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ProductResource.php): `app/Filament/Resources/ProductResource.php`
- [Guarantor Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/GuarantorResource.php): `app/Filament/Resources/GuarantorResource.php`
- [User Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/UserResource.php): `app/Filament/Resources/UserResource.php`

### Installment Collections

- [Contract Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource.php): `app/Filament/Resources/ContractResource.php`
- [Contract Pages](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource/Pages/CreateContract.php): `app/Filament/Resources/ContractResource/Pages/CreateContract.php`
- [Payment Management](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/PaymentResource.php): `app/Filament/Resources/PaymentResource.php`
- [Payment Pages](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/PaymentResource/Pages/CreatePayment.php): `app/Filament/Resources/PaymentResource/Pages/CreatePayment.php`
- [Contract Payments](https://github.com/coker91/credit-hp/blob/main/app/Filament/Resources/ContractResource/RelationManagers/PaymentsRelationManager.php): `app/Filament/Resources/ContractResource/RelationManagers/PaymentsRelationManager.php`

### Monitoring

- [Installment Matrix](https://github.com/coker91/credit-hp/blob/main/app/Filament/Pages/MatrixCicilanPage.php): `app/Filament/Pages/MatrixCicilanPage.php`
- [Matrix Display](https://github.com/coker91/credit-hp/blob/main/resources/views/filament/pages/matrix-cicilan-page.blade.php): `resources/views/filament/pages/matrix-cicilan-page.blade.php`
- [Installment Statuses](https://github.com/coker91/credit-hp/blob/main/resources/views/filament/tables/columns/installment-matrix.blade.php): `resources/views/filament/tables/columns/installment-matrix.blade.php`
- [Business Metrics](https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/StatsOverviewWidget.php): `app/Filament/Widgets/StatsOverviewWidget.php`
- [Cashflow Chart](https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/CashflowChartWidget.php): `app/Filament/Widgets/CashflowChartWidget.php`
- [Overdue Monitor](https://github.com/coker91/credit-hp/blob/main/app/Filament/Widgets/LatestOverdueWidget.php): `app/Filament/Widgets/LatestOverdueWidget.php`

### Domain Services

- [Schedule Service](https://github.com/coker91/credit-hp/blob/main/app/Services/InstallmentService.php): `app/Services/InstallmentService.php`
- [WhatsApp Sender](https://github.com/coker91/credit-hp/blob/main/app/Services/WaService.php): `app/Services/WaService.php`
- [Contract Records](https://github.com/coker91/credit-hp/blob/main/app/Models/Contract.php): `app/Models/Contract.php`
- [Payment Records](https://github.com/coker91/credit-hp/blob/main/app/Models/Payment.php): `app/Models/Payment.php`
- [Customer Records](https://github.com/coker91/credit-hp/blob/main/app/Models/Customer.php): `app/Models/Customer.php`
- [Product Records](https://github.com/coker91/credit-hp/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Guarantor Records](https://github.com/coker91/credit-hp/blob/main/app/Models/Guarantor.php): `app/Models/Guarantor.php`

### Other components

- **Admin Operator**
- **Evolution API**
- **Fonnte Gateway**

## Connections

- Admin Operator → Admin Panel: uses
- Admin Panel → Customer Management: offers
- Admin Panel → Product Management: offers
- Admin Panel → Guarantor Management: offers
- Admin Panel → User Management: offers
- Admin Panel → Contract Management: offers
- Admin Panel → Payment Management: offers
- Admin Panel → Installment Matrix: offers
- Contract Management → Contract Pages: provides pages
- Payment Management → Payment Pages: provides pages
- Contract Management → Contract Payments: manages payments
- Contract Payments → Payment Records: updates
- Schedule Service → Payment Records: creates schedules
- Installment Matrix → Matrix Display: renders
- Matrix Display → Installment Statuses: displays
- Installment Matrix → WhatsApp Sender: sends reminders
- Payment Management → WhatsApp Sender: sends reminders
- WhatsApp Sender → Evolution API: sends message
- WhatsApp Sender → Fonnte Gateway: fallback send
