How lenamkhanhvn0211-web/baitaplon_tkweb works
This is a browser-based Vietnamese café ordering and management demo. Customers browse and filter a menu, add items to a cart, review it, then choose fulfillment and payment options to create and print an invoice. Staff can change table status; demo account login exposes role-specific links, while admins can review saved orders. State is held in browser localStorage, not a backend. The source excerpts show the main interactions; page-to-script loading is not shown, so links between pages and their scripts are omitted.
Main entry points: payment.js Checkout and invoice · common.js Cart state · menu.js Menu browsing · login.js Demo login
Components 14
Menu and cart
- Menu browsing
js/menu.js - Cart editing
js/order.js
Checkout
- Checkout and invoice
js/payment.js
Café operations
- Table status
js/tables.js - Demo login
js/login.js - Order dashboard
js/login.js
Shared browser state
- Menu catalog
js/common.js - Cart state
js/common.js - Saved orders
js/common.js - Table state
js/common.js - Account state
js/common.js - Shared header
js/common.js
Other components
- Customer
- Staff or admin
Connections 17
- Customer → Menu browsing: browses
js/menu.js - Menu browsing → Menu catalog: filters
js/menu.js - Menu browsing → Cart state: adds items
js/menu.js - Customer → Cart editing: edits cart
js/order.js - Cart editing → Cart state: reads and saves
js/order.js - Customer → Checkout and invoice: submits checkout
js/payment.js - Checkout and invoice → Cart state: reads and clears
js/payment.js - Checkout and invoice → Table state: reads table options
js/payment.js - Checkout and invoice → Saved orders: saves order
js/payment.js - Staff or admin → Table status: updates tables
js/tables.js - Table status → Table state: loads and saves
js/tables.js - Staff or admin → Demo login: signs in
js/login.js - Demo login → Account state: saves account
js/login.js - Demo login → Order dashboard: renders admin view
js/login.js - Order dashboard → Saved orders: reads orders
js/login.js - Shared header → Account state: reads session
js/common.js - Shared header → Cart state: reads cart count
js/common.js