How anandasilvia2006-bit/uas_224520015 works
Purpose and entry points
This is a Laravel/PHP court-field reservation system (“lapangan”), with browser-rendered member/admin workflows and a separate API surface. HTTP starts at public/index.php, bootstraps through bootstrap/app.php, and dispatches web/API routes from routes/web.php and routes/api.php.
HTTP application surfaces
Web controllers implement login/registration, dashboards, field management, and reservations: app/Http/Controllers/AuthController.php, app/Http/Controllers/LapanganController.php, and app/Http/Controllers/ReservasiController.php. Their output is Blade HTML under resources/views/, including role-specific dashboards and reservation pages. API controllers provide parallel authentication and field endpoints in app/Http/Controllers/Api/AuthController.php and app/Http/Controllers/Api/LapanganController.php.
Identity, authorization, and roles
Laravel authentication configuration is centralized in config/auth.php; API token support is indicated by config/sanctum.php and the personal-access-token migration database/migrations/2026_07_16_072718_create_personal_access_tokens_table.php. Users carry a role added by database/migrations/2026_07_16_070214_add_role_to_users_table.php; role-gated access is enforced by app/Http/Middleware/RoleMiddleware.php. Dashboard branching is represented by resources/views/dashboard/admin.blade.php and resources/views/dashboard/member.blade.php.
Core reservation domain
The principal persisted entities are users, fields, and reservations: app/Models/User.php, app/Models/Lapangan.php, and app/Models/Reservasi.php. Schema establishes the field and reservation records in database/migrations/2026_07_16_070213_create_lapangans_table.php and database/migrations/2026_07_16_070214_create_reservasis_table.php. Reservation processing additionally supports transfer-proof data via database/migrations/2026_07_16_075626_add_bukti_transfer_to_reservasis_table.php, creating a boundary between booking data and uploaded payment evidence.
Management and validation flow
Field CRUD is handled by the web and API Lapangan controllers. Browser-side create/update submissions are validated through dedicated request objects, app/Http/Requests/StoreLapanganRequest.php and app/Http/Requests/UpdateLapanganRequest.php, before persistence through Lapangan. Admin-facing field views are resources/views/lapangan/index.blade.php, resources/views/lapangan/create.blade.php, and resources/views/lapangan/edit.blade.php.
Reservation presentation and documents
Users create and view bookings through app/Http/Controllers/ReservasiController.php and resources/views/reservasi/create.blade.php / resources/views/reservasi/index.blade.php. A dedicated resources/views/reservasi/pdf.blade.php indicates reservation data can be rendered as a PDF-oriented document, likely via a controller-integrated PDF dependency or service; the exact library is not identifiable from the tree.
Runtime and infrastructure
The runtime is Laravel, invoked through artisan and dependency-managed by composer.json; frontend assets use Vite (package.json, vite.config.js) and enter via resources/js/app.js and resources/css/app.css. Database, sessions, cache, queue, filesystems, mail, and logging are Laravel-configured boundaries under config/, notably config/database.php, config/filesystems.php, and config/queue.php. Persistent upload storage is provisioned under storage/app/private and storage/app/public; no concrete external database, payment gateway, mail provider, or queue backend is specified in the repository inputs.
Main entry points: ReservasiController.php Web controllers · app.php Laravel bootstrap · Lapangan.php Lapangan · web.php Web routes
Components 18
HTTP surfaces
- Public entry
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes
routes/web.php - API routes
routes/api.php - Web controllers · Authentication, dashboards, fields, and reservations.
app/Http/Controllers/ReservasiController.php - API controllers · Parallel authentication and field endpoints.
app/Http/Controllers/Api/LapanganController.php - Role middleware
app/Http/Middleware/RoleMiddleware.php
Reservation domain
- Auth & token config · Authentication guards and Sanctum token support.
config/auth.php - User · Carries the member or admin role.
app/Models/User.php - Lapangan · Court-field records managed by admins.
app/Models/Lapangan.php - Reservasi · Booking records with transfer-proof data.
app/Models/Reservasi.php - Field validation · Validates browser field create and update submissions.
app/Http/Requests/StoreLapanganRequest.php
Presentation
- Blade views · Role dashboards, field management, and booking pages.
resources/views/layouts/app.blade.php - Reservation PDF view · Renders reservation data for PDF output.
resources/views/reservasi/pdf.blade.php - Vite assets · Builds JavaScript and CSS for Blade pages.
resources/js/app.js
Runtime & infrastructure
- Application database · Stores users, fields, reservations, roles, and access tokens.
config/database.php - Upload storage · Stores transfer-proof uploads.
storage/app/public - Laravel tooling · Composer-managed Laravel runtime and Artisan commands.
composer.json
Connections 23
- Public entry → Laravel bootstrap: boots
- Laravel bootstrap → Web routes: loads
- Laravel bootstrap → API routes: loads
- Web routes → Role middleware: protects routes
- Role middleware → Web controllers: authorizes
- Web routes → Web controllers: dispatches
- API routes → API controllers: dispatches
- Auth & token config → Role middleware: defines identity
- Web controllers → Field validation: validates fields
- Field validation → Lapangan: permits persistence
- Web controllers → User: authenticates
- Web controllers → Lapangan: manages
- Web controllers → Reservasi: creates and views
- API controllers → User: authenticates
- API controllers → Lapangan: manages
- User → Application database: persists
- Lapangan → Application database: persists
- Reservasi → Application database: persists
- Reservasi → Upload storage: stores transfer proof
- Web controllers → Blade views: renders
- Web controllers → Reservation PDF view: renders
- Vite assets → Blade views: supplies assets
- Laravel tooling → Laravel bootstrap: runs application