Enterprise reference architecture
A proposed engineering design for this workflow. The enterprise scenario and stack below are illustrative architecture choices; they are separate from the confirmed project screens.
The enterprise scenario
A retailer coordinates replenishment across warehouses and suppliers, with purchase approvals and stock feeds from several operational systems.
Architecture objective: Connect a replenishment recommendation to its stock assumptions and purchasing decision while retaining a clear authority for each inventory field.
Proposed technology stack and rationale
Planning interface
Vue and TypeScript
Provide focused stock, reorder and purchase-review views with consistent quantity units.
Inventory domain
ASP.NET Core and typed supplier adapters
Model reservations, receipts, adjustments and approval transitions explicitly.
Inventory records
Microsoft SQL Server with row-versioned updates
Retain item, warehouse, unit and event identity; distinguish on-hand, reserved and available quantities.
Integration and reconciliation
Azure Service Bus with an outbox and scheduled reconciliation
Handle delayed ERP events, repeated receipts and failed supplier submissions without silent drift.
Operations and access
Microsoft Entra ID, warehouse-scoped roles and Application Insights
Restrict adjustments and purchasing approvals and expose mismatched stock records for review.
Technical challenges and design approach
1Stock is not a single number
On-hand, reserved and available quantities answer different questions. Preserve their definitions and the events contributing to each value.
2Delayed operational events
A receipt may arrive after a reorder recommendation is prepared. Record the version used and revalidate the proposal before approval.
3Conflicting system ownership
ERP, warehouse and storefront tools may each hold part of the truth. Assign field-level authority and reconciliation ownership before allowing two-way updates.
How the proposed workflow fits together
- Validated stock events update the warehouse-scoped inventory record.
- A recommendation records the quantities, thresholds and source version behind its proposal.
- A buyer reviews line items, units and supplier context before approval.
- The approval command checks permissions and the current state, then records its outbox event.
- Supplier or ERP responses are correlated and reconciled, with uncertain submissions routed to staff.
Acceptance and failure-path checks
- Repeated receipt events do not increase stock twice.
- A stale proposal is revalidated before it can become an approved order.
- Warehouse and purchasing roles have separate authorised actions.
- A failed supplier request can be reconciled before a retry risks a duplicate purchase.
The tradeoff
Keep recommendation generation separate from purchase authorisation. Even a sophisticated forecast should not bypass the stock and approval controls that make the resulting order accountable.
Architecture references: ASP.NET Core documentation, SQL Server rowversion and Azure Service Bus. These describe engineering patterns, rather than certify this project’s implementation.