# aqidfahrihafin/websistem-keuangan-v1 architecture

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

- Interactive diagram: https://gitdiagram.com/aqidfahrihafin/websistem-keuangan-v1
- Repository: https://github.com/aqidfahrihafin/websistem-keuangan-v1

## Overview

E-Mall Annuqayah is a Laravel/Livewire student-finance system. Its main workflow serves santri, guardians, and staff: manage student accounts and bills, receive payments or top-ups, apply wallet/transaction updates, then support cash operations and financial oversight. The graph combines documented capabilities with relationships directly supported by the supplied excerpts or SOURCE INDEX; unsampled feature links are omitted rather than inferred.

Main entry points: [`app/Services/TopupWaliService.php`](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/TopupWaliService.php) (Top-up processing), [`app/Services/WalletService.php`](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/WalletService.php) (Wallet operations), [`config/database.php`](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/config/database.php) (Application database), [`app/Livewire/Santri/Penarikan/Request.php`](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Livewire/Santri/Penarikan/Request.php) (Student withdrawals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_people["Accounts &amp; students"]
  node_accounts["Accounts &amp; family links"]
  node_student_records[("Student records<br/>[Santri.php]")]
  node_guardian_api["Guardian API<br/>[AuthController.php]"]
end

subgraph group_money["Payments &amp; wallets"]
  node_bills[("Bills &amp; billing<br/>[Tagihan.php]")]
  node_topup_api["Guardian top-up API"]
  node_topup_service["Top-up processing"]
  node_wallet["Wallet operations<br/>[WalletService.php]"]
  node_midtrans["Midtrans payments"]
  node_withdrawal["Student withdrawals<br/>[Request.php]"]
end

subgraph group_commerce["Canteen &amp; kiosks"]
  node_kantin["Canteen sales"]
  node_kiosk_api["Kiosk API"]
  node_fingerprint["Fingerprint bridge"]
end

subgraph group_oversight["Operations &amp; reporting"]
  node_periods["Financial periods"]
  node_reconciliation["Reconciliation"]
  node_reports["Reports &amp; exports"]
  node_backup["Backup &amp; restore<br/>[BackupService.php]"]
  node_maintenance["Maintenance mode"]
  node_database[("Application database<br/>[database.php]")]
end

node_guardian(("Guardian / wali"))
node_student(("Student / santri"))
node_staff(("Admin &amp; staff"))
node_midtrans_service{{"Midtrans gateway"}}

node_guardian -.->|"uses"| node_guardian_api
node_guardian_api -->|"links family"| node_accounts
node_student -.->|"requests cash"| node_withdrawal
node_withdrawal -->|"loads student"| node_student_records
node_withdrawal -->|"creates request"| node_wallet
node_guardian -.->|"requests top-up"| node_topup_api
node_topup_api -->|"starts top-up"| node_topup_service
node_topup_service -.->|"charges payment"| node_midtrans
node_midtrans_service -.->|"sends webhook"| node_topup_service
node_topup_service -->|"credits balance"| node_wallet
node_topup_service -->|"applies payment"| node_bills
node_staff -.->|"closes periods"| node_periods
node_staff -.->|"reviews cash"| node_reconciliation
node_staff -->|"requests reports"| node_reports
node_reports -->|"queries records"| node_student_records
node_reports -->|"queries bills"| node_bills
node_staff -.->|"manages backups"| node_backup
node_backup -->|"sets restore state"| node_maintenance
node_kiosk_api -.->|"checks balance"| node_student_records
node_fingerprint -->|"records bridge jobs"| node_database
node_accounts -.->|"stores family links"| node_database
node_wallet -.->|"updates balances"| node_database
node_bills -.->|"stores bills"| node_database
node_kantin -.->|"charges wallet"| node_wallet
node_staff -.->|"operates sales"| node_kantin

click node_accounts "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/KeluargaLinkingService.php"
click node_student_records "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Models/Santri.php"
click node_guardian_api "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Wali/AuthController.php"
click node_bills "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Models/Tagihan.php"
click node_topup_api "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Wali/TopupController.php"
click node_topup_service "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/TopupWaliService.php"
click node_wallet "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/WalletService.php"
click node_midtrans "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/MidtransFeeService.php"
click node_withdrawal "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Livewire/Santri/Penarikan/Request.php"
click node_kantin "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/KantinPembayaranService.php"
click node_kiosk_api "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Kiosk/CekSaldoController.php"
click node_fingerprint "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/FingerprintBridgeController.php"
click node_periods "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/FinancialPeriodService.php"
click node_reconciliation "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/RekonsiliasiKeuanganService.php"
click node_reports "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/ReportController.php"
click node_backup "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/BackupService.php"
click node_maintenance "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/MaintenanceModeService.php"
click node_database "https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/config/database.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_accounts,node_student_records,node_guardian_api toneBlue
class node_bills,node_topup_api,node_topup_service,node_wallet,node_midtrans,node_withdrawal toneAmber
class node_kantin,node_kiosk_api,node_fingerprint toneMint
class node_periods,node_reconciliation,node_reports,node_backup,node_maintenance,node_database toneRose
class node_guardian,node_student,node_staff,node_midtrans_service toneIndigo
```

## Components

### Accounts & students

- [Accounts & family links](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/KeluargaLinkingService.php): `app/Services/KeluargaLinkingService.php`
- [Student records](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Models/Santri.php): `app/Models/Santri.php`
- [Guardian API](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Wali/AuthController.php): `app/Http/Controllers/Api/Wali/AuthController.php`

### Payments & wallets

- [Bills & billing](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Models/Tagihan.php): `app/Models/Tagihan.php`
- [Guardian top-up API](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Wali/TopupController.php): `app/Http/Controllers/Api/Wali/TopupController.php`
- [Top-up processing](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/TopupWaliService.php): `app/Services/TopupWaliService.php`
- [Wallet operations](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/WalletService.php): `app/Services/WalletService.php`
- [Midtrans payments](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/MidtransFeeService.php): `app/Services/MidtransFeeService.php`
- [Student withdrawals](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Livewire/Santri/Penarikan/Request.php): `app/Livewire/Santri/Penarikan/Request.php`

### Canteen & kiosks

- [Canteen sales](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/KantinPembayaranService.php): `app/Services/KantinPembayaranService.php`
- [Kiosk API](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/Kiosk/CekSaldoController.php): `app/Http/Controllers/Api/Kiosk/CekSaldoController.php`
- [Fingerprint bridge](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/Api/FingerprintBridgeController.php): `app/Http/Controllers/Api/FingerprintBridgeController.php`

### Operations & reporting

- [Financial periods](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/FinancialPeriodService.php): `app/Services/FinancialPeriodService.php`
- [Reconciliation](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/RekonsiliasiKeuanganService.php): `app/Services/RekonsiliasiKeuanganService.php`
- [Reports & exports](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Http/Controllers/ReportController.php): `app/Http/Controllers/ReportController.php`
- [Backup & restore](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/BackupService.php): `app/Services/BackupService.php`
- [Maintenance mode](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/app/Services/MaintenanceModeService.php): `app/Services/MaintenanceModeService.php`
- [Application database](https://github.com/aqidfahrihafin/websistem-keuangan-v1/blob/main/config/database.php): `config/database.php`

### Other components

- **Guardian / wali**
- **Student / santri**
- **Admin & staff**
- **Midtrans gateway**

## Connections

- Guardian / wali → Guardian API: uses
- Guardian API → Accounts & family links: links family (evidence: `app/Http/Controllers/Api/Wali/AuthController.php`)
- Student / santri → Student withdrawals: requests cash
- Student withdrawals → Student records: loads student (evidence: `app/Livewire/Santri/Penarikan/Request.php`)
- Student withdrawals → Wallet operations: creates request (evidence: `app/Livewire/Santri/Penarikan/Request.php`)
- Guardian / wali → Guardian top-up API: requests top-up
- Guardian top-up API → Top-up processing: starts top-up (evidence: `app/Http/Controllers/Api/Wali/TopupController.php`)
- Top-up processing → Midtrans payments: charges payment (evidence: `app/Services/TopupWaliService.php`)
- Midtrans gateway → Top-up processing: sends webhook
- Top-up processing → Wallet operations: credits balance (evidence: `app/Services/TopupWaliService.php`)
- Top-up processing → Bills & billing: applies payment (evidence: `app/Services/TopupWaliService.php`)
- Admin & staff → Financial periods: closes periods
- Admin & staff → Reconciliation: reviews cash
- Admin & staff → Reports & exports: requests reports (evidence: `app/Http/Controllers/ReportController.php`)
- Reports & exports → Student records: queries records (evidence: `app/Http/Controllers/ReportController.php`)
- Reports & exports → Bills & billing: queries bills (evidence: `app/Http/Controllers/ReportController.php`)
- Admin & staff → Backup & restore: manages backups
- Backup & restore → Maintenance mode: sets restore state (evidence: `app/Services/BackupService.php`)
- Kiosk API → Student records: checks balance
- Fingerprint bridge → Application database: records bridge jobs (evidence: `app/Http/Controllers/Api/FingerprintBridgeController.php`)
- Accounts & family links → Application database: stores family links
- Wallet operations → Application database: updates balances
- Bills & billing → Application database: stores bills
- Canteen sales → Wallet operations: charges wallet
- Admin & staff → Canteen sales: operates sales
