# keqi000/sistem-pencatatan-keluar-masuk-kantor architecture

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

- Interactive diagram: https://gitdiagram.com/keqi000/sistem-pencatatan-keluar-masuk-kantor
- Repository: https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor

## Overview

SIKMA is a Laravel web system for recording staff departures and returns, using rotating QR codes, approval-based business-trip requests, monitoring, and reporting. Its central workflow is staff authentication, QR validation at lobby/guard-post screens, and creation or closure of a paired attendance record; approved trip requests can authorize the departure. Separate API capabilities manage employees and settings, approvals, dashboards, scan history, and exports/reports. Relationships shown are limited to the sampled source and README; the routes index supports endpoint dispatch, while unsampled view and controller wiring is not asserted.

Main entry points: [`routes/api.php`](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/routes/api.php) (API routes), [`app/Http/Controllers/Api/PindaianController.php`](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PindaianController.php) (Scan processing), [`app/Http/Controllers/Api/DashboardController.php`](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/DashboardController.php) (Dashboard monitoring), [`app/Http/Controllers/Api/PengaturanController.php`](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PengaturanController.php) (Settings management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and API"]
  node_api_routes["API routes<br/>[api.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_users[("User accounts<br/>[User.php]")]
  node_audit[("Activity logging<br/>[ActivityLog.php]")]
end

subgraph group_attendance["Attendance workflow"]
  node_scan["Scan processing"]
  node_qr["Dynamic QR<br/>[QRController.php]"]
  node_qr_state[("QR tokens<br/>[QrSesaat.php]")]
  node_scans[("Scan records<br/>[Pindaian.php]")]
  node_sessions[("Paired attendance")]
end

subgraph group_approvals["Trip approvals"]
  node_requests["Trip requests"]
  node_permit_data[("Trip permits<br/>[IzinDinas.php]")]
end

subgraph group_operations["Monitoring and reports"]
  node_dashboard["Dashboard monitoring"]
  node_history["Scan history"]
  node_reports["Reports and exports"]
end

subgraph group_directory["Staff administration"]
  node_employees["Employee management"]
  node_employee_data[("Employee records<br/>[Pegawai.php]")]
  node_settings["Settings management"]
  node_settings_data[("System settings<br/>[Pengaturan.php]")]
  node_units[("Work units<br/>[UnitKerja.php]")]
  node_user_admin["Account management<br/>[UserController.php]"]
end

node_staff(("Staff member"))
node_screens(("Lobby and guard screens"))

node_staff -->|"uses API"| node_api_routes
node_screens -->|"requests QR"| node_api_routes
node_api_routes -->|"dispatches"| node_auth
node_api_routes -->|"dispatches"| node_qr
node_api_routes -->|"dispatches"| node_scan
node_api_routes -->|"dispatches"| node_requests
node_api_routes -->|"dispatches"| node_dashboard
node_api_routes -->|"dispatches"| node_history
node_api_routes -->|"dispatches"| node_reports
node_api_routes -->|"dispatches"| node_employees
node_api_routes -->|"dispatches"| node_settings
node_api_routes -->|"dispatches"| node_user_admin
node_auth -->|"reads"| node_users
node_auth -->|"logs"| node_audit
node_qr -->|"manages tokens"| node_qr_state
node_scan -->|"verifies QR"| node_qr_state
node_scan -->|"creates scans"| node_scans
node_scan -->|"opens or closes"| node_sessions
node_scan -->|"checks approval"| node_permit_data
node_scan -->|"logs activity"| node_audit
node_staff -->|"submits request"| node_requests
node_requests -.->|"manages permits"| node_permit_data
node_dashboard -->|"reads status"| node_sessions
node_dashboard -->|"reads scans"| node_scans
node_dashboard -->|"reads staff"| node_employee_data
node_history -->|"reads records"| node_sessions
node_reports -->|"reads attendance"| node_sessions
node_reports -->|"groups by unit"| node_employee_data
node_employees -->|"manages staff"| node_employee_data
node_employees -->|"links accounts"| node_users
node_settings -->|"manages settings"| node_settings_data
node_settings -->|"manages units"| node_units
node_settings -->|"logs changes"| node_audit
node_user_admin -.->|"manages accounts"| node_users

click node_api_routes "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/routes/api.php"
click node_auth "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/AuthController.php"
click node_users "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/User.php"
click node_scan "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PindaianController.php"
click node_qr "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/QRController.php"
click node_qr_state "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/QrSesaat.php"
click node_scans "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pindaian.php"
click node_sessions "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/PasanganKeluarMasuk.php"
click node_requests "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/IzinDinasController.php"
click node_permit_data "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/IzinDinas.php"
click node_dashboard "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/DashboardController.php"
click node_history "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/RiwayatController.php"
click node_reports "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/RekapController.php"
click node_employees "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PegawaiController.php"
click node_employee_data "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pegawai.php"
click node_settings "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PengaturanController.php"
click node_settings_data "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pengaturan.php"
click node_units "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/UnitKerja.php"
click node_audit "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/ActivityLog.php"
click node_user_admin "https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/UserController.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_api_routes,node_auth,node_users,node_audit,node_screens toneBlue
class node_scan,node_qr,node_qr_state,node_scans,node_sessions toneAmber
class node_requests,node_permit_data toneMint
class node_dashboard,node_history,node_reports toneRose
class node_employees,node_employee_data,node_settings,node_settings_data,node_units,node_user_admin,node_staff toneIndigo
```

## Components

### Access and API

- [API routes](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/routes/api.php): `routes/api.php`
- [Authentication](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/AuthController.php): `app/Http/Controllers/Api/AuthController.php`
- [User accounts](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/User.php): `app/Models/User.php`
- [Activity logging](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`

### Attendance workflow

- [Scan processing](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PindaianController.php): `app/Http/Controllers/Api/PindaianController.php`
- [Dynamic QR](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/QRController.php): `app/Http/Controllers/Api/QRController.php`
- [QR tokens](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/QrSesaat.php): `app/Models/QrSesaat.php`
- [Scan records](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pindaian.php): `app/Models/Pindaian.php`
- [Paired attendance](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/PasanganKeluarMasuk.php): `app/Models/PasanganKeluarMasuk.php`

### Trip approvals

- [Trip requests](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/IzinDinasController.php): `app/Http/Controllers/Api/IzinDinasController.php`
- [Trip permits](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/IzinDinas.php): `app/Models/IzinDinas.php`

### Monitoring and reports

- [Dashboard monitoring](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/DashboardController.php): `app/Http/Controllers/Api/DashboardController.php`
- [Scan history](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/RiwayatController.php): `app/Http/Controllers/Api/RiwayatController.php`
- [Reports and exports](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/RekapController.php): `app/Http/Controllers/Api/RekapController.php`

### Staff administration

- [Employee management](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PegawaiController.php): `app/Http/Controllers/Api/PegawaiController.php`
- [Employee records](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pegawai.php): `app/Models/Pegawai.php`
- [Settings management](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/PengaturanController.php): `app/Http/Controllers/Api/PengaturanController.php`
- [System settings](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/Pengaturan.php): `app/Models/Pengaturan.php`
- [Work units](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Models/UnitKerja.php): `app/Models/UnitKerja.php`
- [Account management](https://github.com/keqi000/sistem-pencatatan-keluar-masuk-kantor/blob/main/app/Http/Controllers/Api/UserController.php): `app/Http/Controllers/Api/UserController.php`

### Other components

- **Staff member**
- **Lobby and guard screens**

## Connections

- Staff member → API routes: uses API (evidence: `README.md`)
- Lobby and guard screens → API routes: requests QR (evidence: `README.md`)
- API routes → Authentication: dispatches (evidence: `routes/api.php`)
- API routes → Dynamic QR: dispatches (evidence: `routes/api.php`)
- API routes → Scan processing: dispatches (evidence: `routes/api.php`)
- API routes → Trip requests: dispatches (evidence: `routes/api.php`)
- API routes → Dashboard monitoring: dispatches (evidence: `routes/api.php`)
- API routes → Scan history: dispatches (evidence: `routes/api.php`)
- API routes → Reports and exports: dispatches (evidence: `routes/api.php`)
- API routes → Employee management: dispatches (evidence: `routes/api.php`)
- API routes → Settings management: dispatches (evidence: `routes/api.php`)
- API routes → Account management: dispatches (evidence: `routes/api.php`)
- Authentication → User accounts: reads (evidence: `app/Http/Controllers/Api/AuthController.php`)
- Authentication → Activity logging: logs (evidence: `app/Http/Controllers/Api/AuthController.php`)
- Dynamic QR → QR tokens: manages tokens (evidence: `app/Http/Controllers/Api/QRController.php`)
- Scan processing → QR tokens: verifies QR (evidence: `app/Http/Controllers/Api/PindaianController.php`)
- Scan processing → Scan records: creates scans (evidence: `app/Http/Controllers/Api/PindaianController.php`)
- Scan processing → Paired attendance: opens or closes (evidence: `app/Http/Controllers/Api/PindaianController.php`)
- Scan processing → Trip permits: checks approval (evidence: `app/Http/Controllers/Api/PindaianController.php`)
- Scan processing → Activity logging: logs activity (evidence: `app/Http/Controllers/Api/PindaianController.php`)
- Staff member → Trip requests: submits request (evidence: `README.md`)
- Trip requests → Trip permits: manages permits (evidence: `app/Http/Controllers/Api/IzinDinasController.php`)
- Dashboard monitoring → Paired attendance: reads status (evidence: `app/Http/Controllers/Api/DashboardController.php`)
- Dashboard monitoring → Scan records: reads scans (evidence: `app/Http/Controllers/Api/DashboardController.php`)
- Dashboard monitoring → Employee records: reads staff (evidence: `app/Http/Controllers/Api/DashboardController.php`)
- Scan history → Paired attendance: reads records (evidence: `app/Http/Controllers/Api/RiwayatController.php`)
- Reports and exports → Paired attendance: reads attendance (evidence: `app/Http/Controllers/Api/RekapController.php`)
- Reports and exports → Employee records: groups by unit (evidence: `app/Http/Controllers/Api/RekapController.php`)
- Employee management → Employee records: manages staff (evidence: `app/Http/Controllers/Api/PegawaiController.php`)
- Employee management → User accounts: links accounts (evidence: `app/Http/Controllers/Api/PegawaiController.php`)
- Settings management → System settings: manages settings (evidence: `app/Http/Controllers/Api/PengaturanController.php`)
- Settings management → Work units: manages units (evidence: `app/Http/Controllers/Api/PengaturanController.php`)
- Settings management → Activity logging: logs changes (evidence: `app/Http/Controllers/Api/PengaturanController.php`)
- Account management → User accounts: manages accounts
