How arico18038/rpl-project works
Purpose and Entry Points
This is a Laravel/PHP point-of-sale and restaurant ordering system (“Sikasir 4SR”/Cashdig schema references), supporting staff POS, customer menu ordering, and administration. HTTP enters through public/index.php, is routed by routes/web.php, and boots Laravel via bootstrap/app.php. Browser views are Blade templates under resources/views.
Request and Access Layer
Routes dispatch to role-facing controllers: POS operations in app/Http/Controllers/PosController.php, customer ordering/menu access in app/Http/Controllers/CustomerMenuController.php, and administrative functions in app/Http/Controllers/AdminController.php. Authentication is handled separately by app/Http/Controllers/AuthController.php, backed by Laravel auth configuration in config/auth.php. This is the principal boundary between public/customer, operator, and admin workflows.
POS and Order Lifecycle
The central transactional flow is staff selecting menu items, building an order, applying available pricing/discount settings, and persisting an order plus line items. The POS UI is resources/views/pos/index.blade.php, with client-side behavior in public/assets/js/pos.js; order persistence is represented by app/Models/Order.php and app/Models/OrderItem.php. Schema ownership and deployment alignment reside in database/migrations/2026_05_15_113334_create_orders_table.php and database/migrations/2026_06_19_000000_align_cashdig_schema_for_deployment.php.
Catalog, Inventory, and Tables
Menu/catalog state is modeled by app/Models/MenuItem.php and app/Models/Category.php; availability, stock, and image capacity evolved through migrations including database/migrations/2026_05_16_130000_add_stock_to_menu_items_table.php and database/migrations/2026_06_09_205132_add_is_available_to_menu_items_table.php. Restaurant seating/table selection is a distinct domain model in app/Models/RestaurantTable.php, created by database/migrations/2026_06_09_210220_create_tables_table.php. Admin inventory is presented through resources/views/admin/inventory.blade.php.
Customer Ordering Surface
Customers access a menu-oriented interface at resources/views/customer/menu.blade.php, served by CustomerMenuController. It consumes the same catalog and likely creates or delegates into the shared order domain rather than maintaining a separate customer cart schema. This keeps catalog availability and order records authoritative on the server.
Administration and Reporting
The admin area manages operational data, historical orders, reports, receipt content, site data, and users. Its primary presentation shell is resources/views/admin/index.blade.php; history and reporting screens are resources/views/admin/history.blade.php and resources/views/admin/report.blade.php. Global business/receipt settings are persisted through app/Models/SiteSetting.php and the settings migration database/migrations/2026_05_29_000000_create_site_settings_table.php.
Runtime and Infrastructure
The application requires PHP, Composer/Laravel, a configured relational database via config/database.php, and environment values from .env (template: .env.example). Laravel sessions, cache, logs, filesystem storage, mail, and queue interfaces are configured under config/; jobs/cache migrations indicate database-backed options are supported. Public static assets are served from public/, while Vite source assets are under resources/js and resources/css. Initial admin and menu data are established by database/seeders/AdminUserSeeder.php and database/seeders/MenuItemSeeder.php.
Components 18
Browser surfaces
- Staff, customer, admin browsers
- POS interface
resources/views/pos/index.blade.php - Customer menu
resources/views/customer/menu.blade.php - Admin screens · Inventory, history, reporting, and operational administration.
resources/views/admin/index.blade.php
Laravel application
- HTTP entry
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes
routes/web.php - Authentication · Separates authenticated operator and admin access.
app/Http/Controllers/AuthController.php - POS operations
app/Http/Controllers/PosController.php - Customer menu ordering
app/Http/Controllers/CustomerMenuController.php - Administration
app/Http/Controllers/AdminController.php
Operational domain
- Catalog and availability
app/Models/MenuItem.php - Restaurant tables
app/Models/RestaurantTable.php - Orders and line items · Authoritative shared order lifecycle for POS and customer ordering.
app/Models/Order.php - Business settings · Stores global business and receipt settings.
app/Models/SiteSetting.php
Persistence and setup
- Relational database
config/database.php - Schema migrations · Defines orders, catalog stock/availability, tables, settings, and deployment alignment.
database/migrations/2026_06_19_000000_align_cashdig_schema_for_deployment.php - Initial admin and menu data
database/seeders/AdminUserSeeder.php
Connections 24
- Staff, customer, admin browsers → HTTP entry: HTTP requests
- HTTP entry → Laravel bootstrap: boots
- Laravel bootstrap → Web routes: loads
- Web routes → Authentication: auth routes
- Web routes → POS operations: staff POS routes
- Web routes → Customer menu ordering: customer routes
- Web routes → Administration: admin routes
- POS operations → POS interface: renders
- Customer menu ordering → Customer menu: renders
- Administration → Admin screens: renders
- POS operations → Catalog and availability: reads items and pricing
- POS operations → Restaurant tables: selects seating
- POS operations → Orders and line items: creates orders
- Customer menu ordering → Catalog and availability: shows available menu
- Customer menu ordering → Orders and line items: creates or delegates orders
- Administration → Catalog and availability: manages inventory
- Administration → Orders and line items: reviews history and reports
- Administration → Business settings: manages receipt settings
- Catalog and availability → Relational database: persists
- Restaurant tables → Relational database: persists
- Orders and line items → Relational database: persists
- Business settings → Relational database: persists
- Schema migrations → Relational database: provisions schema
- Initial admin and menu data → Relational database: initializes