runbookify
← All plans
Warehouse & Inventory Management / Replenishment & Reorder Points

Stockout Risk Early-Warning

Build an AI-powered watchdog that calculates days-of-supply per SKU and emails you an early-warning list of items about to run out within their lead time - so you reorder before the shelf is empty, not after.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Storage, Auth + RLS)Resend (email alerts)
What you'll build

A logged-in tool that flags SKUs about to stock out within their supplier lead time, lets a planner review and approve the at-risk list, then emails purchasing a clean action list and 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 free Vercel account
  • A free Supabase account
  • A free Resend account
  • A spreadsheet or CSV with on-hand, on-order, and recent sales by SKU

The problem this kills

You find out an item is out of stock the same way your customers do: when someone goes looking for it and it's gone. By then the reorder is already late, the supplier's lead time is ticking, and you're either air-freighting at a premium or telling sales it's a four-week wait.

The information to prevent this already exists in your spreadsheets - on-hand counts, open purchase orders, last few weeks of sales. The trouble is that nobody has time to do the math across hundreds or thousands of SKUs every morning. So the at-risk items hide in plain sight until they tip over.

This plan builds the watchdog that does that math for you, every day, and taps you on the shoulder before the shelf goes empty.

What you'll build

A small internal web app that:

  • Pulls in your on-hand, on-order, and recent sales (from a sheet/CSV today, or your system later).
  • Computes days-of-supply for every SKU from recent velocity and on-hand-plus-on-order.
  • Compares that to each item's supplier lead time and flags anything that will run out before a replenishment can land.
  • Weights the list by margin and strategic importance, so the items that actually matter rise to the top.
  • Shows a planner a clean, ranked at-risk list with recommended actions (expedite, reorder, watch).
  • Waits for a human to review and approve before anything goes out.
  • Emails purchasing and sales/ops a tidy alert plus a CSV action list - and never spams the same SKU twice in the same period.

What's inside the Implementation Plan

The plan is a single markdown file you paste into Claude Code. It does the building; you answer questions and approve.

It opens by interviewing you about your business - your current replenishment process, the systems and spreadsheets you live in, exactly how your SKUs and fields are named, your typical and peak sales volumes, your lead times, and your messy edge cases (seasonal items, kits, multi-warehouse, slow movers). It reflects a short tailored spec back to you and waits for your thumbs-up before it writes a line of code. The result fits your warehouse, not a generic template.

From there it walks step by step through the data model, the days-of-supply calculation, the risk thresholds, the planner review screen, the approval gate, and the Resend alerts - each step ending with a ready-to-paste prompt.

The governance it includes (this is the point)

This isn't a script that fires emails into the void. It's built like an internal tool should be:

  • Login so only your team can use it.
  • Row-level security so each organization only ever sees its own data.
  • A full audit trail - who approved which alert, and when.
  • A human-in-the-loop approval gate - the AI drafts the at-risk list and recommended actions; a planner reviews and approves; only then does anything get sent.
  • Duplicate guards so the same SKU can't trigger the same alert twice in one period (no alert fatigue, no crying wolf).

Who it's for

Demand planners, purchasing/procurement teams, and sales/ops leadership who want to stop firefighting stockouts - especially anyone whose "early-warning system" is currently a person remembering to check a spreadsheet.

You don't need to be a developer. If you can describe how your reordering works and paste a prompt, you can build this.

You've got this - paste the first prompt.

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.