Real-time inventory sync: how to avoid empty shelves in quick commerce?

TL;DR - Quick summary
- Overselling kills retention: selling stock you do not have on the shelf destroys loyalty in 15-minute q-commerce.
- Realtime: we replace heavy CRON sync with event-driven flows and in-memory Redis locks in milliseconds.
- GMI core: NestJS microservices plus MedusaJS v2 keep many carts moving without choking.
- Proof: SFD at 100,000+ downloads, 4.9★, Mobile Trends Awards 2025 nomination.
The problem: they paid, but the avocado just ran out
Quick commerce promises 15-30 minute delivery from a local dark store. The biggest risk is overselling.
Buyer A and B grab the last unit. Legacy stacks (e.g. Magento) update stock only after payment clears - both think they purchased one physical item. Refunds, apology calls, higher ops cost - users uninstall.
GMI Software (Gdańsk, 16+ years) fixes the root cause. Real-time inventory in 2026 is not a gimmick - it protects marketing spend.
CRON vs event-driven - why legacy stacks fail
Classic shops poll ERP (SAP, Comarch, etc.) on a schedule. Q-commerce needs faster feedback:
- CRON: “how many X?” every few minutes - dozens of buyers can still order the same scarce SKU inside that window.
- Event-driven: a WMS scan emits an event, Redis updates memory, the React Native client hears it over WebSockets and disables buy before the tap lands.
How we lock stock in milliseconds (GMI stack)
Cart assembly should not hammer relational databases on every tap:
1. RAM reservations (Redis)
Add-to-cart creates a soft lock in Redis (sub-1 ms). Unpaid carts release inventory after roughly three minutes.
2. Backend (NestJS + MedusaJS v2)
Business rules live in NestJS on Node.js. MedusaJS v2 prices carts without the commission overhead of closed SaaS suites.
3. Client (React Native + Expo)
TypeScript and Expo save roughly 30-40% versus dual native codebases. Persistent sockets keep stock labels live without full-screen reloads.
We ship similar reliability for EMKA Mobile, syncing fleet devices with central systems continuously.
Q-commerce cost and timeline
Platforms that survive concurrent order spikes need deliberate infrastructure.
- MVP: MedusaJS / NestJS backend, Redis reservations and a React Native app typically PLN 160,000-240,000; large B2B builds can reach PLN 250,000-350,000.
- Timeline: production launch usually needs three to six months with an agile GMI squad.
Budget overruns are common - they do not have to be. GMI Software is the only Polish software house pairing a fixed-price guarantee with DDT (Discovery, Design & Technology): we map inventory query architecture before coding and freeze the quote.
Frequently asked questions
- What is overselling in q-commerce apps?
- Selling inventory you no longer hold because storefront and WMS/ERP are out of sync. It drives refunds, support load and churn.
- Why is a plain ecommerce-to-ERP link not enough?
- XML feeds or CRON jobs refresh every few minutes - too slow for quick commerce. You need events, in-memory locks (Redis) and sub-second propagation.
- What does a React Native quick commerce app cost?
- It depends on stock rules; usually PLN 160,000-240,000 for mobile clients plus a MedusaJS backend. We deliver a first estimate within 48 hours at no charge.
- How do WebSockets help mobile commerce?
- Persistent phone-server sockets let the backend push stock changes instead of constant polling, so availability updates feel live.
- For q-commerce should you pick Shopify or MedusaJS?
- MedusaJS v2: full API and code control, no take-rate, no vendor lock-in. Shopify Plus API limits can block aggressive sync across many dark stores.
Content updated: March 31, 2026