Overtime Alert & Pre-Approval
Build an internal tool that projects each employee's hours against your overtime thresholds during the pay period, warns managers before overtime is incurred, and requires manager pre-approval for planned OT - so labor cost stops being a payroll surprise.
A login-protected overtime tool: load hours-to-date plus the remaining schedule, project each employee against your daily/weekly OT thresholds, flag who's about to cross over, let managers pre-approve or deny planned overtime, flag any unapproved OT at period end for sign-off, and export an approved-OT CSV for payroll - with a hard rule that planned OT is never authorized without a manager's approval.
Before you start
- A free Vercel account
- A free Supabase account
- A free Resend account (and a sender address you can use)
- An hours-to-date CSV (employee, hours so far this period)
- Your overtime rules (daily/weekly thresholds, by jurisdiction)
- A schedule of remaining shifts for the period (CSV)
The problem this kills
Overtime is almost never a decision. It's a thing you discover - on the payroll run, two days too late to do anything about it. Someone picked up an extra shift, three people ran long on a busy Friday, and suddenly the period's labor cost is over budget and nobody approved a minute of it.
By the time OT shows up on a timesheet, the money is already spent. The hours are worked, the law says you pay them, and the conversation becomes "why did this happen?" instead of "should we let this happen?" Managers want to control overtime, but they're flying blind until it's too late - they can't see that Marcus is on track to hit 38 hours by Thursday with two shifts still to go, or that the part-timer is about to cross a daily threshold in a state that counts daily OT.
This tool moves the decision to before the hours are worked. It does the math your timesheet system won't do until period end - projecting everyone's hours forward against your thresholds - and it puts a manager in the loop while there's still time to swap a shift, send someone home, or knowingly approve the cost.
What you'll build
A small internal web app, just for your team, that:
- Imports hours-to-date for each employee (from a timesheet export, punches, or a Google Sheet).
- Imports the schedule of remaining shifts for the rest of the pay period.
- Applies your overtime rules - daily and/or weekly thresholds, which can differ by jurisdiction (state/province) or employee group.
- Projects each employee's total hours and tells you who is at risk of crossing a threshold before the period ends - and by how much.
- Alerts the right manager early, via Resend, while there's still time to act.
- Requires a manager to pre-approve or deny planned overtime - nothing is authorized without a human decision.
- At period end, flags any unapproved overtime that actually occurred, for review and sign-off before it hits payroll.
- Dedupes on employee + pay period so the same OT authorization can't be entered twice.
- Exports an approved-OT CSV in the exact columns your payroll system expects, plus a complete decision log.
A note up front: this tool applies the overtime rules you configure - it is not legal or wage-law advice. You tell it your thresholds and jurisdictions; it does the arithmetic and the routing.
What's inside the Implementation Plan
The plan is a single markdown file you paste into Claude Code (a free AI coding agent). It walks the agent through building the whole tool, step by step, each step ending with a ready-to-paste prompt.
The most important part: the plan opens by interviewing you about your business. Before it writes a single line, the agent asks how your pay period works, what your daily and weekly OT thresholds are and where they differ by jurisdiction, the real field names in your timesheet export, how shifts are scheduled, your typical and peak hours, who approves overtime for whom, and your messy edge cases (multiple jurisdictions, salaried-vs-hourly, shift swaps, holiday pay). It reads a short tailored spec back to you, you confirm it, and only then does it build - so you get a tool shaped to your time-and-attendance reality, not a generic template you have to bend to fit.
Inside you'll find:
- The discovery interview and how the agent turns your answers into the data model and the projection math.
- The full build: database, login, CSV imports with duplicate guards, the projection/threshold engine, the at-risk dashboard, the pre-approval flow, the email alerts, and the period-end unapproved-OT sweep.
- The hard human approval gate so planned OT is never authorized automatically.
- Verification steps so you can prove it works, and the CSV-export fallback so it's fully usable even before you connect it to your payroll system.
The governance it includes (this is the point)
This isn't a toy. The plan builds in the controls an HR/payroll team actually needs:
- Login so only your team can see or touch anything.
- Row-level security so people only see their own organization's employees and hours.
- A complete audit trail - every projection alert, approval, denial, reassignment, and period-end flag is logged with who and when.
- A hard human-in-the-loop gate - the AI projects and warns, but a real manager must approve or deny planned overtime; nothing is ever auto-authorized.
- Unapproved-OT review - any overtime that occurred without pre-approval is flagged and must be signed off before it can be exported to payroll.
- Duplicate guards - employee + pay period keys an authorization so the same OT can't be approved or exported twice.
Who it's for
Operations managers, shift supervisors, and HR/payroll folks who keep getting blindsided by overtime at period end - and who want a real, auditable way to see it coming and decide on it in advance, without hiring a developer or buying a heavyweight workforce-management platform. You don't need to write code. You need your hours-to-date export, your schedule, your OT rules, and an afternoon.
You've got this - paste the first prompt and let the agent interview you.