runbookify
← All plans
Manufacturing & Production / Raw Material & WIP Inventory

Shelf-Life & Expiry Monitor: Catch Lots Before They Expire

Import a lot-level inventory list, compute days-to-expiry and days-to-retest for every lot, fire tiered alerts (90/30/0 days), and route each approaching lot to a quality or stockroom lead who approves the action — use-first, retest, quarantine, or dispose — before any status change is exported.

BeginnerAn afternoonBuilds onNext.jsSupabaseResend
What you'll build

An internal web tool where you import lot-controlled inventory, see every lot's days-to-expiry and days-to-retest with tiered alerts, get an emailed alert digest of what's coming due, and have a quality or stockroom lead approve the action for each at-risk lot — with FEFO (first-expiry-first-out) ordering and an exported action log — so dated stock never expires unnoticed.

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)
  • A lot-level inventory export you already have (item, lot, qty, expiry and/or retest date, location) as CSV or Google Sheet
  • Claude Code or any AI coding agent

The problem this kills

Somewhere in your stockroom right now there's a drum of adhesive, a pail of resin, a sack of an ingredient, or a tote of a chemical that quietly went past its expiry date last Tuesday. Nobody noticed because nobody was watching the dates — they were watching the quantities. Now it's scrap, or worse, it's about to go into a batch.

Shelf-life-sensitive stock fails in a predictable, avoidable way. Materials carry an expiry date (after which you can't use them) or a retest date (after which you must re-qualify them before use), and those dates sit in a column nobody scans until it's too late. The result is a monthly fire drill: someone finds a near-expiry lot the day before it's needed, scrambles to expedite a replacement, or writes off perfectly good material that just needed a retest two weeks earlier. Auditors ask how you control dated stock and the honest answer is "we eyeball it."

You don't need a six-figure inventory or quality system to fix this. You can build the monitor yourself, this afternoon, and it will watch the dates so your team doesn't have to.

What you'll build

An internal web tool your stockroom leads, quality team, and planners log into. You import your lot-level inventory — item, lot number, quantity, expiry date, retest date, location — from the CSV or Google Sheet you already export. The tool computes days-to-expiry and days-to-retest for every lot and sorts them by urgency, so the soonest-to-expire rises to the top (that's FEFO — first-expiry, first-out — so near-expiry stock gets used first instead of sitting while fresh stock gets picked).

It fires tiered alerts on the thresholds you set — say 90 days, 30 days, and 0 days (expired) — and emails a clean alert digest via Resend so the right people see what's coming due before it bites. For each approaching lot, a quality or stockroom lead reviews it and approves the action: use it first, send it for retest, quarantine it, or dispose of it. Nothing gets marked changed until a person decides. When actions are approved, you export an action log in the exact columns your inventory system expects — so the disposition is recorded and traceable.

What's inside the Implementation Plan

The downloadable plan is a single markdown file you paste into an AI coding agent. It opens by interviewing you about your own plant — how you name items and lots, whether your stock carries hard expiry dates, retest dates, or both, how your lot CSV is actually laid out, your real alert thresholds, your disposition rules (who can quarantine vs. dispose), your typical and peak lot volumes, and your messy edge cases — and then it reads a short spec back for your thumbs-up before it builds anything. That's the difference between a tool shaped to your inventory and a generic template you'd have to fight.

From there it walks the agent through the data model (items, lots, alert tiers, dispositions, the audit trail), the lot importer with a duplicate guard, the days-to-expiry / days-to-retest engine with FEFO ordering, the tiered-alert logic, the emailed digest via Resend, the human approval gate for dispositions, and the action-log export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path: import your lot CSV, export a clean action-log CSV, and you never have to touch your ERP or WMS API to ship.

The governance it includes (this is the point)

In a regulated or quality-driven plant, controlling dated stock is the whole game — and the controls are the product. The plan builds them in: a login so only your team can use it; row-level security so each plant or organization only ever sees its own lots; a complete audit trail of who imported what, who approved which disposition, and exactly when; a hard human-in-the-loop gate so no lot is dispositioned — quarantined, retested, or disposed — until a qualified lead approves it, and only then is the change exported; and a duplicate guard keyed on item + lot so the same lot can't be imported or dispositioned twice. That's the audit story your quality director — and your customer's auditor — actually wants.

Who it's for

Stockroom leads, quality teams, and planners in shelf-life-sensitive plants — food and beverage, pharma, cosmetics, adhesives and coatings, chemicals, anywhere materials carry expiry or retest dates. If you can explain which lots are getting close and who's allowed to scrap them, you can build this — no developer required.

You've got this — open the plan, paste the first prompt, answer a few questions about how your stock actually ages, and you'll watch the tool surface your first at-risk lots by itself.

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.