How panhakoeun142007-creator/prey-lang-coffee-pos-system works
Prey Lang Coffee POS is a restaurant point-of-sale system with staff operations and a customer-facing ordering experience. Staff use the React application to manage orders, products, tables, stock, finances, receipts, and analytics; customers can browse a menu and place orders. The Laravel API routes requests to domain controllers, with order creation and status changes delegated to an order service and persisted through Eloquent models. The README confirms the React-to-Laravel API connection and MySQL persistence. Several capabilities are documented by the route and frontend indexes but their detailed runtime wiring was not sampled.
Main entry points: api.php API routes · api.ts API client · OrderController.php Order API · OrderService.php Order service
Components 26
POS interfaces
- POS application
frontend/src/App.jsx - API client
frontend/src/services/api.ts - Customer menu
frontend/src/pages/CustomerMenuApp.jsx - Order management
frontend/src/pages/LiveOrders.tsx - Catalog management
frontend/src/pages/Products.tsx - Stock management
frontend/src/pages/IngredientsStockPage.tsx - POS reporting
frontend/src/pages/DashboardPage.tsx - Finance and receipts
frontend/src/pages/FinancePage.tsx
API and access
- API routes
backend/routes/api.php - Authentication
backend/app/Http/Controllers/Api/AuthController.php - Application settings
backend/app/Support/AppSettings.php
Order operations
- Order API
backend/app/Http/Controllers/Api/OrderController.php - Order service
backend/app/Services/OrderService.php - Orders
backend/app/Models/Order.php - Dining tables
backend/app/Models/DiningTable.php
Catalog and stock
- Product API
backend/app/Http/Controllers/Api/ProductController.php - Products
backend/app/Models/Product.php - Recipes
backend/app/Http/Controllers/Api/RecipeController.php - Ingredient stock
backend/app/Http/Controllers/Api/IngredientController.php
Business reporting
- Dashboard analytics
backend/app/Http/Controllers/Api/DashboardController.php - Finance and expenses
backend/app/Http/Controllers/Api/FinanceController.php - Receipt API
backend/app/Http/Controllers/Api/ReceiptController.php - Sales analytics
backend/app/Http/Controllers/Api/SalesAnalyticsController.php
Other components
- POS staff
- Customer
- MySQL database
Connections 33
- POS staff → POS application: uses
frontend/src/App.jsx - Customer → Customer menu: browses and orders
- POS application → API client: requests data
frontend/src/App.jsx - Customer menu → API client: requests data
- API client → API routes: sends API requests
- API routes → Authentication: routes auth
backend/routes/api.php - API routes → Order API: routes orders
backend/routes/api.php - API routes → Product API: routes products
backend/routes/api.php - API routes → Ingredient stock: routes stock
backend/routes/api.php - API routes → Dashboard analytics: routes dashboard
backend/routes/api.php - API routes → Finance and expenses: routes finance
backend/routes/api.php - API routes → Receipt API: routes receipts
backend/routes/api.php - API routes → Sales analytics: routes analytics
backend/routes/api.php - Order management → API client: fetches and updates
frontend/src/App.jsx - Catalog management → API client: fetches and updates
frontend/src/App.jsx - Stock management → API client: fetches and updates
- POS reporting → API client: fetches data
- Finance and receipts → API client: fetches data
- Order API → Order service: delegates order logic
backend/app/Http/Controllers/Api/OrderController.php - Order service → Orders: creates and updates
backend/app/Services/OrderService.php - Order API → Orders: queries and deletes
backend/app/Http/Controllers/Api/OrderController.php - Order service → Dining tables: resolves table
backend/app/Services/OrderService.php - Order API → Application settings: reads payment options
backend/app/Http/Controllers/Api/OrderController.php - Order service → Products: reads product prices
backend/app/Services/OrderService.php - Product API → Products: manages products
backend/app/Http/Controllers/Api/ProductController.php - Product API → MySQL database: persists product data
- Orders → MySQL database: persists orders
- Dashboard analytics → MySQL database: queries business data
- Finance and expenses → MySQL database: reads financial records
- Receipt API → Orders: reads receipt orders
backend/app/Http/Controllers/Api/ReceiptController.php - Recipes → Products: uses products
backend/app/Http/Controllers/Api/RecipeController.php - Ingredient stock → MySQL database: manages stock records
- Sales analytics → MySQL database: queries sales data