How frede43/stock_resto works
Barstock is a restaurant/bar operations and point-of-sale platform: staff use role-aware dashboards and operational screens to manage sales, products and stock, kitchen work, credits, expenses, and reporting. The React frontend is paired with a Django backend and realtime/reporting components. The README is empty, and many domain files are unsampled, so the graph preserves those substantial product areas without guessing their call paths; edges are limited to relationships visible in excerpts or the SOURCE INDEX.
Main entry points: models.py Sales and tables · App.tsx App routing · tasks.py Report generation · services.py Sales workflows
Components 23
Staff application
- App routing
src/App.tsx - Role dashboards
src/pages/Index.tsx - Sales workspace
src/pages/Sales.tsx - Stock workspace
src/pages/Stocks.tsx - Kitchen workspace
src/pages/Kitchen.tsx - Reports workspace
src/pages/Reports.tsx - Authentication
src/hooks/use-auth.tsx - API data hooks
src/hooks/use-api.ts - API client
src/services/api.ts
Operations backend
- Products and stock
backend/products/models.py - Sales and tables
backend/sales/models.py - Sales workflows
backend/sales/services.py - Customer credits
backend/credits/models.py - Inventory
backend/inventory/models.py - Kitchen operations
backend/kitchen/models.py - Expenses
backend/expenses/models.py
Reporting and alerts
- Report records
backend/reports/models.py - Report generation
backend/reports/tasks.py - Report realtime
backend/reports/consumers.py - Sales realtime
backend/sales/consumers.py
Shared runtime
- Session storage
src/utils/storage.ts - Notifications
backend/core/notifications.py
Other components
- Staff user
Connections 25
- Staff user → App routing: uses
src/App.tsx - App routing → Authentication: provides auth
src/App.tsx - App routing → Role dashboards: routes to
src/App.tsx - App routing → Sales workspace: routes to
src/App.tsx - App routing → Stock workspace: routes to
src/App.tsx - App routing → Kitchen workspace: routes to
src/App.tsx - Authentication → Session storage: reads session
src/hooks/use-auth.tsx - Authentication → API client: validates session
src/hooks/use-auth.tsx - Role dashboards → API data hooks: loads dashboard data
src/pages/Index.tsx - Sales workflows → Sales and tables: uses sale records
backend/sales/services.py - Sales workflows → Sales realtime: dispatches updates
backend/sales/services.py - Sales workflows → Notifications: sends notifications
backend/sales/services.py - Sales and tables → Products and stock: references products
backend/sales/models.py - Report generation → Report records: creates reports
backend/reports/tasks.py - Report generation → Sales and tables: aggregates sales
backend/reports/tasks.py - Report generation → Products and stock: reads product costs
backend/reports/tasks.py - Report generation → Expenses: totals expenses
backend/reports/tasks.py - Report generation → Notifications: announces reports
backend/reports/tasks.py - Report realtime → Report records: reads report data
backend/reports/consumers.py - Report realtime → Sales and tables: reads sales data
backend/reports/consumers.py - Report realtime → Products and stock: reads product data
backend/reports/consumers.py - Sales realtime → Sales and tables: reads sales data
backend/sales/consumers.py - Sales realtime → Sales and tables: serializes updates
backend/sales/consumers.py - Kitchen operations → Notifications: signals notifications
backend/kitchen/signals.py - Sales and tables → Inventory: uses stock movements
backend/sales/models.py