
A real-time B2B pharmaceutical inventory platform connecting pharmacies and distributors with live stock, automated reorder thresholds, dual dashboards, and a full audit trail.
A pharmaceutical distributor was running its entire inventory on phone calls and memory. Stock levels lived in someone's head, reorders happened when a pharmacy phoned in a panic, and stockouts were a weekly occurrence. There was no visibility into demand patterns across the network and no single record of who ordered what - the business was scaling on goodwill and recall, both of which have hard limits.
We built a real-time B2B procurement platform in eight weeks. Pharmacies check live stock, place orders, and set automated reorder thresholds without a single phone call. Distributors get a unified dashboard showing demand across the entire network, low-stock alerts, and a complete order audit trail. The stack is built on Next.js with tRPC for fully type-safe end-to-end APIs and Prisma over PostgreSQL for reliable relational data, so every layer is predictable and maintainable as the network grows.
Where the stock counts diverge
Pharmaceutical distribution fails at the gap between what the system says is in the warehouse and what is actually on the shelf. We traced every point where those two numbers could drift and built the brief around closing them.
Real-time, with an audit trail
Inventory movements are events, not overwrites. Recording them that way means the current count is derived rather than asserted, so a discrepancy can be traced to the exact movement that caused it instead of being silently corrected.
Rolled out warehouse by warehouse
We ran the new system alongside the existing process at one site until the numbers agreed for a full cycle, then expanded. Parallel running costs a few weeks and removes the risk of discovering a modelling error after the old system is gone.
Real-time stock sync
Live inventory across the network replaces phone-call-and-memory tracking, so everyone sees the same numbers at the same time.
Automated reorder thresholds
Pharmacies set thresholds once and the system flags reorders automatically, ending the weekly cycle of panic calls and surprise stockouts.
Dual dashboards
Distinct distributor and pharmacy dashboards give each side exactly the view it needs - network-wide demand for the distributor, ordering and stock for the pharmacy.
Demand analytics
Aggregated demand patterns across the network turn a previously invisible signal into something the distributor can actually plan around.
Full audit trail
Every order is recorded end to end, creating a single source of truth that replaces fragmented memory and informal messages.
Type-safe foundation
tRPC and Prisma deliver fully type-safe APIs over PostgreSQL, keeping the platform reliable and easy to extend as more pharmacies join.
Project FAQ
About this
build
Common questions about how we approached and shipped M.P. Solutions.
It replaced a phone-call-and-memory inventory process that caused weekly stockouts. Pharmacies now see live stock and reorder automatically, and the distributor finally has visibility into demand across the whole network.
Let's ship something like this.
M.P. Solutions went from concept to production in 2 months. Tell us what you're building and we'll scope exactly how we'd ship it.