How sharipovakhror/chicken-fit-cafe works
Chicken Fit is an offline-capable café POS with a guest-facing QR menu. The main workflow is cashier → PIN-authenticated POS → order and payment → local persistence and queued synchronization with Supabase; kitchen and shift/reporting screens support operations. Guests browse a separately served menu, while device backup and legacy-data rescue provide recovery paths. Several operational views are represented because the README documents them and the POS entry point references them; their internal behavior was not sampled, so those connections are cited at the entry point rather than expanded.
Main entry points: PosApp.tsx POS app · local-db.ts Device database · runtime.tsx Client runtime · sync.ts Sync engine
Components 24
POS operations
- POS app
features/pos/PosApp.tsx - Orders and checkout
features/pos/OrderView.tsx - Order actions
features/pos/actions.ts - Kitchen display
features/kitchen/KitchenView.tsx - Table service
features/pos/TablesView.tsx - Shifts and reports
features/pos/ShiftView.tsx - Sales reports
features/pos/ReportsView.tsx - Menu administration
features/pos/MenuAdminView.tsx
Local data and sync
- Device database
data/local-db.ts - POS data queries
features/pos/useData.ts - Client runtime
features/app/runtime.tsx - Sync engine
data/sync.ts - Mutation outbox
data/outbox.ts - Supabase RPC API
data/api.ts
Guest menu
- Guest menu page
components/menu/menu-page.tsx - Menu board
components/menu/menu-board.tsx - Live menu loader
lib/menu.ts
Backup and rescue
- Device backup
app/backup/page.tsx - Legacy rescue import
features/rescue/useRescueImport.ts - Rescue processing
features/rescue/rescue.ts - Legacy parser
features/rescue/parse.ts
Other components
- Cashier
- Kitchen staff
- Guest
Connections 30
- Cashier → POS app: uses POS
README.md - Kitchen staff → Kitchen display: views orders
README.md - POS app → Orders and checkout: renders checkout
features/pos/PosApp.tsx - POS app → Kitchen display: renders kitchen
features/pos/PosApp.tsx - POS app → Table service: renders tables
features/pos/PosApp.tsx - POS app → Shifts and reports: renders shifts
features/pos/PosApp.tsx - POS app → Sales reports: renders reports
features/pos/PosApp.tsx - POS app → Menu administration: renders admin
features/pos/PosApp.tsx - Orders and checkout → Order actions: invokes actions
features/pos/OrderView.tsx - Orders and checkout → POS data queries: reads POS data
features/pos/OrderView.tsx - Order actions → Device database: writes orders
features/pos/actions.ts - Order actions → Mutation outbox: queues mutations
features/pos/actions.ts - POS data queries → Client runtime: gets runtime
features/pos/useData.ts - POS data queries → Device database: queries tables
features/pos/useData.ts - Client runtime → Device database: loads session
features/app/runtime.tsx - Client runtime → Supabase RPC API: authenticates
features/app/runtime.tsx - Client runtime → Sync engine: starts sync
features/app/runtime.tsx - Sync engine → Mutation outbox: sends pending
data/sync.ts - Sync engine → Device database: updates local data
data/sync.ts - Sync engine → Supabase RPC API: pulls and applies
data/sync.ts - Guest → Guest menu page: browses menu
README.md - Guest menu page → Live menu loader: loads live menu
components/menu/menu-page.tsx - Guest menu page → Menu board: renders menu
components/menu/menu-page.tsx - Device backup → Device database: reads device data
app/backup/page.tsx - Device backup → Legacy rescue import: offers recovery
- Legacy rescue import → Client runtime: uses runtime
features/rescue/useRescueImport.ts - Legacy rescue import → Rescue processing: imports legacy data
features/rescue/useRescueImport.ts - Rescue processing → Legacy parser: parses snapshots
features/rescue/rescue.ts - Rescue processing → Device database: stores rescue state
features/rescue/rescue.ts - Rescue processing → Supabase RPC API: uploads and verifies
features/rescue/rescue.ts