# rafiahmadfairuz/bumcash architecture

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

- Interactive diagram: https://gitdiagram.com/rafiahmadfairuz/bumcash
- Repository: https://github.com/rafiahmadfairuz/bumcash

## Overview

BUMCash is a Laravel web application for resident billing and payments alongside BUMDes service operations and financial management. Residents browse services, request or receive bills, submit payment, and view receipts; managers administer services, process variable-bill requests, verify payments, and review cash-flow and financial reports. The source excerpts substantiate the resident billing flow, monthly subscriptions, variable requests, and PPOB provider selection. Managerial reporting, business units, and account flows are represented from the source index and tree; their finer interactions are not fully sampled.

Main entry points: [`app/Http/Controllers/PembayaranWargaController.php`](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/PembayaranWargaController.php) (Resident billing), [`app/Services/LaporanKeuanganService.php`](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LaporanKeuanganService.php) (Financial reports), [`routes/web.php`](https://github.com/rafiahmadfairuz/bumcash/blob/main/routes/web.php) (Web routes), [`app/Services/LayananTransaksiService.php`](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LayananTransaksiService.php) (Service transactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and routing"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication"]
  node_role["Role access<br/>[RoleMiddleware.php]"]
  node_user[("User accounts<br/>[User.php]")]
end

subgraph group_billing["Resident billing"]
  node_residentbilling["Resident billing"]
  node_serviceflow["Service transactions"]
  node_bill[("Bills<br/>[Tagihan.php]")]
  node_service[("Services<br/>[Layanan.php]")]
  node_subscription[("Subscriptions")]
  node_variable[("Variable requests")]
  node_payments[("Payment records")]
  node_residentviews["Resident screens"]
end

subgraph group_operations["Management operations"]
  node_managercontroller["Manager operations"]
  node_businesscontroller["Business units"]
  node_unit[("Business units<br/>[UnitUsaha.php]")]
  node_assets[("Assets and capital<br/>[AsetInventaris.php]")]
  node_capital[("Capital stakes")]
  node_managerdash["Manager screens"]
end

subgraph group_finance["Financial records"]
  node_cashflow[("Cash flow<br/>[ArusKas.php]")]
  node_cashservice["Cash service<br/>[ArusKasService.php]"]
  node_report["Financial reports"]
  node_dashboard["Finance dashboard"]
end

subgraph group_providers["PPOB integrations"]
  node_ppobmanager["PPOB manager<br/>[PpobManager.php]"]
  node_provider["PPOB provider<br/>[PpobProvider.php]"]
  node_sandbox["Sandbox provider"]
  node_digiflazz["Digiflazz provider"]
end

node_resident(("Resident"))
node_manager(("Manager"))
node_externalppob{{"PPOB service"}}

node_resident -->|"requests pages"| node_routes
node_manager -->|"requests pages"| node_routes
node_routes -->|"routes auth"| node_auth
node_routes -->|"routes billing"| node_residentbilling
node_routes -->|"routes management"| node_managercontroller
node_routes -->|"routes units"| node_businesscontroller
node_routes -->|"routes finance"| node_dashboard
node_residentbilling -->|"renders pages"| node_residentviews
node_residentbilling -->|"delegates orders"| node_serviceflow
node_residentbilling -->|"reads and creates"| node_bill
node_residentbilling -->|"reads catalog"| node_service
node_residentbilling -->|"reads subscriptions"| node_subscription
node_residentbilling -->|"reads requests"| node_variable
node_residentbilling -->|"creates payments"| node_payments
node_serviceflow -->|"creates bills"| node_bill
node_serviceflow -->|"creates subscriptions"| node_subscription
node_serviceflow -->|"processes requests"| node_variable
node_serviceflow -->|"loads services"| node_service
node_serviceflow -->|"uses provider manager"| node_ppobmanager
node_managercontroller -.->|"renders management"| node_managerdash
node_managercontroller -->|"delegates processing"| node_serviceflow
node_managercontroller -->|"records cash"| node_cashservice
node_managercontroller -->|"verifies payments"| node_payments
node_managercontroller -->|"manages bills"| node_bill
node_businesscontroller -->|"manages units"| node_unit
node_businesscontroller -->|"manages services"| node_service
node_businesscontroller -->|"reads bills"| node_bill
node_cashservice -->|"records entries"| node_cashflow
node_dashboard -->|"requests reports"| node_report
node_report -->|"reads cash flow"| node_cashflow
node_report -->|"reads assets"| node_assets
node_report -->|"reads capital"| node_capital
node_report -->|"reads bills"| node_bill
node_report -->|"reads payments"| node_payments
node_report -->|"reads units"| node_unit
node_ppobmanager -->|"selects driver"| node_sandbox
node_ppobmanager -->|"selects driver"| node_digiflazz
node_sandbox -.->|"implements contract"| node_provider
node_digiflazz -->|"implements contract"| node_provider
node_digiflazz -.->|"calls provider API"| node_externalppob
node_auth -->|"authenticates users"| node_user
node_role -.->|"checks role"| node_user

click node_routes "https://github.com/rafiahmadfairuz/bumcash/blob/main/routes/web.php"
click node_auth "https://github.com/rafiahmadfairuz/bumcash/tree/main/app/Http/Controllers/Auth"
click node_role "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_residentbilling "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/PembayaranWargaController.php"
click node_serviceflow "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LayananTransaksiService.php"
click node_bill "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/Tagihan.php"
click node_service "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/Layanan.php"
click node_subscription "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/LanggananLayanan.php"
click node_variable "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/PermintaanTagihanVariabel.php"
click node_payments "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/TransaksiPembayaran.php"
click node_residentviews "https://github.com/rafiahmadfairuz/bumcash/tree/main/resources/views/warga"
click node_managercontroller "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/PengelolaKeuanganController.php"
click node_businesscontroller "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/UnitUsahaController.php"
click node_unit "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/UnitUsaha.php"
click node_assets "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/AsetInventaris.php"
click node_capital "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/PenyertaanModal.php"
click node_managerdash "https://github.com/rafiahmadfairuz/bumcash/tree/main/resources/views/pengelola"
click node_cashflow "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/ArusKas.php"
click node_cashservice "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/ArusKasService.php"
click node_report "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LaporanKeuanganService.php"
click node_dashboard "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/DashboardKeuanganController.php"
click node_ppobmanager "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/PpobManager.php"
click node_provider "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/PpobProvider.php"
click node_sandbox "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/SandboxPpobProvider.php"
click node_digiflazz "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/DigiflazzPpobProvider.php"
click node_user "https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/User.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_routes,node_auth,node_role,node_user toneBlue
class node_residentbilling,node_serviceflow,node_bill,node_service,node_subscription,node_variable,node_payments,node_residentviews toneAmber
class node_managercontroller,node_businesscontroller,node_unit,node_assets,node_capital,node_managerdash toneMint
class node_cashflow,node_cashservice,node_report,node_dashboard toneRose
class node_ppobmanager,node_provider,node_sandbox,node_digiflazz,node_resident,node_manager,node_externalppob toneIndigo
```

## Components

### Access and routing

- [Web routes](https://github.com/rafiahmadfairuz/bumcash/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/rafiahmadfairuz/bumcash/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Role access](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`
- [User accounts](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/User.php): `app/Models/User.php`

### Resident billing

- [Resident billing](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/PembayaranWargaController.php): `app/Http/Controllers/PembayaranWargaController.php`
- [Service transactions](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LayananTransaksiService.php): `app/Services/LayananTransaksiService.php`
- [Bills](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/Tagihan.php): `app/Models/Tagihan.php`
- [Services](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/Layanan.php): `app/Models/Layanan.php`
- [Subscriptions](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/LanggananLayanan.php): `app/Models/LanggananLayanan.php`
- [Variable requests](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/PermintaanTagihanVariabel.php): `app/Models/PermintaanTagihanVariabel.php`
- [Payment records](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/TransaksiPembayaran.php): `app/Models/TransaksiPembayaran.php`
- [Resident screens](https://github.com/rafiahmadfairuz/bumcash/tree/main/resources/views/warga): `resources/views/warga`

### Management operations

- [Manager operations](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/PengelolaKeuanganController.php): `app/Http/Controllers/PengelolaKeuanganController.php`
- [Business units](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/UnitUsahaController.php): `app/Http/Controllers/UnitUsahaController.php`
- [Business units](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/UnitUsaha.php): `app/Models/UnitUsaha.php`
- [Assets and capital](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/AsetInventaris.php): `app/Models/AsetInventaris.php`
- [Capital stakes](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/PenyertaanModal.php): `app/Models/PenyertaanModal.php`
- [Manager screens](https://github.com/rafiahmadfairuz/bumcash/tree/main/resources/views/pengelola): `resources/views/pengelola`

### Financial records

- [Cash flow](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Models/ArusKas.php): `app/Models/ArusKas.php`
- [Cash service](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/ArusKasService.php): `app/Services/ArusKasService.php`
- [Financial reports](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/LaporanKeuanganService.php): `app/Services/LaporanKeuanganService.php`
- [Finance dashboard](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Http/Controllers/DashboardKeuanganController.php): `app/Http/Controllers/DashboardKeuanganController.php`

### PPOB integrations

- [PPOB manager](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/PpobManager.php): `app/Services/Ppob/PpobManager.php`
- [PPOB provider](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/PpobProvider.php): `app/Services/Ppob/PpobProvider.php`
- [Sandbox provider](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/SandboxPpobProvider.php): `app/Services/Ppob/SandboxPpobProvider.php`
- [Digiflazz provider](https://github.com/rafiahmadfairuz/bumcash/blob/main/app/Services/Ppob/DigiflazzPpobProvider.php): `app/Services/Ppob/DigiflazzPpobProvider.php`

### Other components

- **Resident**
- **Manager**
- **PPOB service**

## Connections

- Resident → Web routes: requests pages
- Manager → Web routes: requests pages
- Web routes → Authentication: routes auth (evidence: `routes/web.php`)
- Web routes → Resident billing: routes billing (evidence: `routes/web.php`)
- Web routes → Manager operations: routes management (evidence: `routes/web.php`)
- Web routes → Business units: routes units (evidence: `routes/web.php`)
- Web routes → Finance dashboard: routes finance (evidence: `routes/web.php`)
- Resident billing → Resident screens: renders pages (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Service transactions: delegates orders (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Bills: reads and creates (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Services: reads catalog (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Subscriptions: reads subscriptions (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Variable requests: reads requests (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Resident billing → Payment records: creates payments (evidence: `app/Http/Controllers/PembayaranWargaController.php`)
- Service transactions → Bills: creates bills (evidence: `app/Services/LayananTransaksiService.php`)
- Service transactions → Subscriptions: creates subscriptions (evidence: `app/Services/LayananTransaksiService.php`)
- Service transactions → Variable requests: processes requests (evidence: `app/Services/LayananTransaksiService.php`)
- Service transactions → Services: loads services (evidence: `app/Services/LayananTransaksiService.php`)
- Service transactions → PPOB manager: uses provider manager (evidence: `app/Services/LayananTransaksiService.php`)
- Manager operations → Manager screens: renders management
- Manager operations → Service transactions: delegates processing (evidence: `app/Http/Controllers/PengelolaKeuanganController.php`)
- Manager operations → Cash service: records cash (evidence: `app/Http/Controllers/PengelolaKeuanganController.php`)
- Manager operations → Payment records: verifies payments (evidence: `app/Http/Controllers/PengelolaKeuanganController.php`)
- Manager operations → Bills: manages bills (evidence: `app/Http/Controllers/PengelolaKeuanganController.php`)
- Business units → Business units: manages units (evidence: `app/Http/Controllers/UnitUsahaController.php`)
- Business units → Services: manages services (evidence: `app/Http/Controllers/UnitUsahaController.php`)
- Business units → Bills: reads bills (evidence: `app/Http/Controllers/UnitUsahaController.php`)
- Cash service → Cash flow: records entries (evidence: `app/Services/ArusKasService.php`)
- Finance dashboard → Financial reports: requests reports (evidence: `app/Http/Controllers/DashboardKeuanganController.php`)
- Financial reports → Cash flow: reads cash flow (evidence: `app/Services/LaporanKeuanganService.php`)
- Financial reports → Assets and capital: reads assets (evidence: `app/Services/LaporanKeuanganService.php`)
- Financial reports → Capital stakes: reads capital (evidence: `app/Services/LaporanKeuanganService.php`)
- Financial reports → Bills: reads bills (evidence: `app/Services/LaporanKeuanganService.php`)
- Financial reports → Payment records: reads payments (evidence: `app/Services/LaporanKeuanganService.php`)
- Financial reports → Business units: reads units (evidence: `app/Services/LaporanKeuanganService.php`)
- PPOB manager → Sandbox provider: selects driver (evidence: `app/Services/Ppob/PpobManager.php`)
- PPOB manager → Digiflazz provider: selects driver (evidence: `app/Services/Ppob/PpobManager.php`)
- Sandbox provider → PPOB provider: implements contract
- Digiflazz provider → PPOB provider: implements contract (evidence: `app/Services/Ppob/DigiflazzPpobProvider.php`)
- Digiflazz provider → PPOB service: calls provider API
- Authentication → User accounts: authenticates users (evidence: `app/Http/Controllers/Auth/LoginController.php`)
- Role access → User accounts: checks role
