Pillar 6. Logistics, Supply Chain, Warehouse BOM & Field Workforce
Recipe BOM Inventory, GS1 Barcodes, 2-Opt Pick Routing, Shipping Rate Aggregators, and Shift Roster Schedulers.
Pillar 6. Logistics, Supply Chain, Warehouse BOM & Field Workforce
6 Domain Combo Suites (22+ Isolated Slices)
Multi-level recipe bill of materials, FEFO batch tracking, GS1 barcode parsing, Traveling Salesperson pick optimization, shipping calculation, and workforce scheduling.
📦 Package Catalog
| Package Name | Path | Architecture Paradigm & Key Exports |
|---|---|---|
@kido/bom-inventory | packages/bom-inventory | Recipe BOM + FEFO Expiry + WMS Barcode + S-Shape 2-Opt TSP Routing: • BomInventoryEngine, explodeBomRequirements, deductIngredientsWithWaste• BatchManager, evaluateBatchExpiry, calculateReorderPoint• parseBarcodeGS1, optimizeSshape2OptRoute, calculateWarehouseWalkingDistance |
@kido/geocoding-routing | packages/geocoding-routing | Haversine Distance + Vincenty Geofence + Mock-GPS Guard: • haversineDistance, findNearestHub, estimateTravelTime• vincentyDistance, checkGeofence, detectMockLocation, verifyPhotoProof |
@kido/shipping-calculator | packages/shipping-calculator | Vietnam Multi-Carrier Fee Calculator (GHN, GHTK, ViettelPost): • ShippingCalculator, calculateVolumetricWeight, quoteMultiCarrierRates |
@kido/fleet-routing | packages/fleet-routing | Vehicle Routing Problem (VRP) Solver & 2-Opt Route Optimizer: • FleetRouteOptimizer, solveCapacitatedVrp, twoOptImprove |
@kido/crew-scheduler | packages/crew-scheduler | Shift Roster Optimizer, Overtime Calculator & 5-Tier Payroll: • CrewScheduler, detectShiftConflicts, calculateShiftPayroll, groupWorkforcePayroll |
@kido/equipment-rental | packages/equipment-rental | Availability Interval Tree, Security Deposit & Damage Fee Engine: • EquipmentAvailabilityEngine, calculateRentalQuote, assessDamageAndLateFees |
🔍 Key Architectural Patterns
1. Multi-Level Recipe Bill of Materials (BOM)
Automatically deduct sub-ingredients with scrap/waste factors when a finished good is produced or ordered:
import { BomInventoryEngine } from '@kido/bom-inventory';
const engine = new BomInventoryEngine();
const requiredRaw = engine.explodeBomRequirements({
productId: 'PIZZA_PEPPERONI_LARGE',
quantity: 50,
wasteMultiplier: 1.05, // 5% kitchen prep scrap allowance
});2. Mock-GPS Detection & Geofenced Clock-In
Ensure field workers and delivery drivers are physically on-site before permitting task completion or attendance clock-ins:
import { checkGeofence, detectMockLocation } from '@kido/geocoding-routing/geo-guard';
const isMock = detectMockLocation({
latitude: 16.0544,
longitude: 108.2022,
accuracyMeters: 5,
altitudeAccuracyMeters: 0, // 0 indicates synthetic emulator GPS
});
const isInsideStore = checkGeofence({
point: { lat: 16.0544, lng: 108.2022 },
storePolygon: [/* store boundary points */],
});3. Multi-Carrier Vietnam Shipping Rate Engine
Automatically calculates volumetric weight according to carrier formulas ($L \times W \times H / 5000$) and retrieves instant fee quotes:
import { ShippingCalculator, calculateVolumetricWeight } from '@kido/shipping-calculator';
const chargeableWeight = calculateVolumetricWeight({
lengthCm: 40,
widthCm: 30,
heightCm: 20,
actualWeightGrams: 1500,
});
const quotes = await ShippingCalculator.quoteMultiCarrierRates({
fromProvince: 'Đà Nẵng',
toProvince: 'Hà Nội',
weightGrams: chargeableWeight,
});@kido/event-marketing
Automated Event Lifecycle Drip Engine, Multi-Channel Adapters (Zalo ZNS, Telegram, Email), ROI & CPI Telemetry Calculator, and Minimalist Email Template Builder.
@kido/bom-inventory
Multi-Level Recipe Bill of Materials (BOM), FEFO Expiry Management, GS1-128 Barcode Parsing, S-Shape 2-Opt Pick Routing, and Variance Analysis.