From an inherited, half-built codebase to £296K/month
TL;DR — I inherited a half-working, outsourced multi-repo codebase for a live UK online pharmacy and, over five months as the lead engineer, turned it into a stable, compliant platform. Revenue grew from £176K to £296K per month (+68%) with zero production outages after a major release, ~240 shipped tickets, and a codebase a team could actually be grown onto.
(Client anonymized for confidentiality. Metrics are real; happy to walk through specifics privately.)
The situation
The founder had a real, growing business — prescription weight-loss via a GPhC-registered prescriber — but the software had been built by an outsourced team and handed over in rough shape:
- A multi-repo stack (Node.js/Express backend, Nuxt 3 patient frontend, React admin) that mostly worked but was fragile.
- A Stripe checkout that silently failed on mobile Safari, producing duplicate/stuck orders.
- Admin tooling that couldn’t keep up with a solo prescriber and a small dispensing team.
- A real regulatory gap: a non-prescriber role was being recorded as the prescriber on the statutory register.
The founder is not an engineer. He needed someone senior who could own the whole thing — not just write code, but decide what to fix first, keep the business live while doing it, and treat compliance as non-negotiable.
What I did (5 months, ~240 tickets)
Stabilise the money path. Rebuilt order-init to be idempotent, fixing the Safari retry bug that was creating up to four stuck orders from a single patient. Integrated Stripe Payment Element alongside the legacy provider with a clean multi-provider toggle.
Close the compliance gaps. Fixed prescriber attribution across the register, prescription PDFs and approvals so only a true prescriber role is ever recorded — a real regulatory-integrity fix. Added role-gated access to clinical data and audit trails.
Rebuild the operating platform. Shipped the clinical/admin workflows the team actually needed: cross-order clinical “red flag” notes, lock-anywhere order claiming, hybrid dispatch-date logic (working days + UK bank holidays), multi-select filters, and a Royal Mail bulk-shipping rewrite.
Make it team-ready. Introduced a phased delivery pipeline, 608+ backend tests plus per-feature end-to-end suites, migration-safety patterns, runbooks, and architecture decision records (ADRs) documenting every major decision — so the next engineers could onboard without archaeology.
The outcome
| Metric | Result |
|---|---|
| Monthly revenue | £176K → £296K (+68%) in 5 months |
| Production outages after major release | 0 |
| Tickets shipped | ~240 (~48/month) |
| Automated tests | 608+ backend + per-feature e2e |
| Signup → paid conversion | 58.8% |
| Repeat-buyer rate | 44.3% |
Stack
Node.js · Express · Sequelize · MySQL · Nuxt 3 / Vue 3 · React · Stripe · Royal Mail API · AWS (EKS, RDS, S3, SES, CloudFront) · Sentry · GitHub Actions
Why it matters if you’re a founder
Most “it kind of works” codebases from agencies are one incident away from a bad week — a failed checkout, a compliance miss, a release that takes the site down. The value here wasn’t heroics; it was triage, stabilisation, and building the boring foundations — tests, runbooks, decision records — that let a business grow without breaking.