SCM packages
Supply Chain Management (SCM) modules share a common runtime bootstrap pattern and export loop participant manifests for the Loop Engine graph.Module interface (factory / runtime pattern)
1. Configure the runtime once
At application startup, call the packageconfigure*Runtime with infrastructure dependencies (getDb, outbox, readChannelMessages).
configureProcurementRuntime—@betterdata/scm-procurementconfigureExecutionRuntime—@betterdata/scm-execution
2. Call domain services
Loop participation
Every SCM module ships a*LoopParticipant manifest typed as LoopParticipantManifest from @betterdata/loop-definitions.
@betterdata/loop-actors includes validation tests so participants only reference known LoopIds and EventNames.
Package list
| Package | What it does |
|---|---|
@betterdata/scm-contracts | Shared types, event envelopes, OutboxWriter, ChannelReader, runtime helpers |
@betterdata/scm-inventory | Stock, lots, reservations, QOH, availability |
@betterdata/scm-procurement | PO lifecycle, invoice alignment hooks |
@betterdata/scm-execution | Shipments, pick/pack/ship/receive |
@betterdata/scm-catalog | Product masters, marketplace search, normalizers |
Key exports (high level)
@betterdata/scm-inventory — StockService, reservation helpers, LotService, inventoryLoopParticipant, configureInventoryRuntime.
@betterdata/scm-catalog — product resolution, marketplace search services, catalogLoopParticipant, adapter interfaces for ranking and trust.
@betterdata/scm-procurement — procurement services, loop-participation / preload-contribution, configureProcurementRuntime.
@betterdata/scm-execution — shipment and warehouse engines, configureExecutionRuntime, execution loop participation.