How bestaria/uas_224520011 works
Purpose and Runtime
This is a Laravel/PHP server-rendered application for managing sports fields (“lapangan”) and reservations (“reservasi”), with login and role-based access control. The README is the stock Laravel README; application intent is inferred from controllers and Blade views.
HTTP requests enter through public/index.php, bootstrap Laravel via bootstrap/app.php, and are dispatched from routes/web.php. The CLI entry point is artisan.
Route and Request Layer
Web routes likely map authentication, field-management, and reservation workflows to three controllers:
• app/Http/Controllers/LoginController.php
• app/Http/Controllers/LapanganController.php
• app/Http/Controllers/ReservasiController.php
routes/api.php exists but no API-specific controllers are present in the tree, so the primary interface is browser-oriented rather than an external API.
Authentication and Authorization Boundary
Authentication is handled by the login controller and Laravel’s auth configuration:
• app/Http/Controllers/LoginController.php
• app/Http/Middleware/LoginMiddleware.php
• config/auth.php
LoginMiddleware protects authenticated flows, while app/Http/Middleware/RoleMiddleware.php separates permissions by role. These middleware form the critical boundary before administrative field operations or reservation actions execute.
Field Management Domain
LapanganController is the field catalog/administration boundary, supporting list, detail, create, edit, and PDF-oriented views:
• app/Http/Controllers/LapanganController.php
• resources/views/lapangan/index.blade.php
• resources/views/lapangan/pdf.blade.php
Field images or other public media are expected under public/gambar. The absence of a visible Lapangan model or corresponding migration suggests this domain may use direct database access, an omitted schema, or incomplete repository content.
Reservation Workflow
Reservations are controlled through:
• app/Http/Controllers/ReservasiController.php
• resources/views/reservasi/create.blade.php
• resources/views/reservasi/pesanan.blade.php
The likely flow is: authenticated user selects a field, submits reservation data, then views reservation/order status. resources/views/reservasi/index.blade.php provides a listing surface. Reservation persistence schema/model is not present in the supplied tree, which is a material implementation gap to verify before extending the feature.
Persistence, Sessions, and Background Infrastructure
Laravel database configuration is centralized in config/database.php; credentials are expected through .env based on .env.example. User identity is the only explicit application model and migration:
• app/Models/User.php
• database/migrations/0001_01_01_000000_create_users_table.php
• database/seeders/DatabaseSeeder.php
Framework migrations provision cache and queued-job tables, enabling database-backed cache/queue if configured:
• database/migrations/0001_01_01_000001_create_cache_table.php
• database/migrations/0001_01_01_000002_create_jobs_table.php
• config/queue.php
Session, cache, filesystem, mail, logging, and third-party service adapters remain Laravel-configurable boundaries in config/.
Presentation and Assets
Controllers render Blade templates from resources/views, including the dashboard and login pages:
• resources/views/dashboard.blade.php
• resources/views/auth/login.blade.php
• resources/views/welcome.blade.php
Frontend assets are built with Vite from resources/css/app.css and resources/js/app.js, configured by vite.config.js. Generated/publicly served assets and uploads are exposed from public/; private filesystem content remains under storage/app/private.
Main entry points: web.php Web routes · LoginMiddleware.php Auth & role boundary · LoginController.php Login controller · LapanganController.php Field management
Components 19
Laravel Runtime
- HTTP entry point
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes · Primary browser interface and workflow dispatch.
routes/web.php
Access Control
- Auth & role boundary · Guards authenticated flows and role-specific actions.
app/Http/Middleware/LoginMiddleware.php - Role middleware
app/Http/Middleware/RoleMiddleware.php - Login controller
app/Http/Controllers/LoginController.php - Auth configuration
config/auth.php
Application Domains
- Field management · Lists, edits, details, and PDF-oriented field views.
app/Http/Controllers/LapanganController.php - Reservation workflow · Creates reservations and exposes order/listing views.
app/Http/Controllers/ReservasiController.php
Persistence & Infrastructure
- User identity · Only explicit application model in the repository.
app/Models/User.php - Database connection · Credentials are supplied through environment configuration.
config/database.php - Users schema
database/migrations/0001_01_01_000000_create_users_table.php - Cache & job tables · Enables database-backed cache and queue when configured.
database/migrations/0001_01_01_000002_create_jobs_table.php
Presentation
- Field Blade views
resources/views/lapangan/index.blade.php - Reservation Blade views
resources/views/reservasi/create.blade.php - Dashboard & login views
resources/views/dashboard.blade.php - Public field media
public/gambar - Vite frontend assets · Builds CSS and JavaScript served from public assets.
resources/js/app.js
Other components
- Browser
Connections 19
- Browser → HTTP entry point: HTTP request
- HTTP entry point → Laravel bootstrap: bootstraps
- Laravel bootstrap → Web routes: dispatches
- Web routes → Auth & role boundary: protected routes
- Auth & role boundary → Role middleware: applies roles
- Web routes → Login controller: login routes
- Web routes → Field management: field routes
- Web routes → Reservation workflow: reservation routes
- Auth & role boundary → Auth configuration: uses
- Login controller → User identity: authenticates
- Field management → Field Blade views: renders
- Field management → Public field media: serves field media
- Reservation workflow → Reservation Blade views: renders
- Login controller → Dashboard & login views: renders login
- Web routes → Dashboard & login views: dashboard route
- User identity → Database connection: persists through
- Users schema → Database connection: provisions
- Cache & job tables → Database connection: provisions tables in
- Vite frontend assets → Public field media: built assets served from public