# ahmadmuzayyin/digitren architecture

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

- Interactive diagram: https://gitdiagram.com/ahmadmuzayyin/digitren
- Repository: https://github.com/ahmadmuzayyin/digitren

## Overview

Digitren is a Laravel web application for pesantren administration. Staff use routed web screens to manage students, rooms and classes, user roles, savings accounts and transactions; finance users focus on savings and transactions. The README also documents dashboards, activity history, Google Sheets synchronization, and optional WhatsApp transaction notifications. The graph includes those documented capabilities, but source excerpts are incomplete, so several subsystem connections are grounded in the README rather than inspected implementation details.

Main entry points: [`routes/web.php`](https://github.com/ahmadmuzayyin/digitren/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Transaksi/TransaksiController.php`](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Transaksi/TransaksiController.php) (Transactions), [`app/Http/Controllers/Tabungan/SaldoDebitController.php`](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Tabungan/SaldoDebitController.php) (Savings accounts), [`app/Helpers/Sinkron.php`](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Helpers/Sinkron.php) (Synchronization helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_dashboard["Dashboard"]
end

subgraph group_people["Pesantren records"]
  node_santri_ctl["Student management"]
  node_santri[("Student records<br/>[Santri.php]")]
  node_room_ctl["Room management"]
  node_rooms[("Room records<br/>[Kamar.php]")]
  node_class_ctl["Class management"]
  node_classes[("Class records<br/>[Kelas.php]")]
end

subgraph group_finance["Savings operations"]
  node_savings_ctl["Savings accounts"]
  node_savings[("Savings records<br/>[Tabungan.php]")]
  node_transactions_ctl["Transactions"]
  node_transaction_records[("Transaction records")]
  node_transfer_ctl["Balance transfers"]
  node_transfer_records[("Transfer records<br/>[Transfer.php]")]
end

subgraph group_admin["Administration and integrations"]
  node_users_ctl["User management"]
  node_users[("User records<br/>[User.php]")]
  node_roles_ctl["Role management<br/>[RoleController.php]"]
  node_history_ctl["Activity history"]
  node_sync_ctl["Sheets synchronization"]
  node_sync_helper["Synchronization helper<br/>[Sinkron.php]"]
  node_settings_ctl["Settings"]
  node_whatsapp["WhatsApp notifications<br/>[Whatsapp.php]"]
end

node_staff(("Staff users"))
node_sheets["Google Sheets"]

node_staff -->|"opens screens"| node_web_routes
node_web_routes -->|"routes to"| node_dashboard
node_web_routes -->|"routes to"| node_santri_ctl
node_web_routes -->|"routes to"| node_room_ctl
node_web_routes -->|"routes to"| node_class_ctl
node_web_routes -->|"routes to"| node_savings_ctl
node_web_routes -->|"routes to"| node_transactions_ctl
node_web_routes -->|"routes to"| node_transfer_ctl
node_web_routes -->|"routes to"| node_users_ctl
node_web_routes -->|"routes to"| node_roles_ctl
node_web_routes -->|"routes to"| node_history_ctl
node_web_routes -->|"routes to"| node_sync_ctl
node_web_routes -->|"routes to"| node_settings_ctl
node_santri_ctl -->|"manages"| node_santri
node_room_ctl -->|"manages"| node_rooms
node_class_ctl -->|"manages"| node_classes
node_savings_ctl -->|"creates and reads"| node_savings
node_savings_ctl -->|"records deposits"| node_transaction_records
node_transactions_ctl -->|"updates balance"| node_savings
node_transactions_ctl -->|"records activity"| node_transaction_records
node_transfer_ctl -->|"manages"| node_transfer_records
node_users_ctl -->|"manages"| node_users
node_sync_ctl -->|"invokes"| node_sync_helper
node_sync_helper -->|"reads"| node_santri
node_sync_helper -->|"synchronizes"| node_sheets
node_transactions_ctl -.->|"sends notices"| node_whatsapp

click node_web_routes "https://github.com/ahmadmuzayyin/digitren/blob/main/routes/web.php"
click node_dashboard "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/DashboardController.php"
click node_santri_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Santri/SantriController.php"
click node_santri "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Santri.php"
click node_room_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Kamar/KamarController.php"
click node_rooms "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Kamar.php"
click node_class_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Kelas/KelasController.php"
click node_classes "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Kelas.php"
click node_savings_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Tabungan/SaldoDebitController.php"
click node_savings "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Tabungan.php"
click node_transactions_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Transaksi/TransaksiController.php"
click node_transaction_records "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/TransaksiTabungan.php"
click node_transfer_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/TransferController.php"
click node_transfer_records "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Transfer.php"
click node_users_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Users/UsersController.php"
click node_users "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/User.php"
click node_roles_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Role/RoleController.php"
click node_history_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Riwayat/RiwayatController.php"
click node_sync_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Sinkron/SinkronController.php"
click node_sync_helper "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Helpers/Sinkron.php"
click node_settings_ctl "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/SettingController.php"
click node_whatsapp "https://github.com/ahmadmuzayyin/digitren/blob/main/app/Helpers/Whatsapp.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_web_routes,node_dashboard,node_staff toneBlue
class node_santri_ctl,node_santri,node_room_ctl,node_rooms,node_class_ctl,node_classes toneAmber
class node_savings_ctl,node_savings,node_transactions_ctl,node_transaction_records,node_transfer_ctl,node_transfer_records toneMint
class node_users_ctl,node_users,node_roles_ctl,node_history_ctl,node_sync_ctl,node_sync_helper,node_settings_ctl,node_whatsapp toneRose
class node_sheets toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/ahmadmuzayyin/digitren/blob/main/routes/web.php): `routes/web.php`
- [Dashboard](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`

### Pesantren records

- [Student management](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Santri/SantriController.php): `app/Http/Controllers/Santri/SantriController.php`
- [Student records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Santri.php): `app/Models/Santri.php`
- [Room management](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Kamar/KamarController.php): `app/Http/Controllers/Kamar/KamarController.php`
- [Room records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Kamar.php): `app/Models/Kamar.php`
- [Class management](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Kelas/KelasController.php): `app/Http/Controllers/Kelas/KelasController.php`
- [Class records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Kelas.php): `app/Models/Kelas.php`

### Savings operations

- [Savings accounts](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Tabungan/SaldoDebitController.php): `app/Http/Controllers/Tabungan/SaldoDebitController.php`
- [Savings records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Tabungan.php): `app/Models/Tabungan.php`
- [Transactions](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Transaksi/TransaksiController.php): `app/Http/Controllers/Transaksi/TransaksiController.php`
- [Transaction records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/TransaksiTabungan.php): `app/Models/TransaksiTabungan.php`
- [Balance transfers](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/TransferController.php): `app/Http/Controllers/TransferController.php`
- [Transfer records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/Transfer.php): `app/Models/Transfer.php`

### Administration and integrations

- [User management](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Users/UsersController.php): `app/Http/Controllers/Users/UsersController.php`
- [User records](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Models/User.php): `app/Models/User.php`
- [Role management](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Role/RoleController.php): `app/Http/Controllers/Role/RoleController.php`
- [Activity history](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Riwayat/RiwayatController.php): `app/Http/Controllers/Riwayat/RiwayatController.php`
- [Sheets synchronization](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/Sinkron/SinkronController.php): `app/Http/Controllers/Sinkron/SinkronController.php`
- [Synchronization helper](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Helpers/Sinkron.php): `app/Helpers/Sinkron.php`
- [Settings](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Http/Controllers/SettingController.php): `app/Http/Controllers/SettingController.php`
- [WhatsApp notifications](https://github.com/ahmadmuzayyin/digitren/blob/main/app/Helpers/Whatsapp.php): `app/Helpers/Whatsapp.php`

### Other components

- **Staff users**
- **Google Sheets**

## Connections

- Staff users → Web routes: opens screens (evidence: `README.md`)
- Web routes → Dashboard: routes to (evidence: `routes/web.php`)
- Web routes → Student management: routes to (evidence: `routes/web.php`)
- Web routes → Room management: routes to (evidence: `routes/web.php`)
- Web routes → Class management: routes to (evidence: `routes/web.php`)
- Web routes → Savings accounts: routes to (evidence: `routes/web.php`)
- Web routes → Transactions: routes to (evidence: `routes/web.php`)
- Web routes → Balance transfers: routes to (evidence: `routes/web.php`)
- Web routes → User management: routes to (evidence: `routes/web.php`)
- Web routes → Role management: routes to (evidence: `routes/web.php`)
- Web routes → Activity history: routes to (evidence: `routes/web.php`)
- Web routes → Sheets synchronization: routes to (evidence: `routes/web.php`)
- Web routes → Settings: routes to (evidence: `routes/web.php`)
- Student management → Student records: manages (evidence: `app/Http/Controllers/Santri/SantriController.php`)
- Room management → Room records: manages (evidence: `app/Http/Controllers/Kamar/KamarController.php`)
- Class management → Class records: manages (evidence: `app/Http/Controllers/Kelas/KelasController.php`)
- Savings accounts → Savings records: creates and reads (evidence: `app/Http/Controllers/Tabungan/SaldoDebitController.php`)
- Savings accounts → Transaction records: records deposits (evidence: `app/Http/Controllers/Tabungan/SaldoDebitController.php`)
- Transactions → Savings records: updates balance (evidence: `app/Http/Controllers/Transaksi/TransaksiController.php`)
- Transactions → Transaction records: records activity (evidence: `app/Http/Controllers/Transaksi/TransaksiController.php`)
- Balance transfers → Transfer records: manages (evidence: `README.md`)
- User management → User records: manages (evidence: `app/Http/Controllers/Users/UsersController.php`)
- Sheets synchronization → Synchronization helper: invokes (evidence: `app/Http/Controllers/Sinkron/SinkronController.php`)
- Synchronization helper → Student records: reads (evidence: `app/Helpers/Sinkron.php`)
- Synchronization helper → Google Sheets: synchronizes (evidence: `README.md`)
- Transactions → WhatsApp notifications: sends notices
