Skip to Content
Kido Bag
Domain Combo SuitesPillar 6. Logistics & Workforce

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 NamePathArchitecture Paradigm & Key Exports
@kido/bom-inventorypackages/bom-inventoryRecipe BOM + FEFO Expiry + WMS Barcode + S-Shape 2-Opt TSP Routing:
• BomInventoryEngine, explodeBomRequirements, deductIngredientsWithWaste
• BatchManager, evaluateBatchExpiry, calculateReorderPoint
• parseBarcodeGS1, optimizeSshape2OptRoute, calculateWarehouseWalkingDistance
@kido/geocoding-routingpackages/geocoding-routingHaversine Distance + Vincenty Geofence + Mock-GPS Guard:
• haversineDistance, findNearestHub, estimateTravelTime
• vincentyDistance, checkGeofence, detectMockLocation, verifyPhotoProof
@kido/shipping-calculatorpackages/shipping-calculatorVietnam Multi-Carrier Fee Calculator (GHN, GHTK, ViettelPost):
• ShippingCalculator, calculateVolumetricWeight, quoteMultiCarrierRates
@kido/fleet-routingpackages/fleet-routingVehicle Routing Problem (VRP) Solver & 2-Opt Route Optimizer:
• FleetRouteOptimizer, solveCapacitatedVrp, twoOptImprove
@kido/crew-schedulerpackages/crew-schedulerShift Roster Optimizer, Overtime Calculator & 5-Tier Payroll:
• CrewScheduler, detectShiftConflicts, calculateShiftPayroll, groupWorkforcePayroll
@kido/equipment-rentalpackages/equipment-rentalAvailability 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,
});

On this page