How jcyy2520-sudo/fajutagana works
JAPZ Inventory is a React inventory workspace backed by an Express API and MySQL. Staff sign in, manage supplies and suppliers, receive stock, maintain prepared/menu availability, submit counts and waste, and review movements/reports; Admin has additional approval and policy controls. POS order reservation and Kitchen status/waste are documented system boundaries, not complete modules here. The graph uses README and SOURCE INDEX evidence; some screen-to-provider and unsampled service wiring is therefore left undocumented rather than inferred.
Main entry points: inventory.js Inventory API · inventoryOrders.js POS / Kitchen Bridge · index.js Shared API Routes · menuAvailability.js Menu Availability
Components 26
Inventory Web
- Inventory Routes
japz-web/src/App.tsx - Auth Context
japz-web/src/hooks/useAuth.tsx - Sign-in
japz-web/src/pages/Login.tsx - Role Guard
japz-web/src/components/ProtectedRoute.tsx - Inventory Screens
japz-web/src/features/inventory - Inventory Data
japz-web/src/features/inventory/data.ts - Menu Stock
japz-web/src/features/inventory/MenuStock.tsx - Shared Controls
japz-web/src/features/inventory/shared.tsx - HTTP Client
japz-web/src/services/api.ts
API and Identity
- Express Runtime
japz-backend/index.js - Shared API Routes
japz-backend/routes/index.js - Inventory API
japz-backend/routes/inventory.js - Access Middleware
japz-backend/middleware/access.js - Identity Records
japz-backend/models/userModel.js
Inventory Domain
- Stock Operations
japz-backend/services/inventoryService.js - Menu Availability
japz-backend/services/menuAvailability.js - POS / Kitchen Bridge
japz-backend/services/inventoryOrders.js - Inventory Policies
japz-backend/services/inventorySettings.js
Persistence
- Inventory Records
japz-backend/models/inventoryModels.js - POS and Menu Records
japz-backend/models/orderModel.js - Sequelize Connection
japz-backend/models/db.js
Other components
- Inventory Staff / Admin
- Browser
- MySQL
- POS Order Creation
- Kitchen Status Changes
Connections 36
- Inventory Staff / Admin → Inventory Routes: uses
japz-web/src/App.tsx - Inventory Routes → Role Guard: protects routes
japz-web/src/App.tsx - Inventory Routes → Inventory Screens: routes to
japz-web/src/App.tsx - Inventory Routes → Auth Context: provides auth
japz-web/src/App.tsx - Sign-in → Auth Context: signs in
japz-web/src/pages/Login.tsx - Auth Context → HTTP Client: calls auth API
japz-web/src/hooks/useAuth.tsx - Role Guard → Auth Context: checks roles
japz-web/src/components/ProtectedRoute.tsx - Inventory Screens → Inventory Data: uses data
japz-web/src/features/inventory/MenuStock.tsx - Menu Stock → Inventory Data: uses data
japz-web/src/features/inventory/MenuStock.tsx - Menu Stock → Shared Controls: renders controls
japz-web/src/features/inventory/MenuStock.tsx - Inventory Data → HTTP Client: requests records
japz-web/src/features/inventory/data.ts - HTTP Client → Browser: sends HTTP
japz-web/src/services/api.ts - Browser → Express Runtime: calls API
- Express Runtime → Shared API Routes: mounts routes
japz-backend/index.js - Express Runtime → Sequelize Connection: loads connection
japz-backend/index.js - Shared API Routes → Access Middleware: uses auth checks
japz-backend/routes/index.js - Inventory API → Access Middleware: checks access
japz-backend/routes/inventory.js - Access Middleware → Identity Records: reloads user
japz-backend/middleware/access.js - Shared API Routes → Menu Availability: serves availability
japz-backend/routes/index.js - Shared API Routes → POS / Kitchen Bridge: dispatches orders
japz-backend/routes/index.js - Shared API Routes → Inventory API: mounts inventory
japz-backend/routes/index.js - Inventory API → Stock Operations: dispatches operations
japz-backend/routes/inventory.js - Inventory API → Menu Availability: requests menu status
japz-backend/routes/inventory.js - Inventory API → Inventory Policies: uses policies
japz-backend/routes/inventory.js - POS / Kitchen Bridge → Stock Operations: uses stock logic
japz-backend/services/inventoryOrders.js - Menu Availability → Stock Operations: uses quantities
japz-backend/services/menuAvailability.js - Stock Operations → Inventory Records: updates records
japz-backend/services/inventoryService.js - Menu Availability → Inventory Records: reads stock recipes
japz-backend/services/menuAvailability.js - POS / Kitchen Bridge → Inventory Records: reserves stock
japz-backend/services/inventoryOrders.js - POS / Kitchen Bridge → POS and Menu Records: updates orders
japz-backend/services/inventoryOrders.js - Stock Operations → Sequelize Connection: runs transactions
japz-backend/services/inventoryService.js - Menu Availability → Sequelize Connection: runs transactions
japz-backend/services/menuAvailability.js - Sequelize Connection → MySQL: connects to
- POS Order Creation → POS / Kitchen Bridge: creates reservations
- Kitchen Status Changes → POS / Kitchen Bridge: changes order status
- Kitchen Status Changes → Inventory API: submits waste