Proposal: forecast-based reorder points and shortage allocation ("Replenishment Planner")
Maintainers usually reply within 13 days
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Domain
- analytics, data, full-stack
Research direction
Start by reading the proposal, the linked docs/replenishment.md write-up, and the prototype under app/services/replenishment/. Review the proposed service objects, controller, views, sidebar link, and specs, then seek maintainer decisions on scope and the PR breakdown. Done would mean an agreed feature direction and an approved, testable implementation plan.
Written by the indexing model from the issue text.
Description
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.
- Write-up with the math: https://github.com/arnavt687/human-essentials/blob/main/docs/replenishment.md
- Code: https://github.com/arnavt687/human-essentials/tree/main/app/services/replenishment

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?
- Dominant language
- Ruby
- Stars
- 593
- Forks
- 595
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 25
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rubyforgood/human-essentials
-
Export button on annual report should revert to "Export Report" from "Please Wait..." once report generated.Possibly taken @costajohnt claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
rubyforgood/human-essentials#5691 · 1 comment · 1 assignee ·
Maintainers usually reply within 13 days
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rubyforgood/human-essentials#5603 · 6 comments ·
Maintainers usually reply within 13 days
-
Add link to email samples from the User GuideMay be free again @StephanieFarid claimed this 37 days ago, and no pull request is open. OpenRuby for Good 2026 DC stale
rubyforgood/human-essentials#5694 · 1 comment · 1 assignee ·
Maintainers usually reply within 13 days
-
Add optional phone number to users (esp Partner Users)Possibly taken @costajohnt claimed this 15 days ago. OpenDifficulty—Intermediate Ruby for Good 2026 DC
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rubyforgood/human-essentials#5687 ·
Maintainers usually reply within 13 days
-
Re audit status from "Confirmed" to "Pending"May be free again @ashvarpe claimed this 38 days ago, and no pull request is open. OpenDifficulty—Beginner Ruby for Good 2026 DC
rubyforgood/human-essentials#5683 · 2 comments · 1 assignee ·
Maintainers usually reply within 13 days
All issues in rubyforgood/human-essentials
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
betagouv/conseillers-entreprises#4720 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
zerocracy/judges-action#2692 · 1 comment ·
Maintainers usually reply within 6 days
-
agent:triaged bug bughunt pm:bundler priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
SocketDev/socket-patch#896 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eurosky-social/eu-haul#32 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
e0ipso/self-review#171 ·
Maintainers usually reply within 1 day