# useripx/ksp_harapan_mulya architecture

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

- Interactive diagram: https://gitdiagram.com/useripx/ksp_harapan_mulya
- Repository: https://github.com/useripx/ksp_harapan_mulya

## Overview

Koperasi Harapan Mulya is a web application for managing cooperative membership, savings, loans, repayments, cash, and financial reporting. Members and staff enter through the public front controller; routed controllers handle requests and render role-oriented views. Loan processing has distinct verification, approval, and disbursement stages, while scheduled jobs automate deductions, interest posting, and reminders. The README documents cloud document storage, security, and notifications; some of those implementations were not sampled, so their internal wiring is not inferred.

Main entry points: [`app/core/Router.php`](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Router.php) (Route Dispatcher), [`app/controllers/PinjamanController.php`](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/PinjamanController.php) (Loan Application and Review), [`app/controllers/LaporanController.php`](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/LaporanController.php) (Financial Reports and Books), [`app/core/Controller.php`](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Controller.php) (Rendered Web Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web Entry and Access"]
  node_front["HTTP Front Controller<br/>[index.php]"]
  node_router["Route Dispatcher<br/>[Router.php]"]
  node_auth["Authentication and Roles<br/>[Auth.php]"]
  node_authctl["Login and Settings<br/>[AuthController.php]"]
  node_views["Rendered Web Views<br/>[Controller.php]"]
end

subgraph group_member["Members and Savings"]
  node_anggota["Member Management"]
  node_simpanan["Savings Operations"]
  node_simpanansvc["Savings Rules and Balances"]
end

subgraph group_credit["Loan Lifecycle"]
  node_pinjaman["Loan Application and Review"]
  node_pinjamansvc["Loan Processing"]
  node_angsuran["Repayment Operations"]
  node_angsuransvc["Repayment Processing"]
end

subgraph group_finance["Finance and Reporting"]
  node_kas["Cash Transactions<br/>[KasController.php]"]
  node_kas_svc["Cash Services<br/>[KasService.php]"]
  node_reports["Financial Reports and Books"]
  node_report_svc["Report Services<br/>[LaporanService.php]"]
  node_dashboard["Role Dashboards"]
end

subgraph group_support["Operations and Integrations"]
  node_jobs["Automated Cooperative Jobs"]
  node_notify["Notifications"]
  node_audit["Audit Logging<br/>[AuditService.php]"]
  node_drive_svc["Document Cloud Service"]
end

node_user(("Member or Staff"))
node_db[("MySQL or MariaDB")]
node_drive{{"Google Drive Proxy"}}

node_user -->|"sends request"| node_front
node_front -->|"dispatches routes"| node_router
node_router -->|"routes login"| node_authctl
node_router -->|"routes member work"| node_anggota
node_router -->|"routes savings"| node_simpanan
node_router -->|"routes loan stages"| node_pinjaman
node_router -->|"routes repayments"| node_angsuran
node_router -->|"routes cash"| node_kas
node_router -->|"routes reports"| node_reports
node_router -->|"routes dashboards"| node_dashboard
node_authctl -->|"checks access"| node_auth
node_pinjaman -->|"checks roles"| node_auth
node_pinjaman -->|"reads and updates loans"| node_db
node_reports -->|"queries and updates records"| node_db
node_anggota -->|"gets member balance"| node_simpanansvc
node_simpanan -->|"uses savings operations"| node_simpanansvc
node_jobs -->|"automates cooperative records"| node_db
node_pinjaman -.->|"handles member documents"| node_drive_svc
node_drive_svc -.->|"stores documents"| node_drive
node_pinjaman -->|"logs loan decisions"| node_audit
node_pinjaman -->|"notifies loan parties"| node_notify
node_reports -->|"uses reporting services"| node_report_svc
node_kas -->|"uses cash services"| node_kas_svc
node_angsuran -->|"uses repayment services"| node_angsuransvc
node_anggota -->|"renders member pages"| node_views
node_pinjaman -->|"renders loan pages"| node_views
node_reports -->|"renders report pages"| node_views
node_dashboard -->|"renders dashboards"| node_views

click node_front "https://github.com/useripx/ksp_harapan_mulya/blob/main/public/index.php"
click node_router "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Router.php"
click node_auth "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Auth.php"
click node_authctl "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AuthController.php"
click node_anggota "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AnggotaController.php"
click node_simpanan "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/SimpananController.php"
click node_simpanansvc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/SimpananService.php"
click node_pinjaman "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/PinjamanController.php"
click node_pinjamansvc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/PinjamanService.php"
click node_angsuran "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AngsuranController.php"
click node_angsuransvc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/AngsuranService.php"
click node_kas "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/KasController.php"
click node_kas_svc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/KasService.php"
click node_reports "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/LaporanController.php"
click node_report_svc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/LaporanService.php"
click node_dashboard "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/DashboardController.php"
click node_jobs "https://github.com/useripx/ksp_harapan_mulya/tree/main/app/jobs"
click node_notify "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/NotifikasiService.php"
click node_audit "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/AuditService.php"
click node_drive_svc "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/GoogleDriveService.php"
click node_views "https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Controller.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_front,node_router,node_auth,node_authctl,node_views toneBlue
class node_anggota,node_simpanan,node_simpanansvc,node_db toneAmber
class node_pinjaman,node_pinjamansvc,node_angsuran,node_angsuransvc toneMint
class node_kas,node_kas_svc,node_reports,node_report_svc,node_dashboard toneRose
class node_jobs,node_notify,node_audit,node_drive_svc,node_user,node_drive toneIndigo
```

## Components

### Web Entry and Access

- [HTTP Front Controller](https://github.com/useripx/ksp_harapan_mulya/blob/main/public/index.php): `public/index.php`
- [Route Dispatcher](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Router.php): `app/core/Router.php`
- [Authentication and Roles](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Auth.php): `app/core/Auth.php`
- [Login and Settings](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AuthController.php): `app/controllers/AuthController.php`
- [Rendered Web Views](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/core/Controller.php): `app/core/Controller.php`

### Members and Savings

- [Member Management](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AnggotaController.php): `app/controllers/AnggotaController.php`
- [Savings Operations](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/SimpananController.php): `app/controllers/SimpananController.php`
- [Savings Rules and Balances](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/SimpananService.php): `app/services/SimpananService.php`

### Loan Lifecycle

- [Loan Application and Review](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/PinjamanController.php): `app/controllers/PinjamanController.php`
- [Loan Processing](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/PinjamanService.php): `app/services/PinjamanService.php`
- [Repayment Operations](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/AngsuranController.php): `app/controllers/AngsuranController.php`
- [Repayment Processing](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/AngsuranService.php): `app/services/AngsuranService.php`

### Finance and Reporting

- [Cash Transactions](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/KasController.php): `app/controllers/KasController.php`
- [Cash Services](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/KasService.php): `app/services/KasService.php`
- [Financial Reports and Books](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/LaporanController.php): `app/controllers/LaporanController.php`
- [Report Services](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/LaporanService.php): `app/services/LaporanService.php`
- [Role Dashboards](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/controllers/DashboardController.php): `app/controllers/DashboardController.php`

### Operations and Integrations

- [Automated Cooperative Jobs](https://github.com/useripx/ksp_harapan_mulya/tree/main/app/jobs): `app/jobs`
- [Notifications](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/NotifikasiService.php): `app/services/NotifikasiService.php`
- [Audit Logging](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/AuditService.php): `app/services/AuditService.php`
- [Document Cloud Service](https://github.com/useripx/ksp_harapan_mulya/blob/main/app/services/GoogleDriveService.php): `app/services/GoogleDriveService.php`

### Other components

- **Member or Staff**
- **MySQL or MariaDB**
- **Google Drive Proxy**

## Connections

- Member or Staff → HTTP Front Controller: sends request
- HTTP Front Controller → Route Dispatcher: dispatches routes
- Route Dispatcher → Login and Settings: routes login
- Route Dispatcher → Member Management: routes member work
- Route Dispatcher → Savings Operations: routes savings
- Route Dispatcher → Loan Application and Review: routes loan stages
- Route Dispatcher → Repayment Operations: routes repayments
- Route Dispatcher → Cash Transactions: routes cash
- Route Dispatcher → Financial Reports and Books: routes reports
- Route Dispatcher → Role Dashboards: routes dashboards
- Login and Settings → Authentication and Roles: checks access
- Loan Application and Review → Authentication and Roles: checks roles
- Loan Application and Review → MySQL or MariaDB: reads and updates loans
- Financial Reports and Books → MySQL or MariaDB: queries and updates records
- Member Management → Savings Rules and Balances: gets member balance
- Savings Operations → Savings Rules and Balances: uses savings operations
- Automated Cooperative Jobs → MySQL or MariaDB: automates cooperative records
- Loan Application and Review → Document Cloud Service: handles member documents
- Document Cloud Service → Google Drive Proxy: stores documents
- Loan Application and Review → Audit Logging: logs loan decisions
- Loan Application and Review → Notifications: notifies loan parties
- Financial Reports and Books → Report Services: uses reporting services
- Cash Transactions → Cash Services: uses cash services
- Repayment Operations → Repayment Processing: uses repayment services
- Member Management → Rendered Web Views: renders member pages
- Loan Application and Review → Rendered Web Views: renders loan pages
- Financial Reports and Books → Rendered Web Views: renders report pages
- Role Dashboards → Rendered Web Views: renders dashboards
