Skip to main content
globasoft.uk/portfolio/inventory-system
Organized warehouse shelving with inventory management technology

Real-Time Inventory Management

A growing retail chain with 12 physical stores and a thriving e-commerce channel was losing revenue and customer trust to a problem they could not solve with their existing tools: inventory accuracy. Their point-of-sale system and online store operated from separate stock databases, and the gap between them was widening with every sale.

The Challenge

The retailer's POS system tracked in-store stock independently at each location, while the e-commerce platform maintained its own inventory count updated by a nightly batch sync. During the day, as in-store purchases depleted physical stock, the online store continued to show items as available. This lag meant that 8% of online orders had to be cancelled after payment because the purchased items were no longer in stock -- a frustrating experience that was generating negative reviews and measurable customer churn.

The problem compounded during peak trading periods. During sales events and holiday seasons, the cancellation rate spiked to over 15% as popular items sold out in stores hours before the online counts caught up. The customer service team was spending a significant portion of their time processing refunds and managing complaints related to overselling.

Beyond the customer-facing impact, store managers lacked visibility into stock at other locations. When a customer asked for a specific item that was out of stock locally, staff had no reliable way to check whether a nearby store had it available. Transfer requests between stores were handled by phone, and the lack of a unified view meant the buying team was making replenishment decisions based on incomplete data.

Our Solution

We built a real-time inventory management system with a Node.js backend and React frontend, using WebSocket connections and Redis caching to deliver sub-second stock synchronisation across all 12 stores and the e-commerce platform.

The architecture centres on a Redis-backed event bus. Every stock-affecting transaction -- whether an in-store sale through the POS, an online purchase, a return, or a manual adjustment -- emits an inventory event that is processed in real time. Redis serves as both the caching layer for current stock levels and the pub/sub mechanism for broadcasting changes. Each store's POS integration publishes events through a lightweight Node.js agent running on the local network, ensuring that even intermittent connectivity does not cause data loss thanks to a local queue that syncs when the connection is restored.

The WebSocket layer pushes stock updates to all connected clients instantly. Store managers see a live dashboard showing stock levels across every location, with the ability to initiate transfers directly from the interface. The e-commerce platform receives stock updates within milliseconds of an in-store sale, preventing overselling at the source rather than catching it after the fact.

PostgreSQL serves as the durable data store with a complete audit trail of every inventory movement. The system supports predictive restocking alerts based on historical sales velocity, notifying the buying team when stock for a given SKU at a specific location is projected to run out within a configurable threshold. The React frontend provides a unified operations dashboard where buyers, store managers, and warehouse staff each see the views most relevant to their role.

Results

Within two weeks of deployment, online order cancellations due to stock issues dropped from 8% to under 0.5%. Stock accuracy across all channels reached 99.7%, effectively eliminating the discrepancies that had plagued the business. The customer service team reported a dramatic reduction in refund requests and inventory-related complaints. Store-to-store transfers increased by 30% as managers gained visibility into nearby stock, reducing the need for emergency replenishment orders. The buying team credited the predictive restocking alerts with helping them reduce overstock by 18% while simultaneously avoiding stockouts on top-selling items during the following holiday season.

Impressed by What You See?

We build systems like this for businesses ready to invest in real engineering. Let's talk about your project.