How restaurantbar-barbachu/barbachu-bar works
Barbachu combines a public ordering site with a browser-based, explicitly fictitious POS demo. The demo workflow loads a synthetic catalog and saved state, lets a user create and advance a table order, then simulates payment, recipe-based stock deductions, and cash reporting. The public site also exposes a WhatsApp order redirect. Source excerpts establish the demo’s core calls and state persistence; the root site files and catalog data were not sampled, so their detailed wiring is omitted.
Main entry points: app.mjs POS interface · storage.mjs Local state · core.mjs Order lifecycle · index.html Public site
Components 14
Public ordering
- Public site
index.html - WhatsApp redirect
api/pedir.js
POS demo
- POS interface
pos-demo/app.mjs - Synthetic catalog
pos-demo/data/demo-catalog.json - Order entry
pos-demo/app.mjs - Order board
pos-demo/app.mjs - Cash summary
pos-demo/app.mjs - Stock view
pos-demo/app.mjs
Demo domain
- Order lifecycle
pos-demo/core.mjs - Payment and recipes
pos-demo/core.mjs
Demo state
- Local state
pos-demo/storage.mjs
Other components
- Site visitor
- Demo operator
Connections 17
- Site visitor → Public site: browses
- Public site → WhatsApp redirect: requests redirect
- WhatsApp redirect → WhatsApp: redirects to
api/pedir.js - Demo operator → POS interface: uses
- POS interface → Synthetic catalog: fetches
pos-demo/app.mjs - POS interface → Local state: loads and saves
pos-demo/app.mjs - Local state → Order lifecycle: creates initial state
pos-demo/storage.mjs - POS interface → Order entry: renders
pos-demo/app.mjs - POS interface → Order board: renders
pos-demo/app.mjs - POS interface → Cash summary: renders
pos-demo/app.mjs - POS interface → Stock view: renders
pos-demo/app.mjs - Order entry → Order lifecycle: creates orders
pos-demo/app.mjs - Order board → Order lifecycle: advances status
pos-demo/app.mjs - Order board → Payment and recipes: closes orders
pos-demo/app.mjs - Payment and recipes → Synthetic catalog: reads recipes
- Cash summary → Local state: reads state
pos-demo/app.mjs - Stock view → Local state: reads state
pos-demo/app.mjs