Low-Stock / Overstock Alert Engine
Build an alert engine where the right person gets an email the moment a SKU crosses a low or high stock threshold - with a manager approval gate before any reorder or transfer.
A configurable alert engine where planners and buyers subscribe to SKUs, categories, or locations and get a targeted email the instant on-hand crosses a low or high threshold - with rate-limited alerts, a human approval gate, and a CSV action log.
Before you start
- A free Vercel account
- A free Supabase account
- A free Resend account
- An on-hand inventory export (CSV or Google Sheet) - no live API required
The problem this kills
Nobody can watch an inventory dashboard all day. So the way you find out you're about to stock out is when a customer order can't ship - or when a buyer notices the gap a week too late. Meanwhile the opposite problem piles up quietly: overstock sitting in a corner of the warehouse, tying up cash, that nobody flagged because nobody was looking.
The truth is that the dashboard is the wrong tool. You don't want to go look for problems. You want the problem to come find the one person who can fix it, the moment it crosses the line - and not a second later, and not forty times in a row.
This plan builds exactly that: an alert engine that watches your on-hand numbers for you and emails the right person when a SKU drops too low or climbs too high.
What you'll build
A small web app, built entirely by an AI coding agent, that:
- Lets planners, buyers, and managers subscribe to the SKUs, categories, or locations they own.
- Stores a low threshold and a high threshold per subscription (catch stockouts and overstock).
- Takes an on-hand refresh - a CSV upload or Google Sheet import, so it works today with no API.
- Detects the moment a number crosses a threshold and emails a targeted alert through Resend.
- Rate-limits repeat alerts with a per-SKU cooldown, so an item bouncing around its threshold doesn't spam anyone.
- Attaches a recommended action to each alert (reorder, transfer, mark down) that a person must approve before anything happens.
- Writes a clean CSV action log you can hand straight to your purchasing or WMS system.
What's inside the Implementation Plan
The plan is a single file you paste into Claude Code. It walks the AI agent through the whole build, step by step, and every step ends with a ready-to-copy prompt.
The most important part: the plan opens by interviewing you about your business. Before it writes a single line of code, the agent asks how you track on-hand today, what your SKU and location codes look like, your typical and peak data volumes, who owns which thresholds, and the messy exceptions (kits, multi-warehouse, units of measure). It reflects a short tailored spec back to you, you give it a thumbs-up, and only then does it build - so you get a tool shaped around your warehouse, not a generic template you have to bend to fit.
From there it builds the database, login, subscription screens, the on-hand import, the crossing-detection logic, the email alerts, the approval gate, and the CSV export - in an order a non-coder can follow and verify as they go.
The governance it includes (this is the point)
This isn't a script that quietly fires off reorders. Governance is built in from the start:
- Login so only your team can use the tool.
- Row-level security so each person only sees their own organization's data.
- A complete audit trail - who changed a threshold, who approved an action, and when.
- A hard human-in-the-loop approval gate - the engine recommends, a person approves, and only an approved action lands in the action log.
- Duplicate guards so the same crossing event can't be processed or alerted twice.
Who it's for
Planners, buyers, category managers, and store managers who own stock levels but can't sit on a dashboard - and who want to be the first to know about a stockout or a pile of overstock, not the last.
You've got this. Make the folder, paste the first prompt, and let the agent interview you.