How seprycode17/uas4sia works
Purpose and Entry Points
This is a Laravel/PHP application for managing sports fields (“lapangan”) and their reservations, including transfer-proof handling. The project README is Laravel boilerplate; the domain is inferred from application code structure. HTTP enters through public/index.php, bootstraps in bootstrap/app.php, and is dispatched by routes/web.php or routes/api.php. CLI maintenance and migrations enter through artisan.
Web Authentication and Authorization
Browser authentication is handled by app/Http/Controllers/AuthController.php. Role-based access control is a dedicated HTTP boundary in app/Http/Middleware/RoleMiddleware.php, likely separating administrative field management from regular reservation actions. Laravel auth/session behavior is configured in config/auth.php and config/session.php.
Field Management Domain
Lapangan is the inventory/resource aggregate represented by app/Models/Lapangan.php. Server-rendered CRUD flows are implemented in app/Http/Controllers/LapanganController.php, with input validation isolated in app/Http/Requests/LapanganRequest.php. Admin-facing UI is Blade-based under resources/views/lapangan/index.blade.php, resources/views/lapangan/create.blade.php, and resources/views/lapangan/edit.blade.php.
Reservation Workflow
Reservations are represented by app/Models/Reservasi.php and handled by app/Http/Controllers/ReservasiController.php. The reservation creation UI is resources/views/reservasi/create.blade.php. The schema explicitly includes reservation records and later adds payment-transfer evidence, establishing a flow from selecting a field through reservation submission and proof upload/storage: database/migrations/2026_07_16_065958_create_reservasis_table.php and database/migrations/2026_07_16_073352_add_bukti_transfer_to_reservasis_table.php.
API Boundary
A separate API surface exposes field data via routes/api.php and app/Http/Controllers/Api/LapanganApiController.php. app/Http/Resources/LapanganResource.php is the response-shaping boundary, keeping API serialization independent of the Eloquent model and web views.
Persistence and File Storage
Laravel Eloquent models persist users, fields, and reservations through migrations in database/migrations/0001_01_01_000000_create_users_table.php, database/migrations/2026_07_16_065958_create_lapangans_table.php, and database/migrations/2026_07_16_065958_create_reservasis_table.php. Database connectivity is environment-configured in config/database.php. Transfer-proof files are expected to use Laravel filesystem storage, configured by config/filesystems.php, with local public/private roots under storage/app/public and storage/app/private.
Runtime and Delivery Boundaries
The primary runtime is Laravel on PHP with Composer dependencies (composer.json), backed by a configurable relational database, cache, sessions, mail, and queue infrastructure (config/cache.php, config/queue.php, config/mail.php). The browser layer uses Blade templates plus Vite-built CSS/JavaScript from resources/css/app.css and resources/js/app.js; Vite configuration is vite.config.js. No concrete external SaaS integration is evidenced in the tree beyond Laravel’s configurable service hooks in config/services.php.
Main entry points: web.php Web routes · ReservasiController.php Reservation workflow · LapanganController.php Field management · Lapangan.php Field inventory
Components 20
Laravel Runtime
- HTTP entry
public/index.php - Application bootstrap
bootstrap/app.php - Artisan CLI · Runs maintenance commands and migrations.
artisan
Web Application
- Web routes
routes/web.php - Authentication
app/Http/Controllers/AuthController.php - Role authorization · Separates administrative and regular actions.
app/Http/Middleware/RoleMiddleware.php - Field management
app/Http/Controllers/LapanganController.php - Field validation
app/Http/Requests/LapanganRequest.php - Field admin views
resources/views/lapangan/index.blade.php - Reservation workflow · Creates reservations and accepts transfer proof.
app/Http/Controllers/ReservasiController.php - Reservation form
resources/views/reservasi/create.blade.php - Browser assets · Builds shared CSS and JavaScript for Blade pages.
vite.config.js
API Surface
- API routes
routes/api.php - Field API
app/Http/Controllers/Api/LapanganApiController.php - Field response mapping · Decouples API serialization from the model.
app/Http/Resources/LapanganResource.php
Domain & Persistence
- Field inventory
app/Models/Lapangan.php - Reservations · Includes transfer-proof evidence.
app/Models/Reservasi.php - Relational database · Connection is environment-configured.
config/database.php - Database schema · Defines users, fields, reservations, and transfer-proof column.
database/migrations/2026_07_16_065958_create_reservasis_table.php - Transfer-proof storage · Stores uploaded proof in public or private roots.
config/filesystems.php
Connections 24
- HTTP entry → Application bootstrap: boots
- Application bootstrap → Web routes: loads
- Application bootstrap → API routes: loads
- Artisan CLI → Database schema: runs
- Web routes → Authentication: dispatches
- Web routes → Role authorization: guards with
- Role authorization → Field management: authorizes
- Web routes → Field management: dispatches
- Field management → Field validation: validates via
- Field management → Field inventory: manages
- Field management → Field admin views: renders
- Web routes → Reservation workflow: dispatches
- Reservation workflow → Reservation form: renders
- Reservation workflow → Field inventory: selects
- Reservation workflow → Reservations: creates
- Reservation workflow → Transfer-proof storage: stores proof
- API routes → Field API: dispatches
- Field API → Field inventory: reads
- Field API → Field response mapping: serializes with
- Field inventory → Relational database: persists to
- Reservations → Relational database: persists to
- Database schema → Relational database: provisions
- Browser assets → Field admin views: supports
- Browser assets → Reservation form: supports