runbookify
← All plans
Procurement & Purchasing / Inventory Replenishment & Reorder Planning

Stockout-Risk & Days-of-Cover Dashboard: See the Shortage Before It Happens

Turn your on-hand stock, recent usage, supplier lead times, and inbound POs into a days-of-cover dashboard that ranks every item by stockout risk — red, amber, green — so a planner can flag what to expedite before the shelf goes empty, not after.

BeginnerAn afternoonBuilds onNext.jsSupabaseResend
What you'll build

A logged-in tool where you import on-hand stock, usage history, lead times, and inbound POs; the agent computes average daily usage and days-of-cover against lead time, ranks every item red/amber/green by stockout risk and impact, a planner reviews the at-risk list and flags items for an expedite or emergency reorder, critical items go out in an alert email, and the whole thing exports to CSV.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A Supabase account (free)
  • A Vercel account (free)
  • A Resend account (free)
  • Exports of your current on-hand stock, recent usage/consumption history, supplier lead times, and open POs / inbound (CSV is fine)
  • Claude Code or any AI coding agent

The problem this kills

By the time a stockout shows up in your numbers, it's already cost you. The line stopped, the order shipped short, the customer called. And the maddening part is that almost every stockout was predictable: you had the on-hand quantity, you knew roughly how fast the item moves, and you knew how long the supplier takes to deliver. The shortage was sitting in plain sight in three different places — nobody put them together in time.

Most planners react instead of anticipate. They find out an item is empty when someone needs it, then scramble to expedite at a premium, pay for air freight, or apologize to a customer. The "early warning" is a gut feeling and a spreadsheet that only one person knows how to read — and it doesn't account for the truck that's already on the way, or the fact that one critical item running out hurts a hundred times more than a cheap consumable.

The math that prevents this is simple: how many days of cover do I have, and is that less than how long it takes to get more? If on-hand divided by daily usage is smaller than the supplier's lead time, you will run out before a normal reorder can save you. That single comparison, run across every item and ranked by urgency and impact, turns firefighting into a short, calm, prioritized worklist.

What you'll build

A simple internal web app for your planning and buying team. You import your current on-hand stock, your recent usage/consumption history, your supplier lead times, and your open POs / inbound deliveries. The tool computes each item's average daily usage (over an averaging window you choose, so lumpy and seasonal demand don't whipsaw the result), divides on-hand by that to get days-of-cover, and compares it to the lead time — crediting any inbound PO that will land in time and extend your cover.

Every item gets a red / amber / green stockout-risk rating and an impact score (criticality and value), so the list sorts the genuinely dangerous shortages to the top. A planner opens the at-risk list, sees exactly which items will run dry before a replacement can arrive, and flags the ones that need an expedite or emergency reorder. Only the planner's approved items become an action; the dashboard informs, the planner decides. Critical items go out in an alert email, and the whole list exports to CSV for whatever you do next.

What's inside the Implementation Plan

The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — how you replenish today, what system holds your stock and POs, the exact column names and SKU conventions in your exports, how spiky or seasonal your demand is, how you'd define a "critical" item, and the messy exceptions (new items with no history, items on backorder, multiple warehouses, units that don't match). It reflects a short tailored spec back to you and gets your thumbs-up before it builds anything — so the dashboard fits how your inventory actually behaves, not a generic textbook formula.

From there it walks the agent through the data model, the four imports, the average-daily-usage engine with a configurable averaging window, the days-of-cover-vs-lead-time calculation that accounts for inbound POs, the red/amber/green ranking weighted by impact, the planner review-and-flag gate, the critical-item alert email, and the CSV export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path that uses Google Sheet / CSV imports as the data source and produces a clean CSV export — so you can build and run the whole thing this afternoon, no matter what ERP or WMS you're on.

The governance it includes (this is the point)

This tool decides where money and effort go, so the controls aren't optional. The plan builds in login so only your team can use it, row-level security so you only ever see your own organization's inventory, a complete audit trail of who flagged which item and who triggered which alert, a hard human-in-the-loop gate so no expedite or emergency reorder is "actioned" until a planner reviews the at-risk list and approves it — the dashboard never auto-orders — and duplicate guards keyed on SKU so the same item can't produce two conflicting risk records in one refresh.

Who it's for

Inventory planners, buyers, replenishment analysts, and operations leads — anyone who keeps finding out about stockouts after they happen and wants to see them coming instead. If you can export your on-hand, your recent usage, and your supplier lead times, and you can tell the difference between a critical part and a cheap consumable, you can build this.

You've got this — start with the plan, paste the first prompt, and answer the interview. You'll have your first ranked at-risk list on screen before the afternoon's out.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.