# rumintangpati-cloud/uas_023 architecture

> Architecture diagram of the GitHub repository rumintangpati-cloud/uas_023, 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/rumintangpati-cloud/uas_023
- Repository: https://github.com/rumintangpati-cloud/uas_023

## Overview

#### Purpose and Runtime
This is a Laravel/PHP application for managing sports fields (“lapangan”) and reservations (“reservasi”), with browser-rendered Blade pages plus a JSON API. It runs through the Laravel HTTP front controller at `public/index.php`; CLI and operational commands enter via `artisan`. The README is Laravel boilerplate, so repository intent is inferred from domain controllers, models, views, and migrations.

#### HTTP Entry and Route Boundaries
Web requests are defined in `routes/web.php` and authentication routes in `routes/auth.php`; API requests enter separately through `routes/api.php`. Laravel bootstrapping and middleware registration begin at `bootstrap/app.php`. This establishes a server-rendered web boundary versus an API boundary, rather than a standalone frontend application.

#### Identity, Sessions, and Authorization
User identity is persisted by `app/Models/User.php` and Laravel authentication configuration in `config/auth.php`. Browser login, registration, verification, password recovery, and session lifecycle are handled by the controllers in `app/Http/Controllers/Auth/`, including custom login/registration controllers. Role-based access is a distinct authorization layer implemented in `app/Http/Middleware/RoleMiddleware.php`; the user-role schema change is in `database/migrations/2026_07_16_072007_add_role_to_users_table.php`.

#### Field Management Domain
`Lapangan` is the managed resource, represented by `app/Models/Lapangan.php` and stored through `database/migrations/2026_07_16_070036_create_lapangans_table.php`. `app/Http/Controllers/LapanganController.php` drives browser CRUD, validates writes through `app/Http/Requests/StoreLapanganRequest.php` and `app/Http/Requests/UpdateLapanganRequest.php`, and renders the views under `resources/views/lapangan/`. API-specific field presentation is isolated in `app/Http/Controllers/Api/LapanganApiController.php` and `app/Http/Resources/LapanganResource.php`.

#### Reservation Workflow
Reservation records are modeled by `app/Models/Reservasi.php`, with persistence defined in `database/migrations/2026_07_16_070124_create_reservasis_table.php`. `app/Http/Controllers/ReservasiController.php` is the workflow boundary for creating and listing reservations; incoming creation data is validated by `app/Http/Requests/StoreReservasiRequest.php`. The browser flow renders reservation forms/listing and a receipt (`resources/views/reservasi/create.blade.php`, `resources/views/reservasi/index.blade.php`, `resources/views/reservasi/kwitansi.blade.php`).

#### Presentation and Client Assets
Server-side responses use Blade layouts and reusable components, anchored by `resources/views/layouts/app.blade.php` and `resources/views/layouts/guest.blade.php`. Domain pages live under `resources/views/lapangan/` and `resources/views/reservasi/`. CSS/JS source assets in `resources/css/app.css` and `resources/js/app.js` are built by Vite and deployed as versioned public assets in `public/build/`.

#### Persistence and Infrastructure
Laravel Eloquent mediates application models and the configured database (`config/database.php`); migrations include users, fields, reservations, cache, and jobs tables. Session, cache, queue, mail, filesystem, and logging backends are environment-configured through `config/session.php`, `config/cache.php`, `config/queue.php`, `config/mail.php`, and `config/filesystems.php`. No concrete third-party business service integration is evidenced in the tree; these Laravel infrastructure abstractions are the principal external-service boundaries.

Main entry points: [`bootstrap/app.php`](https://github.com/rumintangpati-cloud/uas_023/blob/main/bootstrap/app.php) (Application bootstrap), [`routes/web.php`](https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/LapanganController.php`](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/LapanganController.php) (Field management), [`app/Http/Controllers/ReservasiController.php`](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/ReservasiController.php) (Reservation workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Runtime &amp; Routing"]
  node_http{{"Laravel HTTP runtime<br/>front controller<br/>[index.php]"}}
  node_bootstrap["Application bootstrap<br/>Laravel bootstrap<br/>[app.php]"]
  node_web_routes["Web routes<br/>route boundary<br/>[web.php]"]
  node_auth_routes["Auth routes<br/>route boundary<br/>[auth.php]"]
  node_api_routes["API routes<br/>route boundary<br/>[api.php]"]
  node_artisan{{"Artisan CLI<br/>command entry"}}
end

subgraph group_identity["Identity &amp; Access"]
  node_auth_controllers["Authentication flow<br/>auth controllers"]
  node_user["User identity<br/>Eloquent model<br/>[User.php]"]
  node_role_middleware["Role authorization<br/>HTTP middleware<br/>[RoleMiddleware.php]"]
end

subgraph group_domain["Sports Domain"]
  node_lapangan_controller["Field management<br/>web controller"]
  node_lapangan_requests["Field validation<br/>form requests"]
  node_lapangan_api["Field JSON API<br/>API controller"]
  node_lapangan_resource["Field API representation<br/>JSON resource"]
  node_lapangan["Sports field<br/>Eloquent model<br/>[Lapangan.php]"]
  node_reservasi_controller["Reservation workflow<br/>web controller"]
  node_reservasi_request["Reservation validation<br/>form request"]
  node_reservasi["Reservation<br/>Eloquent model<br/>[Reservasi.php]"]
end

subgraph group_presentation["Presentation"]
  node_blade_views["Blade pages<br/>server-rendered views<br/>[app.blade.php]"]
  node_vite_assets["Vite client assets<br/>asset pipeline<br/>[app.css]"]
end

subgraph group_infrastructure["Persistence &amp; Infrastructure"]
  node_database[("Configured database<br/>database boundary<br/>[database.php]")]
  node_operations["Laravel backends<br/>infrastructure boundary<br/>[session.php]"]
end

node_http -->|"boots"| node_bootstrap
node_bootstrap -->|"registers"| node_web_routes
node_bootstrap -->|"registers"| node_auth_routes
node_bootstrap -->|"registers"| node_api_routes
node_web_routes -->|"guards"| node_role_middleware
node_auth_routes -->|"dispatches"| node_auth_controllers
node_auth_controllers -->|"authenticates"| node_user
node_role_middleware -->|"checks role"| node_user
node_web_routes -->|"dispatches"| node_lapangan_controller
node_web_routes -->|"dispatches"| node_reservasi_controller
node_api_routes -->|"dispatches"| node_lapangan_api
node_lapangan_controller -->|"validates writes"| node_lapangan_requests
node_lapangan_controller -->|"manages"| node_lapangan
node_lapangan_api -->|"reads"| node_lapangan
node_lapangan_api -->|"serializes"| node_lapangan_resource
node_reservasi_controller -->|"validates creation"| node_reservasi_request
node_reservasi_controller -->|"creates and lists"| node_reservasi
node_lapangan_controller -->|"renders"| node_blade_views
node_reservasi_controller -->|"renders"| node_blade_views
node_auth_controllers -->|"renders"| node_blade_views
node_lapangan -->|"persists via Eloquent"| node_database
node_reservasi -->|"persists via Eloquent"| node_database
node_user -->|"persists via Eloquent"| node_database
node_bootstrap -.->|"configures"| node_operations
node_vite_assets -->|"styles and enhances"| node_blade_views
node_artisan -->|"boots application"| node_bootstrap

click node_http "https://github.com/rumintangpati-cloud/uas_023/blob/main/public/index.php"
click node_bootstrap "https://github.com/rumintangpati-cloud/uas_023/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/web.php"
click node_auth_routes "https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/auth.php"
click node_api_routes "https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/api.php"
click node_artisan "https://github.com/rumintangpati-cloud/uas_023/blob/main/artisan"
click node_auth_controllers "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_user "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/User.php"
click node_role_middleware "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_lapangan_controller "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/LapanganController.php"
click node_lapangan_requests "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Requests/StoreLapanganRequest.php"
click node_lapangan_api "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/Api/LapanganApiController.php"
click node_lapangan_resource "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Resources/LapanganResource.php"
click node_lapangan "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/Lapangan.php"
click node_reservasi_controller "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/ReservasiController.php"
click node_reservasi_request "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Requests/StoreReservasiRequest.php"
click node_reservasi "https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/Reservasi.php"
click node_blade_views "https://github.com/rumintangpati-cloud/uas_023/blob/main/resources/views/layouts/app.blade.php"
click node_vite_assets "https://github.com/rumintangpati-cloud/uas_023/blob/main/resources/css/app.css"
click node_database "https://github.com/rumintangpati-cloud/uas_023/blob/main/config/database.php"
click node_operations "https://github.com/rumintangpati-cloud/uas_023/blob/main/config/session.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_http,node_bootstrap,node_web_routes,node_auth_routes,node_api_routes,node_artisan toneBlue
class node_auth_controllers,node_user,node_role_middleware toneAmber
class node_lapangan_controller,node_lapangan_requests,node_lapangan_api,node_lapangan_resource,node_lapangan,node_reservasi_controller,node_reservasi_request,node_reservasi toneMint
class node_blade_views,node_vite_assets toneRose
class node_database,node_operations toneIndigo
```

## Components

### Runtime & Routing

- [Laravel HTTP runtime](https://github.com/rumintangpati-cloud/uas_023/blob/main/public/index.php): front controller · `public/index.php`
- [Application bootstrap](https://github.com/rumintangpati-cloud/uas_023/blob/main/bootstrap/app.php): Laravel bootstrap · Registers middleware and application configuration. · `bootstrap/app.php`
- [Web routes](https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/web.php): route boundary · Browser and authenticated application routes. · `routes/web.php`
- [Auth routes](https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/auth.php): route boundary · `routes/auth.php`
- [API routes](https://github.com/rumintangpati-cloud/uas_023/blob/main/routes/api.php): route boundary · JSON API boundary. · `routes/api.php`
- [Artisan CLI](https://github.com/rumintangpati-cloud/uas_023/blob/main/artisan): command entry · `artisan`

### Identity & Access

- [Authentication flow](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): auth controllers · Login, registration, verification, recovery, and sessions. · `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [User identity](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/User.php): Eloquent model · `app/Models/User.php`
- [Role authorization](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Middleware/RoleMiddleware.php): HTTP middleware · `app/Http/Middleware/RoleMiddleware.php`

### Sports Domain

- [Field management](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/LapanganController.php): web controller · Browser CRUD for sports fields. · `app/Http/Controllers/LapanganController.php`
- [Field validation](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Requests/StoreLapanganRequest.php): form requests · `app/Http/Requests/StoreLapanganRequest.php`
- [Field JSON API](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/Api/LapanganApiController.php): API controller · `app/Http/Controllers/Api/LapanganApiController.php`
- [Field API representation](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Resources/LapanganResource.php): JSON resource · `app/Http/Resources/LapanganResource.php`
- [Sports field](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/Lapangan.php): Eloquent model · `app/Models/Lapangan.php`
- [Reservation workflow](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Controllers/ReservasiController.php): web controller · Creates and lists reservations and receipts. · `app/Http/Controllers/ReservasiController.php`
- [Reservation validation](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Http/Requests/StoreReservasiRequest.php): form request · `app/Http/Requests/StoreReservasiRequest.php`
- [Reservation](https://github.com/rumintangpati-cloud/uas_023/blob/main/app/Models/Reservasi.php): Eloquent model · `app/Models/Reservasi.php`

### Presentation

- [Blade pages](https://github.com/rumintangpati-cloud/uas_023/blob/main/resources/views/layouts/app.blade.php): server-rendered views · Layouts, field pages, and reservation forms, lists, and receipts. · `resources/views/layouts/app.blade.php`
- [Vite client assets](https://github.com/rumintangpati-cloud/uas_023/blob/main/resources/css/app.css): asset pipeline · Builds CSS and JavaScript into versioned public assets. · `resources/css/app.css`

### Persistence & Infrastructure

- [Configured database](https://github.com/rumintangpati-cloud/uas_023/blob/main/config/database.php): database boundary · Eloquent persistence configured by Laravel. · `config/database.php`
- [Laravel backends](https://github.com/rumintangpati-cloud/uas_023/blob/main/config/session.php): infrastructure boundary · Environment-configured session, cache, queue, mail, filesystem, and logging. · `config/session.php`

## Connections

- Laravel HTTP runtime → Application bootstrap: boots
- Application bootstrap → Web routes: registers
- Application bootstrap → Auth routes: registers
- Application bootstrap → API routes: registers
- Web routes → Role authorization: guards
- Auth routes → Authentication flow: dispatches
- Authentication flow → User identity: authenticates
- Role authorization → User identity: checks role
- Web routes → Field management: dispatches
- Web routes → Reservation workflow: dispatches
- API routes → Field JSON API: dispatches
- Field management → Field validation: validates writes
- Field management → Sports field: manages
- Field JSON API → Sports field: reads
- Field JSON API → Field API representation: serializes
- Reservation workflow → Reservation validation: validates creation
- Reservation workflow → Reservation: creates and lists
- Field management → Blade pages: renders
- Reservation workflow → Blade pages: renders
- Authentication flow → Blade pages: renders
- Sports field → Configured database: persists via Eloquent
- Reservation → Configured database: persists via Eloquent
- User identity → Configured database: persists via Eloquent
- Application bootstrap → Laravel backends: configures
- Vite client assets → Blade pages: styles and enhances
- Artisan CLI → Application bootstrap: boots application
