# warblus75-lgtm/sistemreservasilapanganfutsal architecture

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

- Interactive diagram: https://gitdiagram.com/warblus75-lgtm/sistemreservasilapanganfutsal
- Repository: https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal

## Overview

#### Purpose and Entry Points
This is a Laravel application for managing sports-field (`lapangan`) inventory and reservation (`reservasi`) workflows, including payment-proof upload and reservation reporting. HTTP traffic enters through `public/index.php`, boots via `bootstrap/app.php`, and is dispatched by `routes/web.php` for Blade UI and `routes/api.php` for programmatic access.

#### Web and API Delivery
The browser-facing application uses MVC controllers and Blade templates:
- Field management: `app/Http/Controllers/LapanganController.php`, `resources/views/lapangans/index.blade.php`
- Reservation workflow: `app/Http/Controllers/ReservasiController.php`, `resources/views/reservasis/create.blade.php`
- Authentication and reports: `app/Http/Controllers/AuthController.php`, `app/Http/Controllers/LaporanController.php`, `resources/views/laporan/reservasi-pdf.blade.php`

A parallel API exposes authentication and field operations through `app/Http/Controllers/Api/AuthController.php` and `app/Http/Controllers/Api/LapanganController.php`. API response shaping is centralized for fields in `app/Http/Resources/LapanganResource.php`.

#### Domain and Persistence Boundary
The core persisted domain consists of users, fields, and reservations:
- `app/Models/User.php`
- `app/Models/Lapangan.php`
- `app/Models/Reservasi.php`

Schema ownership is explicit in `database/migrations/0001_01_01_000000_create_users_table.php`, `database/migrations/2026_07_16_074117_create_lapangans_table.php`, and `database/migrations/2026_07_16_074117_create_reservasis_table.php`. Controllers should use these Eloquent models as the boundary to the configured database; database connection behavior is supplied by `config/database.php`.

#### Reservation and Payment-Proof Flow
A reservation is created through the reservation controller, with input validation isolated in `app/Http/Requests/StoreReservasiRequest.php`. Payment evidence is a distinct stage, validated by `app/Http/Requests/UploadBuktiRequest.php` and presented through `resources/views/reservasis/upload-bukti.blade.php`. Uploaded artifacts belong on Laravel-managed storage under `storage/app`, with disk/publication behavior controlled by `config/filesystems.php`.

#### Access Control and Identity
There are two authentication surfaces: session-oriented web authentication and token-oriented API authentication. Authorization includes a role gate in `app/Http/Middleware/CheckRole.php`. Laravel auth configuration resides in `config/auth.php`; Sanctum configuration and its personal-access-token migration indicate token support for the API: `config/sanctum.php` and `database/migrations/2026_07_16_074008_create_personal_access_tokens_table.php`.

#### Reporting and Operational Infrastructure
`app/Http/Controllers/LaporanController.php` owns reservation reporting, with a dedicated report/PDF-oriented Blade view at `resources/views/laporan/reservasi-pdf.blade.php`. Laravel runtime capabilities are configured conventionally for cache, queues, logging, mail, and sessions in `config/cache.php`, `config/queue.php`, `config/logging.php`, `config/mail.php`, and `config/session.php`. Front-end assets are built through Vite from `resources/js/app.js` and `resources/css/app.css`; this is a server-rendered Laravel application rather than a standalone SPA.

Main entry points: [`app/Http/Controllers/ReservasiController.php`](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/ReservasiController.php) (Web Controllers), [`routes/web.php`](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/routes/web.php) (Web Routes), [`config/database.php`](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/database.php) (Configured Database), [`bootstrap/app.php`](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/bootstrap/app.php) (Application Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["HTTP Delivery"]
  node_public_entry["Public Entry<br/>Laravel entry point<br/>[index.php]"]
  node_app_bootstrap["Application Bootstrap<br/>Laravel bootstrap<br/>[app.php]"]
  node_web_routes["Web Routes<br/>route definitions<br/>[web.php]"]
  node_api_routes["API Routes<br/>route definitions<br/>[api.php]"]
end

subgraph group_application["Application Workflows"]
  node_web_controllers["Web Controllers<br/>MVC controllers"]
  node_blade_views["Blade UI<br/>server-rendered views<br/>[create.blade.php]"]
  node_reservation_request["Reservation Validation<br/>form request"]
  node_proof_request["Proof Upload Validation<br/>form request"]
  node_proof_upload_view["Proof Upload UI<br/>Blade view"]
  node_reporting["Reservation Reports<br/>report controller"]
  node_api_controllers["API Controllers"]
  node_lapangan_resource["Field API Resource"]
  node_role_gate["Role Gate<br/>HTTP middleware<br/>[CheckRole.php]"]
end

subgraph group_domain["Domain &amp; Persistence"]
  node_users["Users<br/>Eloquent model<br/>[User.php]"]
  node_fields["Sports Fields<br/>Eloquent model<br/>[Lapangan.php]"]
  node_reservations["Reservations<br/>Eloquent model<br/>[Reservasi.php]"]
  node_schema[("Database Schema<br/>Laravel migrations")]
end

subgraph group_platform["Platform Services"]
  node_database[("Configured Database<br/>database connection<br/>[database.php]")]
  node_auth["Authentication<br/>Laravel auth and Sanctum<br/>[auth.php]"]
  node_file_storage[("Managed File Storage<br/>Laravel filesystem")]
  node_filesystem_config["Filesystem Configuration<br/>storage configuration<br/>[filesystems.php]"]
  node_vite_assets["Vite Assets<br/>frontend build entry<br/>[app.js]"]
end

node_public_entry -->|"boots"| node_app_bootstrap
node_app_bootstrap -->|"loads"| node_web_routes
node_app_bootstrap -->|"loads"| node_api_routes
node_web_routes -->|"protects routes with"| node_role_gate
node_web_routes -->|"dispatches"| node_web_controllers
node_web_routes -->|"dispatches"| node_reporting
node_api_routes -->|"protects routes with"| node_role_gate
node_api_routes -->|"dispatches"| node_api_controllers
node_web_controllers -->|"validates creation"| node_reservation_request
node_web_controllers -->|"validates upload"| node_proof_request
node_web_controllers -->|"renders"| node_blade_views
node_web_controllers -->|"renders"| node_proof_upload_view
node_web_controllers -->|"manages"| node_fields
node_web_controllers -->|"creates and updates"| node_reservations
node_proof_request -->|"accepts evidence for"| node_file_storage
node_reporting -->|"queries"| node_reservations
node_reporting -->|"renders PDF view"| node_blade_views
node_api_controllers -->|"formats responses with"| node_lapangan_resource
node_api_controllers -->|"operates on"| node_fields
node_role_gate -->|"uses identity"| node_auth
node_auth -->|"authenticates"| node_users
node_users -->|"persists through"| node_database
node_fields -->|"persists through"| node_database
node_reservations -->|"persists through"| node_database
node_schema -->|"defines"| node_database
node_filesystem_config -->|"configures disks for"| node_file_storage
node_vite_assets -->|"supplies client assets"| node_blade_views

click node_public_entry "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/public/index.php"
click node_app_bootstrap "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/routes/web.php"
click node_api_routes "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/routes/api.php"
click node_web_controllers "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/ReservasiController.php"
click node_blade_views "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/views/reservasis/create.blade.php"
click node_reservation_request "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Requests/StoreReservasiRequest.php"
click node_proof_request "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Requests/UploadBuktiRequest.php"
click node_proof_upload_view "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/views/reservasis/upload-bukti.blade.php"
click node_reporting "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/LaporanController.php"
click node_api_controllers "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/Api/LapanganController.php"
click node_lapangan_resource "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Resources/LapanganResource.php"
click node_role_gate "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Middleware/CheckRole.php"
click node_users "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/User.php"
click node_fields "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/Lapangan.php"
click node_reservations "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/Reservasi.php"
click node_schema "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/database/migrations/2026_07_16_074117_create_reservasis_table.php"
click node_database "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/database.php"
click node_auth "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/auth.php"
click node_file_storage "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/tree/main/storage/app"
click node_filesystem_config "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/filesystems.php"
click node_vite_assets "https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/js/app.js"

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_public_entry,node_app_bootstrap,node_web_routes,node_api_routes toneBlue
class node_web_controllers,node_blade_views,node_reservation_request,node_proof_request,node_proof_upload_view,node_reporting,node_api_controllers,node_lapangan_resource,node_role_gate toneAmber
class node_users,node_fields,node_reservations,node_schema toneMint
class node_database,node_auth,node_file_storage,node_filesystem_config,node_vite_assets toneRose
```

## Components

### HTTP Delivery

- [Public Entry](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/public/index.php): Laravel entry point · `public/index.php`
- [Application Bootstrap](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/bootstrap/app.php): Laravel bootstrap · `bootstrap/app.php`
- [Web Routes](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/routes/web.php): route definitions · Dispatches server-rendered browser workflows. · `routes/web.php`
- [API Routes](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/routes/api.php): route definitions · `routes/api.php`

### Application Workflows

- [Web Controllers](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/ReservasiController.php): MVC controllers · Handles field, reservation, and session-auth UI actions. · `app/Http/Controllers/ReservasiController.php`
- [Blade UI](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/views/reservasis/create.blade.php): server-rendered views · Renders field management and reservation screens. · `resources/views/reservasis/create.blade.php`
- [Reservation Validation](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Requests/StoreReservasiRequest.php): form request · `app/Http/Requests/StoreReservasiRequest.php`
- [Proof Upload Validation](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Requests/UploadBuktiRequest.php): form request · `app/Http/Requests/UploadBuktiRequest.php`
- [Proof Upload UI](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/views/reservasis/upload-bukti.blade.php): Blade view · `resources/views/reservasis/upload-bukti.blade.php`
- [Reservation Reports](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/LaporanController.php): report controller · Produces reservation report/PDF output. · `app/Http/Controllers/LaporanController.php`
- [API Controllers](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Controllers/Api/LapanganController.php): API controllers · Exposes authentication and field operations. · `app/Http/Controllers/Api/LapanganController.php`
- [Field API Resource](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Resources/LapanganResource.php): API resource · Shapes field responses. · `app/Http/Resources/LapanganResource.php`
- [Role Gate](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Http/Middleware/CheckRole.php): HTTP middleware · `app/Http/Middleware/CheckRole.php`

### Domain & Persistence

- [Users](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/User.php): Eloquent model · `app/Models/User.php`
- [Sports Fields](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/Lapangan.php): Eloquent model · `app/Models/Lapangan.php`
- [Reservations](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/app/Models/Reservasi.php): Eloquent model · `app/Models/Reservasi.php`
- [Database Schema](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/database/migrations/2026_07_16_074117_create_reservasis_table.php): Laravel migrations · Owns user, field, reservation, and token tables. · `database/migrations/2026_07_16_074117_create_reservasis_table.php`

### Platform Services

- [Configured Database](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/database.php): database connection · `config/database.php`
- [Authentication](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/auth.php): Laravel auth and Sanctum · Supports web sessions and API tokens. · `config/auth.php`
- [Managed File Storage](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/tree/main/storage/app): Laravel filesystem · Stores uploaded payment evidence under storage/app. · `storage/app`
- [Filesystem Configuration](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/config/filesystems.php): storage configuration · `config/filesystems.php`
- [Vite Assets](https://github.com/warblus75-lgtm/sistemreservasilapanganfutsal/blob/main/resources/js/app.js): frontend build entry · Builds CSS and JavaScript for Blade pages. · `resources/js/app.js`

## Connections

- Public Entry → Application Bootstrap: boots
- Application Bootstrap → Web Routes: loads
- Application Bootstrap → API Routes: loads
- Web Routes → Role Gate: protects routes with
- Web Routes → Web Controllers: dispatches
- Web Routes → Reservation Reports: dispatches
- API Routes → Role Gate: protects routes with
- API Routes → API Controllers: dispatches
- Web Controllers → Reservation Validation: validates creation
- Web Controllers → Proof Upload Validation: validates upload
- Web Controllers → Blade UI: renders
- Web Controllers → Proof Upload UI: renders
- Web Controllers → Sports Fields: manages
- Web Controllers → Reservations: creates and updates
- Proof Upload Validation → Managed File Storage: accepts evidence for
- Reservation Reports → Reservations: queries
- Reservation Reports → Blade UI: renders PDF view
- API Controllers → Field API Resource: formats responses with
- API Controllers → Sports Fields: operates on
- Role Gate → Authentication: uses identity
- Authentication → Users: authenticates
- Users → Configured Database: persists through
- Sports Fields → Configured Database: persists through
- Reservations → Configured Database: persists through
- Database Schema → Configured Database: defines
- Filesystem Configuration → Managed File Storage: configures disks for
- Vite Assets → Blade UI: supplies client assets
