StaffDock
Right to work and staff document compliance for UK businesses
- Role
- Full-Stack Software Engineer, led the build and ongoing development (via SETS Tech)
- Dates
- Sep 2026 – Present
- Status
- Live · Ongoing development
In short
UK companies were tracking staff right to work documents in spreadsheets and email, and finding out too late when something had expired. I led the build of StaffDock, one place where people upload their documents, the company records each check, and the system tracks every date and builds the evidence. It went live in October 2026 and 20 UK companies joined in the first month.
Project phases
- Initial build (Sep – Oct 2026, via SETS Tech): product plan, NestJS API and Next.js app, the person and supplier portals, evidence packs and billing, then launch on staffdock.co.uk.
- Ongoing development (Oct 2026 – Present, via SETS Tech): I continue to maintain and develop the live product.
The problem
Most small businesses track their staff's work documents in spreadsheets and email. They often find out too late that something has expired. They needed one simple place to collect documents, record checks properly, track every date and show the evidence quickly if the Home Office asks.
Before
- Spreadsheets
- Email threads
- Paper files
- Expiry found too late
- No evidence pack
After
- One place per person
- Checks recorded with evidence
- Reminders at 60 · 30 · 7 days
- Cleared-to-work lists by team
- One-click inspection pack
The stakes went up on 1 October 2026. From that date, the Home Office Right to Work Scheme also covers people engaged on a worker's contract, individual sub-contractors and people found through online matching services, for work that starts on or after that date, with new duties for businesses in a chain of contracts (code of practice, GOV.UK). Employees were already covered. The civil penalty is up to £45,000 per illegal worker for a first breach and £60,000 for a repeat, amounts that have applied since February 2024.
What I built
StaffDock is one online system many companies use, each with their own private space. A company chooses the documents it needs. Right to work is built in, with ready-made sets for care, security, cleaning, construction, recruitment and hospitality. The company adds its people one by one or imports a spreadsheet.
Each person uploads their documents from their phone, signing in with a code sent by email. The company's team checks each document on GOV.UK or by holding the original, and records the result. StaffDock then shows who is cleared to work, team by team, and chases renewals.
When evidence is needed, it produces one evidence document per person or a full inspection pack. Agencies and subcontractors that supply workers get their own portal.
My role
I led the architecture and build through SETS Tech. I turned the new UK right to work rules into a detailed product plan, designed how the data is organised, and built the core of the system: the website, the areas for workers and suppliers, and the platform owner's admin panel. In-house and freelance developers and designers worked with me on design work and larger tasks. I wrote the legal pages with the client and put StaffDock live on its server.
Since launch in October 2026, I have continued to lead StaffDock's development and maintenance through SETS Tech. StaffDock belongs to the company, not to me.
Results
- 20 UK companies onboarded in the first month
- 60 · 30 · 7 days before expiry: each reminder sent once
- 0 changes or deletions allowed to a saved check record
Live since October 2026 on staffdock.co.uk, a SETS Tech product, with 20 UK companies onboarded in the first month. It is free for up to 2 users, with Starter, Growth and Pro plans above that. Companies collect documents, record checks, see who is cleared to work and download an inspection pack in one place, under the right to work rules that took effect on 1 October 2026.
Companies using it have told us that checks which used to mean digging through paper and spreadsheets now take minutes. That is customer feedback, not a measured study. StaffDock helps a company carry out and record its checks; it does not make a business compliant on its own, and each company stays responsible for its own checks.
I continue to develop StaffDock through SETS Tech. Staff management (human resources) features are planned next.
Key features
- Quick sign-up confirmed with an email code, and a setup guide that suggests document types for your industry.
- People list with spreadsheet import, five types of person, a way to mark someone as left, and a page for each person with their documents, details and history.
- Phone-friendly area for each person: a to-do list, document upload and replacement, and three right to work routes (share code, original documents, Home Office application).
- Review screen with the document beside the record form, one-click Check on GOV.UK, and a choice to mark it Verified or ask for a new upload with a reason.
- Follow-up checks for time-limited permission to work, and for Positive Verification Notices, which only a new check can clear.
- Dashboard with a compliance score for each team, a to-do list ordered by urgency, counters and a 6-month chart.
- Cleared to work lists by team with plain-English reasons, a Starting soon list, printable lists and team QR codes.
- Automatic expiry reminders, chasers for unanswered invites, weekly summaries for admins and monthly summaries for directors.
- Supplier area for agencies and subcontractors: their workers, uploads, yearly assurance, contracts with the required terms, substitutions and audit requests.
- Worker status records, compliance reports, fair-check records, an activity log and a personal data export.
- Every stored file is encrypted and only shown to someone with permission. Criminal record check files can be deleted once they have been checked.
- Starter, Growth and Pro plans paid by card through Stripe or by bank transfer approved by the platform owner, with invoices and a read-only mode when a plan ends.
- Platform owner's admin panel for payments, plans, website text, email settings, complaints and the sign-up funnel.
How it’s built
Approach
Planned from a product spec and PRD that turned the October 2026 right to work changes into five kinds of user, the document workflow, statuses, suppliers, billing and data protection. Built in stages: first the NestJS API and Next.js app (document types, people, the person portal, the review screen and the right to work rules); then the supplier portal, reminders, Cleared to work, evidence PDFs and inspection packs, Stripe and bank-transfer billing and the Super Admin panel; then go-live on staffdock.co.uk with plans, legal pages and an illustrated system guide.
Technical work
- Turned the new UK right to work rules into a product spec and PRD: five kinds of user, the document workflow, statuses, suppliers, billing and data protection.
- Designed the multi-tenant data model and built the NestJS API, the Next.js app, the person and supplier portals and the Super Admin panel.
- Built the review screen and the right to work rules for online, manual and Employer Checking Service checks, with server-enforced required ticks and evidence.
- Built reminders, the compliance dashboard, Cleared to work lists, evidence PDFs and inspection packs as BullMQ background jobs.
- Built plans and billing with Stripe card payments and approved bank transfers, wrote the legal pages with the client and deployed StaffDock to the VPS.
Architecture
One NestJS API decides everything. The Next.js app only displays.
StaffDock architecture diagram.
- The Next.js app (company dashboard, person portal, supplier portal and Super Admin) sends every request to the NestJS API.
- The NestJS API denies every route by default, checks roles on every request and scopes every query to one company.
- The API stores data in PostgreSQL, where triggers make check records append-only.
- Alongside the API: Redis and BullMQ workers for reminders, imports and evidence PDFs; encrypted file storage with AES-256-GCM per file; Stripe for plans and card payments; and transactional email for sign-in codes and reminders.
- Every route is denied by default, and roles are checked on every request.
- Every query is scoped to one company, so one company can never read another's data. Super Admin cannot see tenant documents or any company's people.
- Admins sign in with an argon2id password plus a 6-digit email code. People and supplier contacts use email codes only, with separate code types and rotating refresh cookies.
- Every stored file is encrypted with AES-256-GCM and served only after a permission check. Share codes, dates of birth and reference numbers are encrypted separately. DBS files can be deleted after they are checked.
- Reminders, imports and PDFs run as BullMQ background jobs, so no web request waits for them.
Key decisions and trade-offs
1. Tenancy enforced in the API, on every query Chose: one shared database, with every query scoped to one company inside the NestJS API. Not: a separate database (or PostgreSQL schema) per company, or PostgreSQL row-level security. Why: one schema and one migration path for every company, on a shared server. Automated tests check that one company can never read another's data, and that Super Admin can't see tenant documents. Downside: isolation depends on every query carrying the company filter. The database won't stop a query that forgets it, so the tests have to.
2. Append-only records in the database Chose: database triggers that refuse edits and deletes on saved checks, presence, assurance, contract and status records, invoices and the activity log. Not: soft deletes plus an audit table written by application code. Why: a saved check is evidence. The database itself refuses to change it, even after a bug or a manual SQL session. Downside: a genuine mistake can't be edited. It has to be corrected with a new record, and migrations on those tables must work around the triggers.
Check record flow diagram.
- The person uploads a document from their phone.
- It goes to the review queue, where the company’s team checks it.
- The team either asks for a new upload, with a reason, which sends the person back to upload again,
- or marks it Verified, which the API allows only when every server-enforced tick and evidence file is in place.
- A Verified record is append-only: it can’t be edited or deleted. A follow-up check creates a new record that supersedes it.
3. Right to work rules enforced on the server Chose: Verified can't be saved until every required tick, field and evidence file is in place, checked by the API. Late checks are labelled. Not: a free-form check record that the company fills in as it likes. Why: the record has to hold up if the Home Office asks. Downside: when Home Office guidance changes, the rules change in code and need a release, not a setting.
4. Statuses worked out, never typed in Chose: statuses calculated live from uploads and checks. Not: a stored status column, updated by background jobs as dates pass. Why: who is cleared to work always follows the real documents and checks. No job can leave a status out of date. Downside: lists and dashboards work the status out on every read, which costs more queries than reading one column.
5. Slow work on a queue Chose: BullMQ jobs for reminders, imports and PDFs. Not: scheduled scripts run by cron on the server. Why: the web request only adds the job and returns. The work runs in the background, one job at a time where it needs to. Downside: Redis and the worker are two more things to keep running. If the worker stops, reminders and PDFs wait.
Testing and quality
Automated tests (Vitest) cover the tenant rules, including that Super Admin cannot see tenant documents or any company's people.
389 tests pass in CI.
Stack
- TypeScript
- Next.js 16
- React 19
- NestJS 12
- PostgreSQL
- Prisma 7
- Redis
- BullMQ
- Tailwind CSS 4
- shadcn/ui
- Zod
- Stripe
- pdf-lib
- Argon2id
- Vitest
Development timeline
- Spec & design
Turned the October 2026 right to work changes into a PRD: five kinds of user, the document workflow, statuses, suppliers, billing and data protection. - Build
Built the NestJS API and Next.js app: document types, people, the person portal, the review screen and the right to work rules. - Suppliers, billing & evidence
Added the supplier portal, reminders, Cleared to work, evidence PDFs and inspection packs, Stripe and bank-transfer billing, and the Super Admin panel. - Live
Went live on staffdock.co.uk in October 2026 with plans, legal pages and an illustrated system guide. - Oct 2026 – Present — Ongoing development
Continue to maintain and develop the live product through SETS Tech.
