# katekateline/park-it architecture

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

- Interactive diagram: https://gitdiagram.com/katekateline/park-it
- Repository: https://github.com/katekateline/park-it

## Overview

This Laravel application supports role-based parking operations: a gate attendant records vehicle entry, issues a ticket, and later scans it to calculate and complete payment; owners review revenue and transaction summaries. Admins maintain users, vehicles, rates, parking areas, cameras, and activity logs. Camera capture and vehicle analysis are integrated into entry handling. The sampled source confirms entry-analysis, payment, authentication, dashboard, and owner-report behavior; other administration and routing links are represented at subsystem level from the file tree, without assuming their internal call wiring.

Main entry points: [`app/Http/Controllers/Petugas/TransaksiMasukController.php`](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiMasukController.php) (Vehicle entry), [`app/Http/Controllers/Admin`](https://github.com/katekateline/park-it/tree/main/app/Http/Controllers/Admin) (Admin management), [`routes/web.php`](https://github.com/katekateline/park-it/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Petugas/TransaksiKeluarController.php`](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiKeluarController.php) (Vehicle exit and payment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and dashboards"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_role_middleware["Role access<br/>[RoleMiddleware.php]"]
  node_dashboard["Role dashboards"]
  node_admin_dashboard["Admin overview"]
  node_petugas_dashboard["Attendant overview"]
end

subgraph group_operations["Parking operations"]
  node_entry["Vehicle entry"]
  node_camera_api["Camera API"]
  node_detection["Detection endpoint"]
  node_vehicle_type["Vehicle type mapping"]
  node_exit["Vehicle exit and payment"]
  node_ticket["Entry and receipt views<br/>[masuk.blade.php]"]
  node_exit_views["Exit and receipt views"]
  node_transaction[("Parking transactions<br/>[Transaksi.php]")]
  node_receipt[("Receipt records<br/>[CetakStruk.php]")]
  node_attendant_views["Attendant screens"]
end

subgraph group_administration["Administration"]
  node_camera_source[("Camera sources<br/>[CameraSource.php]")]
  node_vehicle[("Vehicle records<br/>[Kendaraan.php]")]
  node_rates[("Parking rates<br/>[Tarif.php]")]
  node_areas[("Parking areas<br/>[AreaParkir.php]")]
  node_activity[("Activity log<br/>[LogAktivitas.php]")]
  node_admin_tools["Admin management"]
  node_admin_views["Admin screens"]
end

subgraph group_reporting["Owner reporting"]
  node_owner_dashboard["Owner overview"]
  node_owner_reports["Transaction reports"]
  node_report_views["Report and PDF views"]
  node_owner_views["Owner dashboard"]
end

node_user(("Staff or owner"))
node_camera(("Parking camera"))
node_yolo["YOLO analysis service"]

node_user -->|"requests"| node_web_routes
node_web_routes -->|"routes login"| node_auth
node_web_routes -->|"checks role"| node_role_middleware
node_web_routes -->|"routes dashboard"| node_dashboard
node_dashboard -->|"dispatches"| node_admin_dashboard
node_dashboard -->|"dispatches"| node_petugas_dashboard
node_dashboard -->|"dispatches"| node_owner_dashboard
node_web_routes -->|"routes entry"| node_entry
node_entry -->|"selects camera"| node_camera_source
node_entry -->|"fetches image"| node_camera
node_entry -->|"submits image"| node_yolo
node_yolo -->|"returns analysis"| node_entry
node_entry -->|"maps detection"| node_vehicle_type
node_entry -->|"renders entry form"| node_ticket
node_entry -->|"creates entry"| node_transaction
node_entry -->|"records vehicle"| node_vehicle
node_web_routes -->|"routes exit"| node_exit
node_exit -->|"reads and completes"| node_transaction
node_exit -->|"reads rate"| node_rates
node_exit -->|"creates receipt record"| node_receipt
node_exit -->|"logs payment"| node_activity
node_exit -->|"renders payment"| node_exit_views
node_admin_dashboard -->|"renders overview"| node_admin_views
node_admin_dashboard -->|"reads activity"| node_transaction
node_admin_tools -->|"manages vehicles"| node_vehicle
node_admin_tools -->|"manages rates"| node_rates
node_admin_tools -->|"manages areas"| node_areas
node_admin_tools -->|"manages cameras"| node_camera_source
node_admin_tools -->|"writes activity"| node_activity
node_admin_tools -->|"renders screens"| node_admin_views
node_owner_dashboard -->|"aggregates completed"| node_transaction
node_owner_dashboard -->|"renders metrics"| node_owner_views
node_owner_reports -->|"queries completed"| node_transaction
node_owner_reports -->|"renders report"| node_report_views

click node_web_routes "https://github.com/katekateline/park-it/blob/main/routes/web.php"
click node_auth "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/AuthController.php"
click node_role_middleware "https://github.com/katekateline/park-it/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_dashboard "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/DashboardController.php"
click node_admin_dashboard "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Admin/AdminDashboardController.php"
click node_petugas_dashboard "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/PetugasDashboardController.php"
click node_owner_dashboard "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Owner/OwnerDashboardController.php"
click node_entry "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiMasukController.php"
click node_camera_api "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/CameraApiController.php"
click node_camera_source "https://github.com/katekateline/park-it/blob/main/app/Models/CameraSource.php"
click node_detection "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/DetectionController.php"
click node_vehicle_type "https://github.com/katekateline/park-it/blob/main/app/Support/VehicleTypeDisplay.php"
click node_exit "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiKeluarController.php"
click node_ticket "https://github.com/katekateline/park-it/blob/main/resources/views/petugas/transaksi/masuk.blade.php"
click node_exit_views "https://github.com/katekateline/park-it/blob/main/resources/views/petugas/transaksi/keluar-bayar.blade.php"
click node_transaction "https://github.com/katekateline/park-it/blob/main/app/Models/Transaksi.php"
click node_vehicle "https://github.com/katekateline/park-it/blob/main/app/Models/Kendaraan.php"
click node_rates "https://github.com/katekateline/park-it/blob/main/app/Models/Tarif.php"
click node_areas "https://github.com/katekateline/park-it/blob/main/app/Models/AreaParkir.php"
click node_receipt "https://github.com/katekateline/park-it/blob/main/app/Models/CetakStruk.php"
click node_activity "https://github.com/katekateline/park-it/blob/main/app/Models/LogAktivitas.php"
click node_admin_tools "https://github.com/katekateline/park-it/tree/main/app/Http/Controllers/Admin"
click node_owner_reports "https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Owner/RekapTransaksiController.php"
click node_report_views "https://github.com/katekateline/park-it/tree/main/resources/views/owner/rekap"
click node_admin_views "https://github.com/katekateline/park-it/tree/main/resources/views/admin"
click node_owner_views "https://github.com/katekateline/park-it/blob/main/resources/views/owner/dashboard.blade.php"
click node_attendant_views "https://github.com/katekateline/park-it/tree/main/resources/views/petugas"

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_auth,node_role_middleware,node_dashboard,node_admin_dashboard,node_petugas_dashboard toneBlue
class node_entry,node_camera_api,node_detection,node_vehicle_type,node_exit,node_ticket,node_exit_views,node_transaction,node_receipt,node_attendant_views toneAmber
class node_camera_source,node_vehicle,node_rates,node_areas,node_activity,node_admin_tools,node_admin_views toneMint
class node_owner_dashboard,node_owner_reports,node_report_views,node_owner_views toneRose
class node_user,node_camera,node_yolo toneIndigo
```

## Components

### Access and dashboards

- [Web routes](https://github.com/katekateline/park-it/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Role access](https://github.com/katekateline/park-it/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`
- [Role dashboards](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`
- [Admin overview](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Admin/AdminDashboardController.php): `app/Http/Controllers/Admin/AdminDashboardController.php`
- [Attendant overview](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/PetugasDashboardController.php): `app/Http/Controllers/Petugas/PetugasDashboardController.php`

### Parking operations

- [Vehicle entry](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiMasukController.php): `app/Http/Controllers/Petugas/TransaksiMasukController.php`
- [Camera API](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/CameraApiController.php): `app/Http/Controllers/Petugas/CameraApiController.php`
- [Detection endpoint](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/DetectionController.php): `app/Http/Controllers/DetectionController.php`
- [Vehicle type mapping](https://github.com/katekateline/park-it/blob/main/app/Support/VehicleTypeDisplay.php): `app/Support/VehicleTypeDisplay.php`
- [Vehicle exit and payment](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Petugas/TransaksiKeluarController.php): `app/Http/Controllers/Petugas/TransaksiKeluarController.php`
- [Entry and receipt views](https://github.com/katekateline/park-it/blob/main/resources/views/petugas/transaksi/masuk.blade.php): `resources/views/petugas/transaksi/masuk.blade.php`
- [Exit and receipt views](https://github.com/katekateline/park-it/blob/main/resources/views/petugas/transaksi/keluar-bayar.blade.php): `resources/views/petugas/transaksi/keluar-bayar.blade.php`
- [Parking transactions](https://github.com/katekateline/park-it/blob/main/app/Models/Transaksi.php): `app/Models/Transaksi.php`
- [Receipt records](https://github.com/katekateline/park-it/blob/main/app/Models/CetakStruk.php): `app/Models/CetakStruk.php`
- [Attendant screens](https://github.com/katekateline/park-it/tree/main/resources/views/petugas): `resources/views/petugas`

### Administration

- [Camera sources](https://github.com/katekateline/park-it/blob/main/app/Models/CameraSource.php): `app/Models/CameraSource.php`
- [Vehicle records](https://github.com/katekateline/park-it/blob/main/app/Models/Kendaraan.php): `app/Models/Kendaraan.php`
- [Parking rates](https://github.com/katekateline/park-it/blob/main/app/Models/Tarif.php): `app/Models/Tarif.php`
- [Parking areas](https://github.com/katekateline/park-it/blob/main/app/Models/AreaParkir.php): `app/Models/AreaParkir.php`
- [Activity log](https://github.com/katekateline/park-it/blob/main/app/Models/LogAktivitas.php): `app/Models/LogAktivitas.php`
- [Admin management](https://github.com/katekateline/park-it/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`
- [Admin screens](https://github.com/katekateline/park-it/tree/main/resources/views/admin): `resources/views/admin`

### Owner reporting

- [Owner overview](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Owner/OwnerDashboardController.php): `app/Http/Controllers/Owner/OwnerDashboardController.php`
- [Transaction reports](https://github.com/katekateline/park-it/blob/main/app/Http/Controllers/Owner/RekapTransaksiController.php): `app/Http/Controllers/Owner/RekapTransaksiController.php`
- [Report and PDF views](https://github.com/katekateline/park-it/tree/main/resources/views/owner/rekap): `resources/views/owner/rekap`
- [Owner dashboard](https://github.com/katekateline/park-it/blob/main/resources/views/owner/dashboard.blade.php): `resources/views/owner/dashboard.blade.php`

### Other components

- **Staff or owner**
- **Parking camera**
- **YOLO analysis service**

## Connections

- Staff or owner → Web routes: requests
- Web routes → Authentication: routes login
- Web routes → Role access: checks role
- Web routes → Role dashboards: routes dashboard
- Role dashboards → Admin overview: dispatches
- Role dashboards → Attendant overview: dispatches
- Role dashboards → Owner overview: dispatches
- Web routes → Vehicle entry: routes entry
- Vehicle entry → Camera sources: selects camera
- Vehicle entry → Parking camera: fetches image
- Vehicle entry → YOLO analysis service: submits image
- YOLO analysis service → Vehicle entry: returns analysis
- Vehicle entry → Vehicle type mapping: maps detection
- Vehicle entry → Entry and receipt views: renders entry form
- Vehicle entry → Parking transactions: creates entry
- Vehicle entry → Vehicle records: records vehicle
- Web routes → Vehicle exit and payment: routes exit
- Vehicle exit and payment → Parking transactions: reads and completes
- Vehicle exit and payment → Parking rates: reads rate
- Vehicle exit and payment → Receipt records: creates receipt record
- Vehicle exit and payment → Activity log: logs payment
- Vehicle exit and payment → Exit and receipt views: renders payment
- Admin overview → Admin screens: renders overview
- Admin overview → Parking transactions: reads activity
- Admin management → Vehicle records: manages vehicles
- Admin management → Parking rates: manages rates
- Admin management → Parking areas: manages areas
- Admin management → Camera sources: manages cameras
- Admin management → Activity log: writes activity
- Admin management → Admin screens: renders screens
- Owner overview → Parking transactions: aggregates completed
- Owner overview → Owner dashboard: renders metrics
- Transaction reports → Parking transactions: queries completed
- Transaction reports → Report and PDF views: renders report
