CareScot
Next.js 16, React 19, tRPC, Prisma, PostgreSQL, AWS
- What
- A multi-tenant SaaS platform for care-at-home providers in Scotland, built to support Care Inspectorate registration and inspection. One system to plan, deliver and evidence regulated care — service-user records, care packages, visit scheduling and rota, and medication administration (MAR) with safeguards like no self-witnessing and audited void/amend paths.
- How
- Next.js 16 (App Router) and React 19 over tRPC 11, with Prisma 7 + PostgreSQL 16 and NextAuth v5 (TOTP MFA). Strict per-organisation isolation and role-based access are enforced server-side, and sensitive fields — names, CHI numbers, health details, free text — are encrypted at the application layer. Privacy by design throughout: personal data is never logged, audit diffs redact sensitive values, and error monitoring is scrubbed of PII.
- Compliance
- Incident and safeguarding management fires automatic Care Inspectorate notifications when criteria are met; workforce compliance (PVG, SSSC/NMC, training) blocks assigning staff without valid registration on the day; plus finance (funders, rate cards, invoicing) and governance — an append-only audit trail, SAR export, and gated erasure with 6-year clinical retention.
- Infrastructure
- AWS in the UK (eu-west-2) — ECS Fargate, RDS, S3, SES, EventBridge — behind a WAF with rate limiting, deployed via CI/CD (lint → typecheck → unit → e2e → deploy).