runbookify
← All plans
Logistics & Transportation / Demurrage, Detention & Accessorial Charges

Container Demurrage & Per-Diem Tracker: Beat the Last Free Day

Track every import container against its last free day and return-by date, get countdown alerts before the clock runs out, and let a coordinator approve the pickup/return priority before anyone dispatches.

IntermediateA weekendBuilds onNext.jsSupabaseResend
What you'll build

A web tool where you load your open containers, it computes each last free day and return-by countdown, flags the at-risk ones with an accrued-charge estimate, a coordinator reviews and approves the prioritized pickup/return actions, and it exports a dispatch action list plus an exposure report.

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 CSV of your open containers (vessel, discharge date, last free day, return-by, status)
  • Claude Code or any AI coding agent

The problem this kills

A vessel discharges, the clock starts, and the meter is running whether you're watching it or not. Miss a container's last free day at the port and demurrage charges pile up by the day. Hang on to the empty too long off-dock and the steamship line bills you per-diem detention. Both are pure penalty money — no freight moved, no value added — and they're some of the largest avoidable costs in import logistics.

The maddening part is that nobody decides to pay these charges. They happen because the dates live in twenty emails, three carrier portals, and a spreadsheet that's already a day stale. By the time someone notices a container is "getting close," it's already accruing. What import and drayage coordinators actually need is dead simple: every open container in one place, a countdown to the day that matters, and a loud flag before the charge starts — not after. You do not need to be a developer to build that.

What you'll build

A simple internal web tool for your drayage desk. You load your open containers — vessel, discharge date, last free day, return-by date, and current status. The tool computes a countdown for each one (days to the last free day at port, and days to return the empty before per-diem hits), classifies each container into on-track / due-soon / at-risk / accruing, and estimates the charges already running or about to start using your carrier's daily rates. The at-risk containers float to the top of a prioritized list. Your coordinator reviews that list, sets the pickup/return priority, and approves the dispatch plan — and only then does the tool export the action list for the drivers and an exposure report of accrued and projected charges. The whole thing keeps demurrage (at the port) and per-diem (off-dock) cleanly separated, because they have different clocks and different rates.

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 containers flow from arrival to empty return today, which carriers and terminals you work with, how you receive last-free-day notices, the exact fields and naming in your container data, your free-day allowances and daily charge rates, your typical and peak container counts, and the messy edge cases (weekend free days, terminal closures, holds, chassis shortages). It reads a short spec back to you for a thumbs-up, then builds the tool around your answers instead of a generic template. From there it walks the agent through the data model, the CSV import, the last-free-day and return-by math, the risk classification and charge estimate, the review-and-approve screen, the human dispatch gate, and the action-list and exposure-report exports. Every step ends with a ready-to-copy prompt.

The governance it includes (this is the point)

This isn't a toy. The plan builds in the controls a real logistics operation needs: login so only your team can use it, row-level security so people only see their own organization's containers, a complete audit trail of every priority change and approval (who, what, when, and why), a hard human-approval gate so no dispatch list goes out until a coordinator signs off on the priority, and duplicate guards keyed on the container number so the same container can't be loaded or dispatched twice. The tool raises the alarm and does the math; a person makes the call on what moves first.

Who it's for

Import and drayage coordinators, supply-chain and logistics managers, and anyone who owns the job of getting containers off the dock and empties back before the carrier's clock costs you money. If you can describe how your free days and return rules work, you can build this.

You've got this — open the plan, paste the first prompt, and you'll be counting down your real containers this weekend.

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.