# oktaviasiahaan443-art/uasprakpwebvia architecture

> Architecture diagram of the GitHub repository oktaviasiahaan443-art/uasprakpwebvia, 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/oktaviasiahaan443-art/uasprakpwebvia
- Repository: https://github.com/oktaviasiahaan443-art/uasprakpwebvia

## Overview

#### Purpose and Runtime

This is a Laravel PHP application for managing sports-field (`Lapangan`) reservations (`Reservasi`). It provides separate member and admin experiences: members create and review bookings; admins manage fields, verify reservations, and produce PDF receipts/reports. Laravel is served through `public/index.php`, bootstrapped by `bootstrap/app.php`, with CLI operations via `artisan`.

#### HTTP Entry Points and Routing

Browser routes are defined in `routes/web.php`; API routes and their controller boundary are in `routes/api.php` and `app/Http/Controllers/ApiController.php`. Requests enter Laravel middleware, route to controllers, validate through Form Requests, then render Blade pages or API resources. The repository also has the standard authentication route/controller flow under `app/Http/Controllers/Auth`.

#### Identity, Authentication, and Authorization

`User` is the principal identity model, backed by the users migration and Laravel authentication configuration:
- `app/Models/User.php`
- `database/migrations/0001_01_01_000000_create_users_table.php`
- `config/auth.php`

Authentication includes registration, login, password reset, email verification, and password confirmation through `app/Http/Controllers/Auth/RegisteredUserController.php` and `app/Http/Controllers/Auth/AuthenticatedSessionController.php`. Role-based access is an explicit application boundary implemented in `app/Http/Middleware/RoleMiddleware.php`, separating admin operations from member workflows.

#### Core Domain and Persistence

The central relational domain is fields and their reservations:
- `app/Models/Lapangan.php`
- `app/Models/Reservasi.php`
- `database/migrations/2026_07_16_070628_create_lapangans_table.php`
- `database/migrations/2026_07_16_070634_create_reservasis_table.php`

Controllers own domain-facing HTTP actions: `app/Http/Controllers/LapanganController.php` handles field administration, while `app/Http/Controllers/ReservasiController.php` handles booking creation, history, and administrative verification. Seeders provide initial users and fields through `database/seeders/UserSeeder.php` and `database/seeders/LapanganSeeder.php`.

#### Reservation and Validation Flow

A member request reaches reservation routes, is validated by `app/Http/Requests/ReservasiRequest.php`, persisted through `Reservasi`, and rendered to member reservation views such as `resources/views/member/reservasi/create.blade.php` and `resources/views/member/reservasi/history.blade.php`. Admins review and verify bookings through the same controller/domain boundary and `resources/views/admin/reservasi/verifikasi.blade.php`. Field create/update input is independently constrained by `app/Http/Requests/LapanganRequest.php` and `app/Http/Requests/UpdateLapanganRequest.php`.

#### Presentation and Document Output

The primary UI is server-rendered Blade, organized by role:
- `resources/views/admin/dashboard.blade.php`
- `resources/views/member/dashboard.blade.php`
- `resources/views/layouts/app.blade.php`

`app/Http/Controllers/PdfController.php` is the document-generation boundary, with receipt and reporting templates at `resources/views/admin/pdf/kwitansi.blade.php` and `resources/views/admin/pdf/laporan.blade.php`. The exact PDF library/service is not identifiable from the supplied tree.

#### Infrastructure Boundaries

Persistence, sessions, cache, mail, queues, filesystems, and logging are Laravel-configurable infrastructure concerns under `config/database.php`, `config/session.php`, `config/mail.php`, `config/queue.php`, and `config/filesystems.php`. Database migrations include cache and job tables, so database-backed cache/queue operation is supported by schema. Frontend assets are built with Vite from `resources/js/app.js` and `resources/css/app.css`; application-generated files use Laravel storage paths under `storage/app`.

Main entry points: [`routes/web.php`](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/routes/web.php) (Web routes), [`app/Http/Controllers/ReservasiController.php`](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/ReservasiController.php) (Reservation controller), [`app/Models/Reservasi.php`](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/Reservasi.php) (Reservasi), [`bootstrap/app.php`](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/bootstrap/app.php) (Application bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Laravel Runtime"]
  node_public["Web entry point<br/>PHP entry<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>Laravel bootstrap<br/>[app.php]"]
  node_artisan["CLI entry point<br/>Laravel CLI"]
end

subgraph group_http["HTTP &amp; Access"]
  node_web_routes["Web routes<br/>route definitions<br/>[web.php]"]
  node_api_routes["API routes<br/>route definitions<br/>[api.php]"]
  node_auth["Authentication flow<br/>auth controllers"]
  node_roles{{"Role authorization<br/>middleware<br/>[RoleMiddleware.php]"}}
  node_api_controller["API controller<br/>API boundary<br/>[ApiController.php]"]
end

subgraph group_domain["Reservation Domain"]
  node_reservation_controller["Reservation controller<br/>HTTP controller"]
  node_field_controller["Field controller<br/>HTTP controller"]
  node_reservation_validation["Reservation validation<br/>form request"]
  node_field_validation["Field validation<br/>form requests"]
  node_reservation["Reservasi<br/>Eloquent model<br/>[Reservasi.php]"]
  node_field["Lapangan<br/>Eloquent model<br/>[Lapangan.php]"]
end

subgraph group_presentation["Presentation &amp; Output"]
  node_blade_ui["Role-based Blade UI<br/>server-rendered views<br/>[app.blade.php]"]
  node_pdf_controller["PDF generation<br/>document controller<br/>[PdfController.php]"]
  node_pdf_templates["PDF templates<br/>Blade documents<br/>[kwitansi.blade.php]"]
  node_vite_assets["Vite assets<br/>frontend build entry<br/>[app.js]"]
end

subgraph group_data["Data &amp; Infrastructure"]
  node_user["User<br/>identity model<br/>[User.php]"]
  node_database[("Relational database<br/>Laravel persistence")]
  node_seeders["Initial data seeders<br/>database seeders<br/>[UserSeeder.php]"]
end

node_public -->|"boots"| node_bootstrap
node_artisan -->|"boots"| node_bootstrap
node_bootstrap -->|"serves"| node_web_routes
node_bootstrap -->|"serves"| node_api_routes
node_web_routes -->|"auth endpoints"| node_auth
node_web_routes -->|"protects routes with"| node_roles
node_web_routes -->|"booking routes"| node_reservation_controller
node_web_routes -->|"field routes"| node_field_controller
node_api_routes -->|"dispatches"| node_api_controller
node_auth -->|"authenticates"| node_user
node_roles -->|"gates admin actions"| node_reservation_controller
node_reservation_controller -->|"validates input"| node_reservation_validation
node_reservation_controller -->|"creates and verifies"| node_reservation
node_reservation_controller -->|"renders"| node_blade_ui
node_field_controller -->|"validates input"| node_field_validation
node_field_controller -->|"manages"| node_field
node_reservation -->|"belongs to"| node_field
node_reservation -->|"belongs to"| node_user
node_user -->|"persists"| node_database
node_field -->|"persists"| node_database
node_reservation -->|"persists"| node_database
node_seeders -->|"seeds"| node_user
node_seeders -->|"seeds"| node_field
node_pdf_controller -->|"uses booking data"| node_reservation
node_pdf_controller -->|"renders"| node_pdf_templates
node_blade_ui -.->|"loads built assets"| node_vite_assets

click node_public "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/public/index.php"
click node_bootstrap "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/bootstrap/app.php"
click node_artisan "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/artisan"
click node_web_routes "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/routes/web.php"
click node_api_routes "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/routes/api.php"
click node_auth "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_roles "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Middleware/RoleMiddleware.php"
click node_api_controller "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/ApiController.php"
click node_reservation_controller "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/ReservasiController.php"
click node_field_controller "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/LapanganController.php"
click node_reservation_validation "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Requests/ReservasiRequest.php"
click node_field_validation "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Requests/LapanganRequest.php"
click node_reservation "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/Reservasi.php"
click node_field "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/Lapangan.php"
click node_user "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/User.php"
click node_database "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/database/migrations/2026_07_16_070634_create_reservasis_table.php"
click node_seeders "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/database/seeders/UserSeeder.php"
click node_blade_ui "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/resources/views/layouts/app.blade.php"
click node_pdf_controller "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/PdfController.php"
click node_pdf_templates "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/resources/views/admin/pdf/kwitansi.blade.php"
click node_vite_assets "https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/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,node_bootstrap,node_artisan toneBlue
class node_web_routes,node_api_routes,node_auth,node_roles,node_api_controller toneAmber
class node_reservation_controller,node_field_controller,node_reservation_validation,node_field_validation,node_reservation,node_field toneMint
class node_blade_ui,node_pdf_controller,node_pdf_templates,node_vite_assets toneRose
class node_user,node_database,node_seeders toneIndigo
```

## Components

### Laravel Runtime

- [Web entry point](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/public/index.php): PHP entry · `public/index.php`
- [Application bootstrap](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/bootstrap/app.php): Laravel bootstrap · `bootstrap/app.php`
- [CLI entry point](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/artisan): Laravel CLI · `artisan`

### HTTP & Access

- [Web routes](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/routes/web.php): route definitions · `routes/web.php`
- [API routes](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/routes/api.php): route definitions · `routes/api.php`
- [Authentication flow](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php): auth controllers · Registration and session authentication endpoints. · `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Role authorization](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Middleware/RoleMiddleware.php): middleware · Separates admin operations from member workflows. · `app/Http/Middleware/RoleMiddleware.php`
- [API controller](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/ApiController.php): API boundary · `app/Http/Controllers/ApiController.php`

### Reservation Domain

- [Reservation controller](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/ReservasiController.php): HTTP controller · Handles member bookings, history, and admin verification. · `app/Http/Controllers/ReservasiController.php`
- [Field controller](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/LapanganController.php): HTTP controller · `app/Http/Controllers/LapanganController.php`
- [Reservation validation](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Requests/ReservasiRequest.php): form request · `app/Http/Requests/ReservasiRequest.php`
- [Field validation](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Requests/LapanganRequest.php): form requests · Validates field create and update input. · `app/Http/Requests/LapanganRequest.php`
- [Reservasi](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/Reservasi.php): Eloquent model · `app/Models/Reservasi.php`
- [Lapangan](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/Lapangan.php): Eloquent model · `app/Models/Lapangan.php`

### Presentation & Output

- [Role-based Blade UI](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/resources/views/layouts/app.blade.php): server-rendered views · Member and admin dashboards and reservation pages. · `resources/views/layouts/app.blade.php`
- [PDF generation](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Http/Controllers/PdfController.php): document controller · Produces receipts and reservation reports. · `app/Http/Controllers/PdfController.php`
- [PDF templates](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/resources/views/admin/pdf/kwitansi.blade.php): Blade documents · `resources/views/admin/pdf/kwitansi.blade.php`
- [Vite assets](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/resources/js/app.js): frontend build entry · `resources/js/app.js`

### Data & Infrastructure

- [User](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/app/Models/User.php): identity model · `app/Models/User.php`
- [Relational database](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/database/migrations/2026_07_16_070634_create_reservasis_table.php): Laravel persistence · Users, fields, reservations, cache, and jobs are schema-backed. · `database/migrations/2026_07_16_070634_create_reservasis_table.php`
- [Initial data seeders](https://github.com/oktaviasiahaan443-art/uasprakpwebvia/blob/master/database/seeders/UserSeeder.php): database seeders · Seeds users and fields. · `database/seeders/UserSeeder.php`

## Connections

- Web entry point → Application bootstrap: boots
- CLI entry point → Application bootstrap: boots
- Application bootstrap → Web routes: serves
- Application bootstrap → API routes: serves
- Web routes → Authentication flow: auth endpoints
- Web routes → Role authorization: protects routes with
- Web routes → Reservation controller: booking routes
- Web routes → Field controller: field routes
- API routes → API controller: dispatches
- Authentication flow → User: authenticates
- Role authorization → Reservation controller: gates admin actions
- Reservation controller → Reservation validation: validates input
- Reservation controller → Reservasi: creates and verifies
- Reservation controller → Role-based Blade UI: renders
- Field controller → Field validation: validates input
- Field controller → Lapangan: manages
- Reservasi → Lapangan: belongs to
- Reservasi → User: belongs to
- User → Relational database: persists
- Lapangan → Relational database: persists
- Reservasi → Relational database: persists
- Initial data seeders → User: seeds
- Initial data seeders → Lapangan: seeds
- PDF generation → Reservasi: uses booking data
- PDF generation → PDF templates: renders
- Role-based Blade UI → Vite assets: loads built assets
