How gen-ayu/stock-sense works
Stock-Sense is a browser-based inventory and warehouse management application. Users enter through the app shell, choose operational or analytical views, and work with inventory state shared across those views. The main workflow covers receipts, deliveries, transfers, adjustments, and movement history; related features include product and warehouse management, expiry tracking, sales and seller activity, reporting, and authentication. The README documents operational lifecycles and list/kanban views. The excerpts show shared context and selected view dependencies; connections for unsampled subsystems are limited to documented or indexed references.
Main entry points: InventoryContext.tsx Inventory context · App.tsx App navigation · ReceiptsView.tsx Receipts · StatusBadge.tsx Status badges
Components 26
Application shell
- App navigation
src/App.tsx - Navbar
src/components/layout/Navbar.tsx - Sidebar
src/components/layout/Sidebar.tsx - Authentication
src/components/auth/AuthModal.tsx - Dashboard
src/components/dashboard/ExpandedDashboardView.tsx
Warehouse operations
- Receipts
src/components/operations/ReceiptsView.tsx - Delivery orders
src/components/operations/DeliveriesView.tsx - Internal transfers
src/components/operations/InternalTransfersView.tsx - Stock adjustments
src/components/operations/StockAdjustmentsView.tsx - Move history
src/components/operations/MoveHistoryView.tsx - Print vouchers
src/components/common/PrintVoucherModal.tsx - Status badges
src/components/common/StatusBadge.tsx
Inventory management
- Product catalog
src/components/products/ProductsView.tsx - Batch and expiry
src/components/expiry/ExpiryManagementView.tsx - Warehouse settings
src/components/settings/WarehouseSettingsView.tsx - Product drill-down
src/components/products/ProductDrillDownModal.tsx
Sales and insights
- Sales analytics
src/components/sales/SalesAnalyticsView.tsx - Sales channels
src/components/sales/SalesChannelsView.tsx - Seller hub
src/components/sellers/SellerHubView.tsx - Product performance
src/components/intelligence/ProductPerformanceView.tsx - Stock intelligence
src/components/intelligence/StockIntelligenceView.tsx - Retailer insights
src/components/intelligence/RetailerInsightsView.tsx - Reports
src/components/reports/ReportsView.tsx
Shared state
- Inventory context
src/context/InventoryContext.tsx - Initial inventory data
src/data/mockData.ts
Other components
- User
Connections 39
- User → App navigation: uses
- App navigation → Inventory context: provides state
src/App.tsx - App navigation → Navbar: renders
src/App.tsx - App navigation → Sidebar: renders
src/App.tsx - App navigation → Dashboard: routes to
src/App.tsx - App navigation → Sales analytics: routes to
src/App.tsx - App navigation → Sales channels: routes to
src/App.tsx - App navigation → Seller hub: routes to
src/App.tsx - App navigation → Product performance: routes to
src/App.tsx - App navigation → Batch and expiry: routes to
src/App.tsx - App navigation → Retailer insights: routes to
src/App.tsx - App navigation → Reports: routes to
src/App.tsx - App navigation → Receipts: routes to
src/App.tsx - App navigation → Move history: routes to
src/App.tsx - App navigation → Product catalog: routes to
src/App.tsx - Receipts → Inventory context: reads and updates
src/components/operations/ReceiptsView.tsx - Delivery orders → Inventory context: reads and updates
src/components/operations/DeliveriesView.tsx - Internal transfers → Inventory context: uses inventory
src/components/operations/InternalTransfersView.tsx - Stock adjustments → Inventory context: uses inventory
src/components/operations/StockAdjustmentsView.tsx - Move history → Inventory context: reads movements
src/components/operations/MoveHistoryView.tsx - Receipts → Print vouchers: renders
src/components/operations/ReceiptsView.tsx - Delivery orders → Print vouchers: renders
src/components/operations/DeliveriesView.tsx - Receipts → Status badges: renders
src/components/operations/ReceiptsView.tsx - Delivery orders → Status badges: renders
src/components/operations/DeliveriesView.tsx - Internal transfers → Status badges: renders
src/components/operations/InternalTransfersView.tsx - Move history → Status badges: renders
src/components/operations/MoveHistoryView.tsx - Product catalog → Inventory context: uses inventory
src/components/products/ProductsView.tsx - Batch and expiry → Inventory context: manages batches
src/components/expiry/ExpiryManagementView.tsx - Warehouse settings → Inventory context: uses inventory
src/components/settings/WarehouseSettingsView.tsx - Product performance → Inventory context: analyzes sales
src/components/intelligence/ProductPerformanceView.tsx - Product performance → Product drill-down: opens details
src/components/intelligence/ProductPerformanceView.tsx - Sales analytics → Inventory context: uses sales data
src/components/sales/SalesAnalyticsView.tsx - Sales channels → Inventory context: uses sales data
src/components/sales/SalesChannelsView.tsx - Seller hub → Inventory context: uses transactions
src/components/sellers/SellerHubView.tsx - Stock intelligence → Inventory context: uses inventory
src/components/intelligence/StockIntelligenceView.tsx - Retailer insights → Inventory context: uses sales data
src/components/intelligence/RetailerInsightsView.tsx - Reports → Inventory context: reads report data
src/components/reports/ReportsView.tsx - Authentication → Inventory context: uses account state
src/components/auth/AuthModal.tsx - Inventory context → Initial inventory data: loads initial data
src/context/InventoryContext.tsx