How kirush29/stockpilot works
StockPilot is an inventory and procurement platform whose users work through web and mobile clients against a central API. Its main replenishment journey moves from inventory optimization through demand forecasting and supplier evaluation to a procurement proposal, deterministic checks, human approval, and purchase-order processing. The README documents this workflow and the major business capabilities; the supplied excerpts expose only selected implementation details, so some documented links are shown with README evidence rather than inferred from unsampled code.
Main entry points: Program.cs ASP.NET Core API · decision_engine.py Supplier Evaluation · ReplenishmentOrchestrator.cs Replenishment Orchestrator · ProcurementCoordinatorAgent.cs Procurement Coordinator
Components 20
Client Applications
- React Management UI
web/src/App.jsx - Flutter Operations UI
mobile/android/app/src/main/kotlin/com/stockpilot/stockpilot_mobile/MainActivity.kt
Inventory and Sales
- Inventory Operations
backend/StockPilot.Api/Modules/Inventory/Domain/Entities/Inventory.cs - Inventory Optimizer
backend/StockPilot.Api/Modules/Inventory/Infrastructure/Services/InventoryOptimizationService.cs - Sales Recording
backend/StockPilot.Api/Modules/SalesDemand/Application/Sales/Services/SalesService.cs - Demand Forecast Agent
backend/StockPilot.Api/Modules/SalesDemand/Agents/DemandForecastAgent/DemandForecastAgent.cs
Supplier Management
- Supplier and Quotation Management
backend/StockPilot.Api/Modules/Suppliers/Application/Services/SupplierService.cs - Supplier Evaluation
agentic-ai/agents/supplier_evaluation/decision_engine.py
Procurement Workflow
- Replenishment Orchestrator
backend/StockPilot.Api/Shared/Agents/Orchestrator/ReplenishmentOrchestrator.cs - Procurement Coordinator
backend/StockPilot.Api/Modules/Procurement/Agents/ProcurementCoordinator/ProcurementCoordinatorAgent.cs - Business Rule Checks
backend/StockPilot.Api/Modules/Procurement/Application/Services/ProcurementBusinessRuleService.cs - Procurement Proposal
backend/StockPilot.Api/Modules/Procurement/Application/Services/ProcurementProposalService.cs - Human Approval
backend/StockPilot.Api/Modules/Procurement/Controllers/ProposalsController.cs - Purchase Orders
backend/StockPilot.Api/Modules/Procurement/Application/Services/PurchaseOrderService.cs
API and Platform
- ASP.NET Core API
backend/StockPilot.Api/Program.cs - Identity and Access
backend/StockPilot.Api/Modules/Inventory/Controllers/AuthController.cs - Workflow Audit and Monitoring
backend/StockPilot.Api/Shared/Agents/AgentRunsController.cs - PostgreSQL Database
backend/StockPilot.Api/Shared/Data/AppDbContext.cs
Other components
- Business User
- External AI Service
Connections 24
- Business User → React Management UI: uses
README.md - Business User → Flutter Operations UI: uses
README.md - React Management UI → ASP.NET Core API: sends requests
README.md - Flutter Operations UI → ASP.NET Core API: sends requests
README.md - ASP.NET Core API → Identity and Access: routes authentication
backend/StockPilot.Api/Program.cs - ASP.NET Core API → Inventory Operations: routes business operations
README.md - ASP.NET Core API → Sales Recording: routes business operations
README.md - ASP.NET Core API → Supplier and Quotation Management: routes business operations
README.md - ASP.NET Core API → Replenishment Orchestrator: routes workflows
backend/StockPilot.Api/Program.cs - Inventory Operations → Inventory Optimizer: analyzes stock
README.md - Inventory Optimizer → Demand Forecast Agent: informs replenishment
README.md - Sales Recording → Demand Forecast Agent: provides demand history
README.md - Demand Forecast Agent → Supplier Evaluation: informs supplier choice
README.md - Supplier and Quotation Management → Supplier Evaluation: provides quotations
README.md - Supplier Evaluation → External AI Service: requests evaluation
- Supplier Evaluation → Replenishment Orchestrator: returns recommendation
README.md - Replenishment Orchestrator → Procurement Coordinator: dispatches workflow
README.md - Procurement Coordinator → Business Rule Checks: checks proposal
README.md - Procurement Coordinator → Procurement Proposal: prepares proposal
README.md - Business Rule Checks → Procurement Proposal: validates for review
README.md - Procurement Proposal → Human Approval: awaits decision
backend/StockPilot.Api/Modules/Procurement/Controllers/ProposalsController.cs - Human Approval → Purchase Orders: converts approved proposal
backend/StockPilot.Api/Modules/Procurement/Controllers/ProposalsController.cs - Replenishment Orchestrator → Workflow Audit and Monitoring: records workflow
README.md - ASP.NET Core API → PostgreSQL Database: persists platform data
README.md