Omnichannel Retail with POS and Multi-Warehouse Inventory
Online orders and in-store till sales behind one order model, with stock tracked per warehouse.
Problem
A merchant running both an online store and physical shops had two systems that disagreed. An online sale and a counter sale are the same event to the business and completely different events to the software, which means stock is wrong by the end of every day.
Approach
Unified both channels behind one order model, so a cashier ringing up a walk-in and a customer checking out online produce the same shape of record against the same inventory. Added multi-warehouse stock so each location knows what it actually holds, plus an audit layer over stock movement. This is the second architecture: the first version had no inventory, audit or POS, and the rewrite is what made it a retail system rather than a store.
Outcome
One order model covering both channels, stock accurate per warehouse, and an audit trail behind every movement.
How it's built
One order collection with a channel discriminator rather than parallel online and POS order types. Inventory is per-warehouse, and movements are audited rather than inferred from order history.
One order model with a channel field, not two order types
Reporting, refunds, stock effects and customer history are the same logic regardless of channel. Two order types means writing all of it twice and having the two drift.
A few channel-specific fields are nullable on the shared model, a smaller cost than duplicated business logic.
Per-warehouse inventory instead of a single stock number
A merchant with several shops needs to know where stock is, not only how much exists. A single number cannot answer whether a customer can collect today.
Every stock operation has to specify a location, which makes the API more verbose and the data correct.
Adjacent systems
E-commerce and ERP Backend
GraphQL commerce backend where the client rearranges their own storefront from the dashboard, over an inventory ledger with a single mutation point.
Hardware Retail Platform with ERP Sync
Storefront, app and operations dashboard sitting in front of an external ERP, with data flowing both directions and staying consistent.
Offline-First Pharmacy Platform
A pharmacy management system that keeps selling when the internet drops, then reconciles every till operation exactly once when it returns.