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

PTO Accrual Ledger

Build your own PTO accrual engine that computes time-off earned by your exact policy, applies caps and carryover, deducts approved usage, and produces a defensible, auditable balance per employee - reviewed and approved by HR before anything is published.

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

A login-protected internal tool where HR configures the PTO policy, runs accruals for a pay period, applies caps and carryover, deducts approved usage, reviews and approves the run, and exports an updated balance ledger plus a CSV in your HRIS columns.

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
  • Your written PTO policy (rate, frequency, caps, carryover, tenure tiers)
  • An employee list and approved PTO usage (a spreadsheet is fine)

The problem this kills

PTO balances are the number everyone argues about. HR keeps them in a spreadsheet, payroll keeps a different one, and the employee swears they had three more days. Every accrual policy has a quirk: a cap that stops accrual at some ceiling, a use-it-or-lose-it reset at the year boundary, a tenure tier that bumps the rate after five years, a partial first period for new hires. Doing that math by hand, every pay period, for every employee, guarantees drift - and drift turns into disputes you can't win because there's no record of how a number was reached.

This tool replaces the hand math with an accrual engine that runs your exact policy, keeps an immutable record of every accrual and deduction event, and makes the balance defensible. When someone asks "why is my balance 47.5 hours?", you can show them the line-by-line ledger that produced it.

What you'll build

A small, private web app for your HR and payroll team. You configure your PTO policy once - accrual rate, frequency, caps, carryover rules, tenure tiers. Each pay period you run the accrual: the engine earns time per the policy, applies caps and carryover, deducts approved usage, and flags anything that needs a human eye (a cap hit, a tenure bump, a balance that went negative). HR reviews the run, approves it, and only then are the new balances published and exported as a clean CSV in the exact columns your payroll system or HRIS expects.

What's inside the Implementation Plan

The plan is a single file you paste into Claude Code (a free AI coding assistant that writes and runs the code for you). It walks the AI through building the whole tool step by step, and each step ends with a ready-to-copy prompt.

Crucially, the plan opens by interviewing you about your business - your actual accrual policy, how your pay periods are named, what your HRIS export columns are called, your tenure tiers, your year-boundary rules, and your messy edge cases. It reflects a short tailored spec back to you for a thumbs-up, then shapes the data model, the accrual math, and every later step around your real rules - so you get a tool fitted to your policy, not a generic template you have to fight.

The governance it includes (this is the point)

  • Login so only your team can open the tool.
  • Row-level security so each organization only ever sees its own employees and balances.
  • A complete audit trail - every accrual and deduction is an immutable ledger event recording who ran it, what policy applied, and when.
  • A hard human-in-the-loop approval gate - the engine drafts the accrual run, HR reviews the flagged items, and balances are published and exported only after a person approves.
  • Duplicate guards - the same employee can't be accrued twice for the same period, so a re-run never double-counts.

Who it's for

HR and payroll professionals who maintain PTO balances by hand, dread the year-end carryover scramble, and keep getting pulled into balance disputes they can't easily settle. If you can write down your policy and open a spreadsheet, you can build this.

You've got this - paste the first prompt and let the interview tailor the rest.

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.