jakob.s
← Selected Work
Case Study · Client · Healthcare

Clinical Practice Platform

A booking, notes, and billing platform for a live UK clinic, handling special-category health data under UK GDPR Article 9. That compliance bar set the standard for everything else in the build.

NestJSPostgreSQL Next.jsExpo / React Native PrismaOpenAPI Argon2 + TOTP
This is a capability write-up. The source stays private. There is enough here to judge the engineering and nothing you could lift. A deeper walkthrough happens under an NDA.

The job

The clinic ran the whole business by hand, across three or four disconnected tools: bookings in one place, notes in another, invoices in a spreadsheet, and the accounting typed in twice. The brief was to join that into one system that runs the critical path with no manual hand-offs.

book -> note -> invoice -> payment -> accounting

The hard part is not the CRUD. A clinic deals in health records and money at the same time, so two kinds of mistake are unacceptable: a record that leaks, and a number that is silently wrong. Most of the engineering went into making both impossible rather than merely unlikely.

What shaped it

What I built

A TypeScript monorepo: a NestJS API, a Next.js web app, an Expo mobile app, and shared packages for the types, the SDK, and the UI, so the same contract drives every client. The API is described by a single OpenAPI contract, and the typed client the web and mobile apps use is generated from it, so the three can never drift apart quietly.

The money critical path is built and was verified end to end by driving it over HTTP, not just by unit tests: create a client, book an appointment, write an encrypted note, raise a dual-funding invoice, take a payment, with the accounting export sitting behind it.

The parts I am actually proud of

Safety invariants live in the database, not in a hopeful if-statement

The rules that must never break are enforced where application code can't bypass them:

Security that assumes the worst

Passwords hashed with Argon2id. Short-lived access tokens with rotating refresh tokens, and reuse detection that kills a session the moment a stolen token is replayed. Mandatory app-based two-factor for staff, verified end to end. Role-based access checked globally, plus per-record ownership checks, so a valid login still cannot read a record outside its caseload. Clinical notes encrypted per record. Logs run through a redaction allowlist, so patient data never lands in a log line.

The dependency supply chain is a gate, not an afterthought

CI fails the build on any new high-severity dependency advisory. The few accepted exceptions are each written down with the reason they are safe in this codebase and the exact condition that will clear them. This is the boring discipline that stops the overnight breach nobody saw coming, and it's the thing a lot of fast-built apps skip entirely.

Honesty about what "done" means

The system is built and demoed on seeded fake data. It is deliberately held back from real patient data until a short list of deploy-time items is signed off, transport encryption first. Shipping health data before that list is closed would be the exact mistake this whole project exists to avoid, so it waits. Knowing where that line is, and refusing to cross it early, is part of the job.

Outcome

One system that runs the clinic's core workflow with no manual re-keying, built to a compliance bar from the first commit, with the safety and money rules enforced where they cannot quietly fail. The architecture is modular on purpose, so the same hardened core has already seeded a second client build without carrying any of the clinic's data or specifics across.

What stays private: the source, the data model, the encryption and authentication implementation, and anything that would let someone rebuild it. This page describes what it does and the decisions behind it. The rest is an NDA conversation.
← Back to work