StaffPortal
A complete open-source staff management platform. Attendance, timesheets, leave, expenses with AI receipt scanning, kiosk sign-in, visitor management, announcements, analytics. Built with Next.js 16 and Supabase. Self-host or deploy to Vercel in minutes.
Why this exists
BambooHR, Personio, Hibob, and the rest charge between £8 and £15 per employee per month. For a 30-person business that is between £2,800 and £5,400 a year, every year, for software that mostly tracks who is in, who is on holiday, and who claimed lunch on expenses.
The actual code that does that is not complex. It is a Postgres schema, some forms, an approval workflow, a tablet kiosk view, and an OCR pipeline for receipts. It fits in a Next.js application. The reason businesses pay rather than build is that nobody has open-sourced a credible alternative — until now.
StaffPortal is that credible alternative. Built and used in production. MIT licensed. Self-host on Vercel for under £20 per month total. Bring your own Supabase project. Bring your own Resend domain. Pay for software once — by deploying it — not every month for every employee.
Built-in features
Everything below is in the box. No add-ons, no paid tiers, no per-seat upgrades.
Attendance & timesheets
Clock in, clock out, automated overtime calculation, timesheet approvals. Per-employee schedules with break deductions. Manager-side bulk approve and exception flags.
Leave management
Annual, sick, parental, unpaid. Per-employee allowances accrue automatically. Approval flows with manager override. Team calendar view with conflict detection.
AI-OCR expenses
Upload a receipt photo, structured data extracted by Claude vision. Vendor, line items, totals, tax, currency. Approval workflow with policy checks. Receipt Scanner is embedded directly.
Kiosk sign-in mode
Mount a tablet at the entrance. Touch-first UI with PIN authentication. Photo capture on sign-in. Works offline with sync-on-reconnect. Configurable per-site.
Visitor management
Pre-register expected visitors. On arrival, photo, ID scan, NDA acknowledgement, host notification via email and Slack. Audit trail per visit. Watchlist support.
Announcements
Company-wide announcements with read receipts. Targeted to teams or individuals. Acknowledgement-required posts for policy updates and compliance.
Analytics dashboard
Attendance heatmap, leave balances, expense trends, overtime by team. Real-time SQL views over the live database. Exportable to CSV for payroll.
Notifications
Email via Resend, Slack via incoming webhooks, in-app toast. Per-user preferences. Quiet hours and weekend suppression.
Row-level security throughout
Every table enforces per-user and per-tenant isolation at PostgreSQL. Even if route logic has a bug, cross-tenant reads return zero rows. Service-role access is server-only.
Payroll-ready exports
Monthly export of approved timesheets, leave taken, and expenses claimed. CSV format compatible with Xero, QuickBooks, Sage. HMRC P11D fields where applicable.
Tech stack
Architecture sketch
One Next.js app. One Supabase project. Eight cohesive modules sharing the same auth, RLS, and notification primitives.
┌──────────────────────────── BROWSER LAYER ──────────────────┐
│ Web (employees, managers, admins) · Kiosk (tablets) │
└─────────────────────────────────────────────────────────────┘
│ Supabase auth (cookie)
▼
┌──────────────────────────── NEXT.JS APP ────────────────────┐
│ /api/attendance /api/leave /api/expenses │
│ /api/kiosk /api/visitors /api/announcements │
│ /api/analytics /api/notify │
│ │
│ shared lib: │
│ auth · rls · permissions · notify · audit · scanner │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Supabase │ │ Resend │ │ Anthropic │
│ Postgres + │ │ email API │ │ Vision OCR │
│ Auth + RLS │ │ │ │ │
│ + Storage │ │ │ │ │
└──────────────┘ └──────────────┘ └──────────────┘Quick start
From clone to first staff member created in under twenty minutes.
git clone https://github.com/sarmakska/staff-portal.git cd staff-portal pnpm install cp .env.example .env.local # Fill in Supabase URL, anon key, service role, # Resend API key, Anthropic key (for OCR) pnpm db:migrate # creates 40+ tables, RLS policies, seeds pnpm dev
Visit http://localhost:3000, sign up the first user (becomes admin), invite the team.
Use cases
Who actually runs this in production.
Growing agencies & studios
15 to 50 person teams who have outgrown spreadsheets but cannot justify £15/user/month for BambooHR or Personio. Self-host on Vercel for under £20/month total.
Manufacturing & warehouses
On-site staff use the kiosk tablet to clock in. Office staff use the web. One database, one source of truth, no double entry.
Charities & non-profits
Donor-funded organisations cannot afford per-seat HR SaaS. MIT licensed self-host means £0 software cost for unlimited employees.
Co-ops & member-owned firms
Worker co-operatives need transparent, auditable HR data. Open source means every member can read the code that runs the rota.
Use it. Fork it. Self-host it.
MIT licensed. No per-seat charges. No vendor lock-in. No surprise upgrades to "Enterprise". Pull requests welcome — payroll integrations, additional locales, and reporting dashboards are all open issues.