
Planner: rotas, time off and approvals in one web application
A mobile-first web application that brings shift planning, leave requests, approvals, the team calendar and reporting into one system.
Teams that run 24/7 shifts and office hours side by side needed one place for rotas, leave and approvals. Planner calculates what each day off really costs based on the rota, follows the org chart for approvals, and shows in real time who is working, who is away and where coverage is thin.
Shifts were planned in Excel sheets while leave was tracked separately. In a 24/7 team a day off is measured by the shift: what matters is whether the person was scheduled that day, weekends and public holidays included. The same Friday to Monday span can use 4 days or 2, depending on the rota.
Approvals depend on who reports to whom, who leads the team and who steps in when the approver is away. Without a clear rule, requests reach the wrong person or sit unanswered.
On the operations side, coverage gaps surfaced late, and at month end accounting waited for a clean summary of days worked, leave, and night and weekend hours.
We modeled the real rules as tested code. The engines for leave days, balances, approvers and coverage are pure functions covered by automated tests, while the data layer only loads and saves their results. Day counting can follow the rota or the working week, per team, with half days, public holidays per country and carry-over with an expiry date.
The application is built on Next.js 16 with React 19 and strict TypeScript, backed by PostgreSQL 16 and Prisma. Server actions validate input with Zod, check permissions, and only then write the change, the notification, the queued email and the audit entry in a single transaction. Concurrency is handled with per-person and per-team locks and a version check when a rota is published, so simultaneous edits stay safe.
Every screen is designed for the phone first, at 390 px, with a bottom tab bar, bottom sheets and day agendas, while desktop adds the rota planner and the month wall chart. The application runs on an Ubuntu server in AWS behind an Apache reverse proxy, supervised by systemd, with nightly backups and a release script that takes a backup before every version.
- 1
Discover
We mapped the real shifts (day, evening, night, EU and US hours, on-call), the leave types, the approval chain and the formulas in the existing Excel sheets.
- 2
Model the rules
Day counting, balances, approvers and coverage became pure, tested functions, separate from the interface and the database.
- 3
Built for the phone
Every screen has a phone-native form: day agenda, bottom sheets, a leave type picker with balances. Desktop adds the planner and the month wall chart.
- 4
Import and roll out
Excel import with a dry run, email invitations, in-app and email notifications, Microsoft Teams messages and a calendar subscription for Outlook, Google and Apple.
- 5
Operate
Nightly backups managed from the app, an audit trail, a health probe and controlled releases on the server.
- Shift-aware leavein a 24/7 team a day costs leave only when the person was on shift, weekends and holidays included; office teams count weekdays minus public holidays. The request form shows the cost live with a day-by-day breakdown
- The “On shift now” cardthe home screen shows the current or next shift with a countdown, the leave balance, quick actions and the next 7 days
- Approvals that follow the org chartthe person someone reports to, team leads, then managers; stand-ins when an approver is away, bulk approve, day adjustments with an audited note, and clash badges showing who else is out
- Team calendara month wall chart on desktop with bars by type and approved or pending days, a month grid with a day agenda on mobile; colleagues show as “Out of office” when the leave type is private; 4, 6 and 12-month views
- Rota planneredits staged locally and published once, version checking, brush painting and keyboard shortcuts, coverage rows that turn red below the minimum, hours and night hours per person, leave conflicts, repeatable patterns and planning up to 12 months ahead
- Shift swapsswaps and give-aways between colleagues with colleague and lead approval, plus availability rules that appear right in the grid
- Fairness viewnights, weekends and public holidays worked per person, with markers for values above or below the team average
- Balancesper leave type, with carry-over, expiry and a year-end close with preview, pro-rated first years and half days
- Sick reportingone tap, auto-approved with the lead informed; proof documents uploaded securely and leave forms generated as PDF
- Overtimewith approval, paid or taken as time off in lieu, with a time-off-in-lieu balance
- Notifications and integrationsin-app and email through a retrying outbox, Microsoft Teams messages and a daily “who is out today” digest, plus a calendar subscription (.ics) for Outlook, Google and Apple
- Reports and exportsa print-ready attendance sheet, balances, leave taken, shift extras with premium hours and team capacity
- Payroll summarya supporting feature with days worked, leave and night and weekend hours, correctable and previewed before it goes to accounting, with sensitive identifiers stored encrypted
- Security and operationsargon2id passwords, database-backed sessions with real sign-out, lockout after failed attempts, a CSP policy, an audit trail and nightly backups
- roles, each with its own visibility and approval rules
- 0
- preconfigured leave types, including statutory leave
- 0
- reports exportable to Excel and CSV: leave, balances, attendance, shift extras and capacity
- 0
- automated test files for rules and permissions
- 0
- settings sections for admins: policy, rota, email, Teams, payroll, backups and more
- 0







