How vannarith10/coffee-shop-management-system works
This is a role-based café point-of-sale and shop-management frontend, rather than the generic Vite template described by its README. Staff sign in, reach role-specific admin, cashier, or barista screens, and use those workflows to manage the catalog and shop, process orders, and view business reports. The graph preserves these distinct product areas and shows only relationships supported by the router, sampled calls, or SOURCE INDEX references; several feature implementations were not sampled, so their internal wiring is intentionally omitted.
Main entry points: admin Admin workspace · App.tsx Role-based routes · axios.ts HTTP client · cashier Cashier checkout
Components 19
Application and access
- Role-based routes
src/App.tsx - Login and session
src/features/auth - Auth state
src/stores/useAuthStore.ts - HTTP client
src/lib/axios.ts - WebSocket manager
src/websocket/websocket-manager.ts
Catalog and inventory
- Admin workspace
src/features/admin - Product catalog
src/features/products - Category management
src/features/categories - Stock management
src/features/stock - Product menu
src/features/Menu
Sales and fulfillment
- Cashier checkout
src/features/cashier - Cart state
src/features/cart/hooks/useCartStore.ts - Order operations
src/features/orders - Barista order queue
src/features/barista
Shop and analytics
- Staff administration
src/features/staff - Shop settings
src/features/shop - Business analytics
src/features/analytic - Sales reports
src/features/report
Other components
- Staff user
Connections 24
- Staff user → Role-based routes: uses
src/App.tsx - Role-based routes → Login and session: routes to
src/App.tsx - Role-based routes → Admin workspace: routes to
src/App.tsx - Role-based routes → Cashier checkout: routes to
src/App.tsx - Role-based routes → Barista order queue: routes to
src/App.tsx - Login and session → HTTP client: calls
src/features/auth/services/auth.service.ts - HTTP client → Auth state: reads token
src/lib/axios.ts - Auth state → WebSocket manager: connects or disconnects
src/stores/useAuthStore.ts - WebSocket manager → Auth state: reads token
src/websocket/websocket-manager.ts - Category management → HTTP client: calls
src/features/categories/services/category.ts - Category management → WebSocket manager: subscribes
src/features/categories/realtime/useUpdateCategoryWebsocket.ts - Product catalog → HTTP client: calls
src/features/products/services/product.ts - Order operations → HTTP client: calls
src/features/orders/hooks/useRetrieveOrder.ts - Cashier checkout → Cart state: uses
- Cashier checkout → Order operations: submits orders
- Barista order queue → Order operations: views queue
- Admin workspace → Staff administration: manages
- Admin workspace → Shop settings: configures
src/features/admin/components/Navbar.tsx - Admin workspace → Business analytics: views
- Admin workspace → Sales reports: views
- Admin workspace → Category management: manages
- Admin workspace → Product catalog: manages
- Admin workspace → Stock management: manages
- Cashier checkout → Product menu: browses