How panha-koeun-web-dev/prey-lang-coffee-pos-system works
Prey Lang Coffee POS is a restaurant point-of-sale system with staff management screens and a customer-facing menu and ordering flow. Users enter through the React application; its API service communicates with Laravel, which routes requests to domain controllers and persists operational records in MySQL. The map includes the documented catalog, order, inventory, finance, analytics, receipt, settings, and staff capabilities. Source excerpts are incomplete, so some subsystem links are supported by the route index or README rather than inspected controller implementations.
Main entry points: api.php API routes · OrderController.php Order endpoints · App.jsx App and routing · ProductController.php Product catalog
Components 22
React application
- App and routing
frontend/src/App.jsx - Operations screens
frontend/src/pages - Customer menu flow
frontend/src/pages - API client
frontend/src/services/api.ts
Laravel API
- API routes
backend/routes/api.php - API base controller
backend/app/Http/Controllers/Api/BaseController.php
Restaurant operations
- Order endpoints
backend/app/Http/Controllers/Api/OrderController.php - Order processing
backend/app/Services/OrderService.php - Order records
backend/app/Models/Order.php - Dining tables
backend/app/Models/DiningTable.php - Product catalog
backend/app/Http/Controllers/Api/ProductController.php - Product records
backend/app/Models/Product.php - Recipes and logs
backend/app/Http/Controllers/Api/RecipeController.php
Business management
- Stock and purchasing
backend/app/Http/Controllers/Api/IngredientController.php - Finance and expenses
backend/app/Http/Controllers/Api/FinanceController.php - Dashboard and analytics
backend/app/Http/Controllers/Api/DashboardController.php - Receipts
backend/app/Http/Controllers/Api/ReceiptController.php - Staff and access
backend/app/Http/Controllers/Api/StaffController.php - Application settings
backend/app/Support/AppSettings.php
Other components
- Staff user
- Customer
- MySQL database
Connections 30
- Staff user → App and routing: uses
frontend/src/App.jsx - Customer → App and routing: uses
frontend/src/App.jsx - App and routing → Operations screens: routes to
frontend/src/App.jsx - App and routing → Customer menu flow: routes to
frontend/src/App.jsx - Operations screens → API client: requests data
- Customer menu flow → API client: requests data
- API client → API routes: sends API requests
README.md - API routes → Order endpoints: dispatches
backend/routes/api.php - API routes → Product catalog: dispatches
backend/routes/api.php - API routes → Recipes and logs: dispatches
backend/routes/api.php - API routes → Stock and purchasing: dispatches
backend/routes/api.php - API routes → Finance and expenses: dispatches
backend/routes/api.php - API routes → Dashboard and analytics: dispatches
backend/routes/api.php - API routes → Receipts: dispatches
backend/routes/api.php - API routes → Staff and access: dispatches
backend/routes/api.php - Order endpoints → Order processing: delegates to
backend/app/Http/Controllers/Api/OrderController.php - Order endpoints → Order records: queries and updates
backend/app/Http/Controllers/Api/OrderController.php - Order endpoints → Application settings: reads payment settings
backend/app/Http/Controllers/Api/OrderController.php - Order processing → Order records: creates and updates
backend/app/Services/OrderService.php - Order records → Dining tables: belongs to
backend/app/Models/Order.php - Product catalog → Product records: queries and updates
backend/app/Http/Controllers/Api/ProductController.php - API base controller → Product catalog: supports
backend/app/Http/Controllers/Api/ProductController.php - Order endpoints → MySQL database: persists records
- Product catalog → MySQL database: persists records
- Recipes and logs → MySQL database: persists records
- Stock and purchasing → MySQL database: persists records
- Finance and expenses → MySQL database: persists records
- Dashboard and analytics → MySQL database: reads business data
- Receipts → MySQL database: reads order data
- Staff and access → MySQL database: persists staff data