How t0ff1xs/lanay-new-ui works
Lanay is a PHP/MySQL restaurant system with a public catering and customer-request experience plus role-based staff stations. The main customer flow is browsing the public site, submitting catering or delivery requests, and exchanging messages; staff manage those requests and operational workflows through the JSON API. The README documents additional dine-in, kitchen, cashier, stock, driver, and owner capabilities. Connections reflect the sampled router/controller/model calls and README statements; several station and model implementations were not sampled, so their internal links are omitted.
Main entry points: Router.php API router · CustomerController.php Customer requests · OwnerController.php Owner operations · CateringModel.php Catering inquiries
Components 30
Web entry points
- Public site
index.php - JSON API
api.php
Customer experience
- Catering page
views/home.php - Customer browser
customer/customer.js - Customer requests
controllers/CustomerController.php
Staff operations
- Staff stations
views/staff.php - Station scripts
js/common.js - Owner operations
controllers/OwnerController.php - Staff authentication
controllers/AuthController.php - Driver operations
controllers/DriverController.php - Orders
controllers/OrderController.php - Payments
controllers/CashierController.php - Inventory
controllers/StockController.php - Kitchen menu
controllers/KitchenController.php
Domain and persistence
- Catering inquiries
models/CateringModel.php - Customer requests
models/CustomerModel.php - Request conversations
models/CustomerRequestModel.php - Delivery workflow
models/DriverModel.php - Order lifecycle
models/OrderModel.php - Payment records
models/PaymentModel.php - Staff accounts
models/StaffModel.php - Station data
models/BootstrapModel.php - MySQL database
Request runtime
- API router
core/Router.php - Request parsing
core/Request.php - Session and access
core/Session.php - JSON responses
core/Response.php - Controller base
controllers/Controller.php - View renderer
core/View.php
Other components
- Customer or staff
Connections 37
- Customer or staff → Public site: opens site
- Public site → Catering page: renders page
- Customer or staff → Customer browser: uses
- Customer browser → JSON API: submits requests
- Staff stations → Station scripts: loads scripts
- Customer or staff → Staff stations: opens stations
- Station scripts → JSON API: reads and writes
- JSON API → API router: dispatches
- API router → Request parsing: reads method and action
core/Router.php - API router → Session and access: checks access
core/Router.php - API router → Customer requests: routes requests
core/Router.php - API router → Owner operations: routes operations
core/Router.php - API router → Staff authentication: routes sign-in
core/Router.php - API router → Driver operations: routes delivery
core/Router.php - API router → Orders: routes orders
core/Router.php - API router → Payments: routes payments
core/Router.php - API router → Inventory: routes inventory
core/Router.php - API router → Kitchen menu: routes menu updates
core/Router.php - Customer requests → Catering inquiries: creates inquiries
controllers/CustomerController.php - Customer requests → Customer requests: handles requests
controllers/CustomerController.php - Customer requests → Request conversations: reads and replies
controllers/CustomerController.php - Owner operations → Catering inquiries: creates and updates
controllers/OwnerController.php - Owner operations → Request conversations: sends messages
controllers/OwnerController.php - Owner operations → Staff accounts: manages accounts
controllers/OwnerController.php - Staff authentication → Staff accounts: looks up staff
controllers/AuthController.php - Staff authentication → Session and access: signs in
controllers/AuthController.php - Driver operations → Delivery workflow: updates deliveries
controllers/DriverController.php - Orders → Order lifecycle: manages orders
controllers/OrderController.php - Payments → Payment records: records payments
controllers/CashierController.php - Inventory → MySQL database: updates stock
- Kitchen menu → MySQL database: updates menu
- Station data → Request conversations: loads messages
models/BootstrapModel.php - Station data → Catering inquiries: loads inquiry items
models/BootstrapModel.php - Catering inquiries → MySQL database: reads and writes
models/CateringModel.php - Station data → MySQL database: loads station data
models/BootstrapModel.php - Public site → View renderer: renders views
- View renderer → Catering page: renders template
views/home.php