← Engineering Dispatches / Business Systems
Custom Warehouse Management System (WMS) Architecture: Engineering Real-Time Inventory, Barcode Pick-Pack-Ship, and ERP Sync
By Aman Aslam · 13 min read read
Architectural Takeaways
- Model physical warehouses as a normalized spatial hierarchy (Facility -> Zone -> Aisle -> Bay -> Shelf -> Bin) with volumetric capacity limits.
- Prevent double-allocation of stock during flash sales using PostgreSQL `SELECT FOR UPDATE SKIP LOCKED` inside serialized reservation transactions.
- Design handheld RF barcode scanning applications as local-first offline PWA or native clients that queue scans locally during Wi-Fi dead zones in steel warehouse aisles.
1. Relational Spatial Bin Mapping & Inventory Ledger
Inventory in a modern distribution center should never be represented by a single mutable integer count on a `products` table. Doing so makes it impossible to audit shrinkage, track batch expiration dates, or know the exact physical location of merchandise.
Instead, we implement a double-entry inventory ledger where every stock movement is recorded as a transfer between a Source Bin and a Destination Bin, complete with SKU, Lot Number, Expiration Date, and Operator ID.
2. High-Concurrency Stock Reservation & Allocation
When thousands of orders are released simultaneously to warehouse pickers, multiple background workers querying for pickable inventory can experience severe row lock contention. By utilizing PostgreSQL `SELECT FOR UPDATE SKIP LOCKED`, pickers automatically receive distinct, unreserved inventory rows without blocking one another.
3. Offline-Tolerant Mobile Barcode Scanner Architecture
Large commercial warehouses are full of RF dead zones where Wi-Fi signals cannot penetrate dense pallet racking. Handheld zebra scanners or mobile Android scanning apps must buffer barcode scans in a local SQLite database, validating checksums locally and batch-syncing transactions over WebSockets once network connectivity resumes.
4. Automated Pick-Pack-Ship & Carrier API Integration
Once packing stations scan the final item into a shipping carton, the WMS calculates carton dimensions and weight, calls carrier rate APIs in parallel, generates ZPL thermal shipping labels in under 200ms, and pushes tracking numbers to the client ERP and e-commerce storefront.
Read more technical guides on our Dispatches Index →