# eukharistiamanurung/uas_224520026 architecture

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

## Overview

#### Purpose and entry points
This is a Laravel server-rendered application for managing sports-field (`Lapangan`) reservations (`Reservasi`). It supports member booking/history flows and admin field, reservation-verification, reporting, and receipt flows. HTTP enters at `public/index.php`, is bootstrapped by `bootstrap/app.php`, and is dispatched through `routes/web.php` or `routes/api.php`.

#### Routing, controllers, and delivery surfaces
Web routes drive Blade pages through domain controllers: `app/Http/Controllers/LapanganController.php`, `app/Http/Controllers/ReservasiController.php`, and `app/Http/Controllers/PdfController.php`. Authentication/profile routes are handled by Laravel/Breeze-style controllers under `app/Http/Controllers/Auth` and `app/Http/Controllers/ProfileController.php`. A separate API boundary exists via `routes/api.php`, `app/Http/Controllers/ApiController.php`, and `app/Http/Resources/LapanganResource.php`.

#### Identity and authorization
Users are the principal identity and likely carry role-dependent behavior for admin versus member areas. Authentication, registration, password reset, and email verification are implemented in `app/Http/Controllers/Auth/AuthenticatedSessionController.php`, `app/Http/Controllers/Auth/RegisteredUserController.php`, and `app/Models/User.php`. Role enforcement is a custom middleware boundary at `app/Http/Middleware/RoleMiddleware.php`; route placement and middleware determine access to administrative management and reservation approval workflows.

#### Reservation domain and persistence
The core persisted aggregate consists of users, fields, and reservations: `app/Models/User.php`, `app/Models/Lapangan.php`, and `app/Models/Reservasi.php`. Schema ownership is explicit in `database/migrations/2026_07_16_070628_create_lapangans_table.php` and `database/migrations/2026_07_16_070634_create_reservasis_table.php`, alongside the standard user migration. Controllers mediate reads and state changes rather than exposing models directly; input is constrained at the HTTP boundary by `app/Http/Requests/ReservasiRequest.php` and field-specific request classes.

#### Primary application flows
Members navigate to a dashboard, create reservations, and inspect their history through `resources/views/member/dashboard.blade.php`, `resources/views/member/reservasi/create.blade.php`, and `resources/views/member/reservasi/history.blade.php`. Admins maintain field inventory and review/verify reservations via `resources/views/admin/lapangan/index.blade.php`, `resources/views/admin/reservasi/index.blade.php`, and `resources/views/admin/reservasi/verifikasi.blade.php`. The likely control path is route → middleware/auth → controller → validated request → Eloquent model/database → Blade redirect/render.

#### Reporting and document boundary
PDF generation is isolated behind `app/Http/Controllers/PdfController.php`, with dedicated document templates at `resources/views/admin/pdf/kwitansi.blade.php` and `resources/views/admin/pdf/laporan.blade.php`. This separates printable receipts and administrative reports from interactive reservation pages, while still sourcing domain data through the application’s model/controller layer.

#### Runtime and infrastructure
The runtime is PHP/Laravel, managed through `artisan` and Composer (`composer.json`), with a Vite-built frontend asset pipeline (`package.json`, `vite.config.js`). Laravel configuration exposes database, session, cache, queue, mail, filesystem, and logging infrastructure under `config/`. Database seeders (`database/seeders/UserSeeder.php`, `database/seeders/LapanganSeeder.php`) provide initial operational data. No specific external payment, storage, or third-party service integration is evidenced by the supplied tree.

Main entry points: [`app/Http/Controllers/ReservasiController.php`](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/ReservasiController.php) (Reservation workflow), [`app/Models/Reservasi.php`](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Reservasi.php) (Reservations), [`app/Models/Lapangan.php`](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Lapangan.php) (Fields), [`bootstrap/app.php`](https://github.com/eukharistiamanurung/uas_224520026/blob/main/bootstrap/app.php) (Laravel bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP entry and routing"]
  node_public_index["PHP entry point<br/>Laravel entry<br/>[index.php]"]
  node_bootstrap["Laravel bootstrap<br/>[app.php]"]
  node_web_routes["Web routes<br/>route boundary<br/>[web.php]"]
  node_api_routes["API routes<br/>route boundary<br/>[api.php]"]
end

subgraph group_application["Application layer"]
  node_auth_controllers["Authentication flows<br/>auth controllers"]
  node_role_middleware["Role enforcement<br/>middleware<br/>[RoleMiddleware.php]"]
  node_lapangan_controller["Field management<br/>controller"]
  node_reservasi_controller["Reservation workflow<br/>controller"]
  node_reservation_request["Reservation validation<br/>form request"]
  node_pdf_controller["Reports and receipts<br/>PDF controller<br/>[PdfController.php]"]
  node_api_controller["Field API<br/>API controller<br/>[ApiController.php]"]
  node_lapangan_resource["Field API resource"]
end

subgraph group_delivery["Delivery surfaces"]
  node_member_views["Member pages<br/>Blade views"]
  node_admin_views["Admin pages<br/>Blade views"]
  node_pdf_templates["Printable templates<br/>Blade PDF views<br/>[kwitansi.blade.php]"]
end

subgraph group_data["Domain and persistence"]
  node_user_model["Users<br/>Eloquent model<br/>[User.php]"]
  node_lapangan_model["Fields<br/>Eloquent model<br/>[Lapangan.php]"]
  node_reservasi_model["Reservations<br/>Eloquent model<br/>[Reservasi.php]"]
  node_lapangan_schema[("Field schema<br/>migration")]
  node_reservasi_schema[("Reservation schema<br/>migration")]
end

node_public_index -->|"boots"| node_bootstrap
node_bootstrap -->|"dispatches"| node_web_routes
node_bootstrap -->|"dispatches"| node_api_routes
node_web_routes -->|"auth routes"| node_auth_controllers
node_web_routes -->|"protects areas"| node_role_middleware
node_role_middleware -->|"admin access"| node_lapangan_controller
node_role_middleware -->|"member/admin access"| node_reservasi_controller
node_auth_controllers -->|"authenticates"| node_user_model
node_lapangan_controller -->|"manages"| node_lapangan_model
node_lapangan_controller -->|"renders"| node_admin_views
node_reservasi_controller -->|"validates input"| node_reservation_request
node_reservasi_controller -->|"reads and changes"| node_reservasi_model
node_reservasi_controller -->|"renders"| node_member_views
node_reservasi_controller -->|"renders"| node_admin_views
node_pdf_controller -->|"sources data"| node_reservasi_model
node_pdf_controller -->|"generates"| node_pdf_templates
node_api_routes -->|"dispatches"| node_api_controller
node_api_controller -->|"reads"| node_lapangan_model
node_api_controller -->|"serializes"| node_lapangan_resource
node_reservasi_model -->|"belongs to"| node_user_model
node_reservasi_model -->|"books"| node_lapangan_model
node_lapangan_model -->|"persisted by"| node_lapangan_schema
node_reservasi_model -->|"persisted by"| node_reservasi_schema

click node_public_index "https://github.com/eukharistiamanurung/uas_224520026/blob/main/public/index.php"
click node_bootstrap "https://github.com/eukharistiamanurung/uas_224520026/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/eukharistiamanurung/uas_224520026/blob/main/routes/web.php"
click node_api_routes "https://github.com/eukharistiamanurung/uas_224520026/blob/main/routes/api.php"
click node_auth_controllers "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_role_middleware "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_lapangan_controller "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/LapanganController.php"
click node_reservasi_controller "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/ReservasiController.php"
click node_reservation_request "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Requests/ReservasiRequest.php"
click node_pdf_controller "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/PdfController.php"
click node_api_controller "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/ApiController.php"
click node_lapangan_resource "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Resources/LapanganResource.php"
click node_member_views "https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/member/dashboard.blade.php"
click node_admin_views "https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/admin/reservasi/verifikasi.blade.php"
click node_pdf_templates "https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/admin/pdf/kwitansi.blade.php"
click node_user_model "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/User.php"
click node_lapangan_model "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Lapangan.php"
click node_reservasi_model "https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Reservasi.php"
click node_lapangan_schema "https://github.com/eukharistiamanurung/uas_224520026/blob/main/database/migrations/2026_07_16_070628_create_lapangans_table.php"
click node_reservasi_schema "https://github.com/eukharistiamanurung/uas_224520026/blob/main/database/migrations/2026_07_16_070634_create_reservasis_table.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_public_index,node_bootstrap,node_web_routes,node_api_routes toneBlue
class node_auth_controllers,node_role_middleware,node_lapangan_controller,node_reservasi_controller,node_reservation_request,node_pdf_controller,node_api_controller,node_lapangan_resource toneAmber
class node_member_views,node_admin_views,node_pdf_templates toneMint
class node_user_model,node_lapangan_model,node_reservasi_model,node_lapangan_schema,node_reservasi_schema toneRose
```

## Components

### HTTP entry and routing

- [PHP entry point](https://github.com/eukharistiamanurung/uas_224520026/blob/main/public/index.php): Laravel entry · `public/index.php`
- [Laravel bootstrap](https://github.com/eukharistiamanurung/uas_224520026/blob/main/bootstrap/app.php): bootstrap · `bootstrap/app.php`
- [Web routes](https://github.com/eukharistiamanurung/uas_224520026/blob/main/routes/web.php): route boundary · Member and admin browser routes. · `routes/web.php`
- [API routes](https://github.com/eukharistiamanurung/uas_224520026/blob/main/routes/api.php): route boundary · `routes/api.php`

### Application layer

- [Authentication flows](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): auth controllers · Login, registration, reset, and verification. · `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Role enforcement](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Middleware/RoleMiddleware.php): middleware · Separates admin and member access. · `app/Http/Middleware/RoleMiddleware.php`
- [Field management](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/LapanganController.php): controller · `app/Http/Controllers/LapanganController.php`
- [Reservation workflow](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/ReservasiController.php): controller · Creates, lists, and verifies reservations. · `app/Http/Controllers/ReservasiController.php`
- [Reservation validation](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Requests/ReservasiRequest.php): form request · `app/Http/Requests/ReservasiRequest.php`
- [Reports and receipts](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/PdfController.php): PDF controller · `app/Http/Controllers/PdfController.php`
- [Field API](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Controllers/ApiController.php): API controller · `app/Http/Controllers/ApiController.php`
- [Field API resource](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Http/Resources/LapanganResource.php): API resource · `app/Http/Resources/LapanganResource.php`

### Delivery surfaces

- [Member pages](https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/member/dashboard.blade.php): Blade views · Dashboard, booking, and reservation history. · `resources/views/member/dashboard.blade.php`
- [Admin pages](https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/admin/reservasi/verifikasi.blade.php): Blade views · Field inventory and reservation verification. · `resources/views/admin/reservasi/verifikasi.blade.php`
- [Printable templates](https://github.com/eukharistiamanurung/uas_224520026/blob/main/resources/views/admin/pdf/kwitansi.blade.php): Blade PDF views · Receipt and report documents. · `resources/views/admin/pdf/kwitansi.blade.php`

### Domain and persistence

- [Users](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/User.php): Eloquent model · Identity and role-bearing accounts. · `app/Models/User.php`
- [Fields](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Lapangan.php): Eloquent model · `app/Models/Lapangan.php`
- [Reservations](https://github.com/eukharistiamanurung/uas_224520026/blob/main/app/Models/Reservasi.php): Eloquent model · Booking aggregate linking users and fields. · `app/Models/Reservasi.php`
- [Field schema](https://github.com/eukharistiamanurung/uas_224520026/blob/main/database/migrations/2026_07_16_070628_create_lapangans_table.php): migration · `database/migrations/2026_07_16_070628_create_lapangans_table.php`
- [Reservation schema](https://github.com/eukharistiamanurung/uas_224520026/blob/main/database/migrations/2026_07_16_070634_create_reservasis_table.php): migration · `database/migrations/2026_07_16_070634_create_reservasis_table.php`

## Connections

- PHP entry point → Laravel bootstrap: boots
- Laravel bootstrap → Web routes: dispatches
- Laravel bootstrap → API routes: dispatches
- Web routes → Authentication flows: auth routes
- Web routes → Role enforcement: protects areas
- Role enforcement → Field management: admin access
- Role enforcement → Reservation workflow: member/admin access
- Authentication flows → Users: authenticates
- Field management → Fields: manages
- Field management → Admin pages: renders
- Reservation workflow → Reservation validation: validates input
- Reservation workflow → Reservations: reads and changes
- Reservation workflow → Member pages: renders
- Reservation workflow → Admin pages: renders
- Reports and receipts → Reservations: sources data
- Reports and receipts → Printable templates: generates
- API routes → Field API: dispatches
- Field API → Fields: reads
- Field API → Field API resource: serializes
- Reservations → Users: belongs to
- Reservations → Fields: books
- Fields → Field schema: persisted by
- Reservations → Reservation schema: persisted by
