For a small pharmacy chain, the product should answer three questions:
Staff record a receipt, a sale, or a reviewed stock count. Managers review specific transfer/order proposals. Statistical details belong in Reports, behind an expandable section.
| Layer | Implementation | What it is useful for |
|---|---|---|
| Stock records | Append-only events, integer quantities, transactional balances, lot status, expiry, reservations, transit, actor/source history and idempotent writes | A reliable stock position to base decisions on; retries do not duplicate sales or receipts |
| Sales trends | Actual sale events grouped into complete business days and 8 weekly periods; location comparison and last-7 versus prior-7 totals | See recorded sales direction without mistaking a forecast for history |
| Product demand | Weekday-adjusted 56-day average (shrinks to a plain average for slow sellers), an annual-seasonal variant, and Croston/SBA for intermittent items; chosen on eight earlier windows, scored on an untouched 28-day holdout against a moving-average baseline | Weekday shape without overfitting; accuracy evidence not inflated by selection |
| Uncertainty | Poisson or negative-binomial distributions with dispersion fitted to past forecast errors; holdout coverage compared with the model’s own expected coverage | Represent a range of plausible demand rather than a single exact answer |
| Stock policy | Order-up-to level for lead time plus a weekly review at a 95% service level, including lead-time variability; configured safety stock is a floor | Safety stock grows with volatility and supplier unreliability instead of being a flat number |
| Supplier lead times | Configured prior blended with observed approval-to-receipt times | Planning learns from real deliveries |
| Shortage and expiry risk | 500 sampled demand/lead-time paths with a persistent per-path demand level, consuming lots by earliest expiry and tracking inbound stock and lot expiration | Estimate shortage probability, unmet units and expiry waste under stated assumptions |
| Transfer and purchase planning | SciPy/HiGHS mixed-integer optimization for lot quantities, purchase packs and supplier orders across any number of locations; shortages weighted by selling price; fixed handling cost per transfer | Compare feasible actions under stock, safety stock, expiry, capacity, supplier minimum, shipping and budget constraints |
| Business summary | Sales, gross margin, stock value, turns, days of supply, dead/restricted stock, in-stock rate, shrinkage, ABC classes, supplier lead times, suggestion acceptance | The owner-level picture the forecasts serve |
| Execution | Approved suggestion creates a draft; transfer approval reserves stock, dispatch removes source stock, receiving adds destination stock | Keep recommendations separate from consequential operations |
No generative model is making inventory decisions. The image adapter extracts candidate physical counts; staff must verify them. The messy-image demo uses a labeled fixture adapter, not proven handwriting recognition.
The old overview showed a forward forecast, not recorded historical sales. Moving-average and Croston methods return a constant expected daily rate. Their uncertainty band describes variation around that rate. A flat expected line does not mean every day has identical demand.
The revised home screen shows historical weekly sales from the event ledger. Reports separately shows product sales history and the future demand estimate. It does not invent an upward trend to make the chart look more impressive.
This is a functioning statistical and operations-research prototype. The most useful engineering work is integrating trustworthy stock accounting, forecast uncertainty, constraints and approval workflows. The component algorithms are established methods, not a novel model or demonstrated competitive moat.
Important limits:
We are building inventory decision software for small pharmacy chains. It turns day-to-day sales and stock records into specific transfer and reorder decisions across locations. Staff keep a simple workflow, and owners can see the reason, quantity and cost behind each proposal before approving it.
The demonstration is concrete: one location is short, another has stock, and Polea proposes a feasible lot-specific transfer while preserving source stock. Approval and receipt then update the ledger. Show that loop, rather than leading with model names.
The stronger long-term thesis is that easy operational data capture and trustworthy execution can make inventory planning practical for businesses that currently depend on fragmented records. This is a hypothesis to validate with customers, not a proven moat.
Run a real, supervised pilot and measure:
Do not pitch money saved until the pilot measures it. The goal is a simple product with measurable operational value; algorithm count alone is not the proof.
Brand reference: poleadbs.com and its public stylesheet. The app now uses the site’s black #0a0a0a, cream #faf8f3, gold #d3af37, DM Sans body type and Fraunces headings. The logo mark is the SVG already served on the public homepage. Both brand placements have a data-logo-slot attribute for replacing that treatment later.