Delivered remotely for a business based in Manchester, United Kingdom. Names withheld by agreement.
Project Overview
Industry: Wholesale Distribution & Inventory Control
Solution scope: A multi-tenant cloud SaaS platform and API built with Laravel, Vue, MySQL, Redis, and AWS S3 for real-time bin-level inventory control, batch lot traceability, barcode picking, and supplier replenishment.
Context: Independent wholesalers and regional distributors operating out of hubs like Manchester manage thousands of active SKUs across bulk pallet racking, pick faces, and overflow depots. Relying on periodic spreadsheet imports or disconnected accounting stock counters creates costly blind spots: sales teams promise units already reserved for another dispatch, perishable lots expire unnoticed behind newer pallets, and buyers reorder too late. A dedicated inventory SaaS provides continuous physical-to-digital synchronization across every warehouse aisle.
Wholesale Distribution Bottleneck
Phantom stock and double allocations. When trade portals, sales reps, and warehouse transfers update stock counts without transactional locking, multiple orders claim the same physical units and trigger backorders.
Missing lot and expiry traceability. Distributing food ingredients, cosmetics, or regulated consumables requires tracing every supplier batch through to trade customers—a workflow unsupported by basic SKU counters.
Slow manual cycle counting and receiving. Operators walking aisles with clipboards introduce transcription errors, miss damaged goods-in quantities, and delay stock availability until clerks key counts hours later.
Reactive purchasing guesswork. Without visibility into vendor lead times, open purchase orders, and demand velocity, buyers tie up capital in overstock or face stockouts on core lines.
Architectural Strategy
Separate immutable stock history from hot availability counters. Every receipt, putaway, pick, transfer, or write-off appends an immutable movement record. Synchronously updated bin-balance rows maintain pre-aggregated on-hand, reserved, and incoming totals for fast reads.
Keep warehouse interfaces fast with Vue 3. Operators use tablets and handheld browsers paired with Bluetooth barcode scanners. Vue binds global keyboard-wedge listeners so scanning a bin, SKU, or lot advances picking steps without mouse clicks.
Queue external integrations on Redis and Horizon. Sales channels and carrier APIs exhibit unpredictable latency spikes. Isolating webhook ingestion, stock pushes, and shipping manifests in Redis queues ensures external slowdowns never stall receiving.
Model multi-warehouse topologies explicitly. Rather than treating warehouses as flat buckets, the schema models Sites, Zones, Aisles, and Bins with pickable versus quarantine statuses to isolate damaged stock.
Core Capabilities
- Multi-site bin & zone inventory: Maps physical warehouse layouts down to bin locations, tracking available, allocated, quarantined, and in-transit stock per facility.
- Lot, serial & expiry governance: Supports FIFO and FEFO picking rules, capturing supplier batch codes and expiry dates at goods-in and validating them at dispatch.
- Scan-driven receiving & picking: Browser-based Vue workflows guide operators through purchase order putaway, wave picking, partial backorder splits, and blind cycle counts.
- Automated replenishment rules: Calculates net stock positions against configurable safety thresholds, vendor lead times, and open inbound orders to draft purchase orders automatically.
- Inter-warehouse transfer manifests: Tracks stock leaving a central distribution center until physically scanned into a regional depot, preventing units from vanishing mid-transit.
- B2B channel & carrier API synchronization: Pushes near-real-time available-to-promise counts to connected trade portals while ingesting fulfilled order webhooks idempotently.
Technical Architecture
Laravel multi-tenant API core. Requests resolve the authenticated user's organization context via middleware, enforcing tenant isolation across Eloquent models, FormRequest validators, and role policies separating warehouse pickers from purchasing directors.
MySQL transactional ledger. InnoDB tables enforce foreign-key integrity across SKUs, warehouses, bins, lots, and movement lines. Allocation endpoints open short transactions with pessimistic row locks on target bin-lot rows to prevent concurrent overselling.
Redis worker & caching tier. Laravel Horizon manages dedicated queue pools for high-priority order allocations, low-priority CSV catalog imports, and scheduled nightly reorder-point evaluations, while caching read-heavy catalog trees in Redis.
Vue 3 reactive frontend. Built with Composition API and Pinia, the client application caches active SKU barcodes locally during a picking wave so rapid sequential scans give instant visual and audio feedback before confirming the batch over REST.
AWS infrastructure & S3 storage. Hosted on AWS with managed MySQL backups, the system streams generated thermal ZPL/PDF barcode sheets, packing slips, and ASN documents into private S3 buckets delivered via expiring pre-signed URLs.
Flow: Warehouse operator / Trade API (Vue 3 UI) → Laravel tenant & policy gate → MySQL locked bin-lot ledger → Redis Horizon sync workers → AWS S3 label & document store
Technology Stack
| Category | Technology |
|---|---|
| Backend language | PHP 8 powering strict domain services, SKU valuation logic, and multi-tenant policy enforcement |
| Backend framework | Laravel orchestrating REST APIs, queued channel sync jobs, and scheduled replenishment sweeps |
| Frontend framework | Vue 3 with Pinia state management delivering responsive stock grids and barcode scan interfaces |
| Primary database | MySQL storing tenant catalogs, bin coordinates, lot ledgers, and transactional stock locks |
| Queues & cache | Redis driving Laravel Horizon workers, webhook retries, and hot SKU availability caches |
| Cloud infrastructure | AWS compute instances, managed RDS MySQL, and automated point-in-time recovery backups |
| Document & label storage | AWS S3 storing packing slips, supplier ASN manifests, and thermal barcode label PDFs |
| Barcode & scanner support | HID keyboard-wedge scanner input handling inside browser-based Vue receiving and picking screens |
| Webhook integrations | Signed outbound webhooks and inbound order ingestion connectors for upstream ecommerce channels |
| Observability | Queue depth alerts, dead-letter job inspection, and tenant-scoped movement audit logs |
Engineering Trade-offs & Solutions
| Challenge | Solution |
|---|---|
| Concurrent order imports and manual sales claims caused negative bin balances | Applied InnoDB SELECT FOR UPDATE locks ordered by SKU and bin ID inside atomic allocation transactions. |
| Summing millions of historical stock movement rows slowed catalog screens | Paired the immutable movement ledger with synchronously updated bin-balance projection rows for instant lookups. |
| Large wholesale CSV catalog uploads timed out web requests | Streamed uploaded files to AWS S3 and chunked validation rows across parallel Redis worker jobs with progress polling. |
| Outbound inventory updates to external marketplaces triggered rate-limit failures | Debounced rapid stock changes per SKU in Redis before dispatching batched channel sync payloads with exponential backoff. |
| Operators accidentally picked expired batches during busy dispatch windows | Enforced server-side FEFO lot suggestions paired with mandatory barcode scan confirmation on the picking screen. |
| Reporting queries on multi-year movement history impacted live warehouse picking | Routed heavy valuation exports and dead-stock analytics to read replicas and off-peak queued report builders. |
Security & Reliability
Tenant-isolated authorization boundaries. Global query scopes and explicit Laravel policy checks ensure API tokens, warehouse pickers, and supplier portals can access only records belonging to their assigned organization and permitted depot locations.
Idempotent order and webhook processing. Every inbound order ingestion job records an external reference key with a unique composite constraint per tenant and channel, neutralizing duplicate webhook deliveries safely.
Encrypted private document exchange. Purchase order PDFs, customs manifests, and thermal shipping labels reside in encrypted private S3 buckets and render only through short-lived signed links.
Performance & Scale
Partitioned queue lanes in Laravel Horizon. Interactive customer-triggered actions such as generating packing slips run on high-priority Redis queues isolated from bulk catalog imports or overnight replenishment runs, preserving predictable response times during peak morning dispatch waves.
Composite indexing for SKU and lot lookups. MySQL indexes on (tenant_id, warehouse_id, sku_id, expiry_date) enable fast FEFO lot selection and rapid barcode search across deep wholesale catalogs without full table scans.
Operational Outcomes
- Accurate cross-depot stock visibility: Sales and purchasing teams inspect unified available, reserved, and inbound quantities across every warehouse in real time.
- Traceable lot-level compliance: Wholesale operators trace individual supplier batches from goods-in dock through to customer dispatch within seconds.
- Streamlined warehouse floor execution: Keyboard-wedge barcode workflows in Vue replace paper pick lists and manual terminal entry.
- Proactive purchasing cadence: Automated reorder alerts surface low-cover SKUs ahead of lead-time cutoffs, reducing emergency air-freight orders and stockouts.