
03 / 04
Recruitment
Case study
Recruitment · First Choice Recruitment Services
Role: Led end-to-end development
NestJS 11Prisma 6PostgreSQLNext.js 15React 19Formik/YupTanStack Query/TableReact PDFTwilioSendinblueCloudflare WorkersDocker
Problem
A UK recruitment agency needed a single integrated system covering the full pipeline: public application form → applicant processing → staff onboarding → timesheet management → shift scheduling → automated invoicing. They had four separate spreadsheets and an inbox.
Your scope
I led the build end to end: the NestJS backend, three Next.js frontends, all integrations, deployment, and the PDF document pipeline.
System architecture
Four interconnected applications sharing one backend:
- NestJS backend - all business logic, multi-step form state, file uploads, document generation, third-party communications.
- Recruiter dashboard (Next.js) - pipeline view, applicant→staff conversion, timesheet review, invoice generation.
- Public application form (Next.js, deployed to Cloudflare Workers) - multi-step, resumable, with file uploads.
- Staff submission portal (Next.js) - timesheet submission, document upload.
Key decisions
- One unified REST API with role-based access, rather than three separate backends per frontend. Reduces drift; the recruiter dashboard and staff portal see different slices of the same data, not duplicated systems.
- Multi-step form as a state machine with server-side validation at each step and draft persistence, rather than a wizard with client-side-only state. Applicants can leave and return; recruiters can audit partial submissions.
- PDF generation as a typed pipeline (
data → React PDF components → rendered documents) rather than HTML-to-PDF rendering. Layout becomes reviewable as React; no print-CSS surprises. - Public form on Cloudflare Workers, dashboards on standard Vercel. Public form needs edge latency and aggressive rate-limiting; dashboards don't.
Engineering challenges
- Keeping state and data consistency across four separate applications sharing one backend.
- Handling a complex multi-step form with file uploads, server-side validation, and resumable drafts.
- Generating compliant employment documents (PDFs) from dynamic data with correct formatting and bulk export.
- Managing applicant-to-staff conversion workflows with document verification gates.
Solutions
- Unified REST API with role-based access control: each frontend consumes a subset of endpoints based on the authenticated user's role.
- Multi-step form state machine with server-side validation at each step + draft persistence so applicants can resume from any point.
- PDF generation pipeline: structured data → React PDF components → rendered documents with ZIP archival for bulk download.
- Automated invoicing and timesheet calculation engine driving recurring payments without manual intervention.
What I'd change
Stack
- Backend - NestJS 11, Prisma 6, PostgreSQL, Passport.js/JWT
- Frontends - Next.js 15, React 19, TypeScript, Formik/Yup, TanStack Query/Table
- Documents -
@react-pdf/renderer, PDF.js, XLSX, JSZip - External services - Twilio SMS, Sendinblue email, Cloudflare Workers, Docker