Hi, I'm Arnav, a developer interested in Ruby for Good's mission. I've built a prototype feature on a fork and would love feedback on whether it's something Human Essentials would want, and how you'd like it broken into PRs.
Problem
Today banks set on_hand_minimum_quantity by hand and LowInventoryQuery flags items below it. That number doesn't update as demand changes, so slow items can have high minimums (cash and shelf space tied up) while fast movers have none (surprise stockouts). There's also no help deciding how to split an item across partners when requests exceed what's on hand.
What the prototype does
- Demand forecast per item: builds a monthly series from the last 24 complete months of distributions (or partner requests). It tries a few simple models (moving average, exponential smoothing, damped-trend Holt, seasonal naive) and picks the one with the lowest out-of-sample error on a rolling backtest.
- Reorder point + suggested order: a standard periodic-review inventory policy. Safety stock scales with forecast error, lead time and a chosen service level (e.g. 95%). Items are flagged "Order now / Reorder / OK", shown next to the bank's existing manual minimum for comparison.
- Shortage allocation: on an item page, if open requests exceed stock, it shows two suggested splits (proportional vs. max-min fair) with fill rates. It's advisory only and never changes requests or distributions.
It's read-only: no migrations, no changes to existing models or inventory events. New code lives in app/services/replenishment/, plus one controller, two views, a sidebar link, and specs.

Proposed PR plan (small pieces)
- Forecasting / reorder / allocation service objects + unit specs (no UI)
- Replenishment page behind a Flipper flag + request specs
- Item detail page with the allocation suggestion
Questions for maintainers
- Is this a direction you'd want in the app? Should it start behind a feature flag?
- Is there a better place in the nav (e.g. under Inventory or Reports)?
- Would any banks be willing to try it and give feedback?
Hi, I'm Arnav, a developer interested in Ruby for Good's mission. I've built a prototype feature on a fork and would love feedback on whether it's something Human Essentials would want, and how you'd like it broken into PRs.
Problem
Today banks set
on_hand_minimum_quantityby hand andLowInventoryQueryflags items below it. That number doesn't update as demand changes, so slow items can have high minimums (cash and shelf space tied up) while fast movers have none (surprise stockouts). There's also no help deciding how to split an item across partners when requests exceed what's on hand.What the prototype does
It's read-only: no migrations, no changes to existing models or inventory events. New code lives in
app/services/replenishment/, plus one controller, two views, a sidebar link, and specs.Proposed PR plan (small pieces)
Questions for maintainers