runbookify
← All plans
Payroll & Timekeeping / PTO, Leave & Absence

PTO Request & Approval

Build an internal tool where employees request time off, the system checks their balance and shows the manager who else is already off, routes for one-click approval, then exports approved leave to payroll - so deductions and pay come out right.

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

Employees request PTO, the tool checks their balance and shows coverage conflicts, a manager approves or denies with full context, balances update automatically, and approved time off exports as a payroll-ready 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 Supabase account
  • A free Vercel account
  • A free Resend account (for approval emails)
  • Your current PTO balances in a Google Sheet or CSV
  • Claude Code installed on a Linux machine

The problem this kills

Right now, PTO probably lives in your inbox. Someone emails "Can I take next Thursday and Friday?" and you - the manager or HR lead - have to go hunting. How much vacation do they have left? Is anyone else on the team already off those days? Did we already approve this for them? You answer from memory, reply "approved," and hope payroll catches the deduction.

That process leaks in every direction. Balances drift out of sync with reality. Two people get approved for the same week and the desk goes uncovered. Someone takes more than they've earned and nobody notices until year-end. And every approval is a one-off email with no record of who decided what, or when.

This plan replaces the email thread with a real tool - one that knows the balances, sees the calendar, and refuses to let anything reach payroll without a human signing off.

What you'll build

A small, private web app for your team:

  • Employees request time off - pick dates (full or partial days), a leave type (vacation, sick, personal, whatever you use), and submit.
  • The tool checks the balance instantly - and flags any request that would push someone negative instead of silently allowing it.
  • Managers see the full picture before deciding - the requester's remaining balance and a coverage view showing who else on the team is already off those days.
  • One-click approve or deny - the human gate. Nothing moves until a person decides.
  • Balances update automatically on approval, and the approved leave drops onto a shared team calendar.
  • Payroll gets a clean CSV - approved time off exported in exactly the columns your payroll system expects.

What's inside the Implementation Plan

The plan is a single file you paste into Claude Code (an AI coding agent). It builds the whole tool with you, step by step, and every step ends with a ready-to-copy prompt.

Most importantly, it starts by interviewing you about your business - your leave types, how you accrue and track balances, your approval chain, your blackout dates, and the messy exceptions that never fit a generic template. It reads a short tailored spec back to you, waits for your thumbs-up, and only then starts building. You get a tool shaped around how your team actually works, not a one-size-fits-all form.

Inside you'll find:

  • The full discovery interview (8-12 questions tuned to PTO and payroll).
  • A data model for employees, balances, requests, and an audit log.
  • Balance checks, partial-day handling, multiple leave types, and blackout-date rules.
  • A duplicate guard so the same person can't be processed twice for the same dates.
  • The manager approval screen with the coverage view.
  • The payroll CSV export - and a "No API yet?" fallback that reads balances from a Google Sheet so you can ship today, with zero integration work.

The governance it includes (this is the point)

This isn't a toy form - it's built like an internal tool HR can actually trust:

  • Login so only your team can get in.
  • Row-level security so people see only their own organization's data - employees see their own requests, managers see their team.
  • A complete audit trail - who requested, who approved or denied, and exactly when.
  • A hard human-in-the-loop gate - the tool checks balances and drafts the outcome, but nothing is deducted or sent to payroll until a manager approves.
  • Duplicate guards - the same employee and date range can't slip through twice.
  • Over-balance flagging - requests that exceed earned time are surfaced loudly, never quietly approved.

Who it's for

Managers and HR teams who approve PTO by email and have no easy way to see balances or coverage conflicts. If you're tired of guessing whether someone has the days, whether the team will be covered, and whether payroll got the memo - this is for you. You don't need to be a developer.

You've got this - paste the first prompt and let the agent interview you.

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.