Retail & E-commerce Case Study
Scaling a B2B Wholesaler's Inventory System.
We engineered a high-concurrency inventory dashboard syncing 4 warehouses via real-time API integrations, eliminating peak holiday overselling.
Industry
Retail & E-commerce
B2B Wholesale Distributor
Region
United Kingdom
2024
Platform
Next.js, Tailwind, Stripe, REST APIs
6 Months
Services
Project Overview
A leading B2B wholesale distributor supplying hundreds of independent retailers across the UK was experiencing severe growing pains. Their legacy Enterprise Resource Planning (ERP) system, originally built for a much smaller operation, was buckling under the pressure of their rapid expansion. The system would frequently crash during peak holiday ordering seasons, bringing their entire supply chain to a halt.
Key Impact
The Challenge
The most critical issue was inventory synchronization. The company operated out of four separate warehouses, but their legacy system could only process inventory updates in slow, nightly batches. This delay meant their B2B e-commerce portal frequently displayed inaccurate stock levels. During high-traffic periods, customers would place large orders for items that had already sold out hours earlier in a different warehouse, leading to canceled orders, frustrated clients, and significant revenue loss.
The Solution
Cosmonaut Labs architected a modern, event-driven inventory middleware and a lightning-fast B2B ordering portal. Instead of replacing their core ERP immediately—which would have been a multi-year, high-risk project—we built a secure API layer on top of it. This middleware intercepted all orders in real-time, instantly adjusting stock levels across all four warehouses and reflecting those changes immediately on the new Next.js storefront.
Features Delivered
- Real-Time Multi-Warehouse Sync
- Headless B2B E-commerce Portal
- Custom Pricing Tier Logic
- High-Concurrency Order Queuing
- Automated Pick-List Generation
- Legacy ERP API Middleware
Process & Implementation
Infrastructure Auditing
We analyzed the limitations of the legacy ERP and designed a caching strategy (using Redis) to dramatically reduce the load on their core servers.
Middleware Engineering
We developed secure APIs that translated the modern web requests into formats the older ERP could process safely and reliably.
Frontend Replatforming
We built a bespoke, mobile-optimized B2B storefront focused entirely on speed, allowing wholesale buyers to build massive orders without lag.
Stress Testing
Before the critical Q4 holiday rush, we simulated loads of over 10,000 concurrent users to ensure the new architecture would hold up under pressure.
Business Outcomes
The new middleware successfully processed 100% of orders during the peak holiday season with zero downtime.
Overselling was completely eliminated, as stock levels were synchronized across all 4 warehouses in milliseconds.
The faster, more intuitive B2B portal led to a 15% increase in average order value (AOV) from their existing client base.
Warehouse staff dispatch times improved by 40% due to the automated, optimized pick-lists generated by the new system.
“The system Cosmonaut Labs delivered saved our holiday season. For the first time in three years, we didn't have a single system crash or oversold item. They understood the complexities of wholesale retail perfectly.”
Ready to transform your digital systems? Let's build something scalable.
Cosmonaut Labs helps businesses build, launch, and improve digital systems. Get a technical estimate for your project today.
