cd ../case-studies

// case study 03

From a Lovable MVP to a compliant, UK-hosted healthcare platform

Healthcare UK data residency Self-hosted Supabase 6+ months support
20 → 3 min per deployment, down from more than 20 minutes
100% UK hosted, with no US-headquartered providers
0 forced plan upgrades as usage and data grow
1 month to identify and resolve the key issues

The situation

A UK healthcare client arrived with an MVP built in Lovable: React and Node.js on managed Supabase (PostgreSQL). Compliance required the platform to be hosted in the UK and not run on a US-headquartered provider. As usage and data grew, the managed plan needed upgrading every 2–3 months. Deployments were manual: a developer would SSH in, pull the code and restart PM2.

What changed

compliant hosting

Moved the platform onto a dedicated Ubuntu server in the UK, provided by the client, and self-hosted Supabase there, so the data stays in the UK and off US-headquartered providers.

supabase migration

Migrated Docker to Docker, with access restricted to developers only. Configured the chat and other modules on the self-hosted stack and aligned the row-level security (RLS) policies so data access rules carried over exactly.

rebuilt the managed extras

Everything managed Supabase includes on paid plans, such as backups, monitoring, SSL and security hardening, rebuilt as scripts and Make recipes that run both on demand and automatically.

automated deployments

Replaced SSH, pull and restart with a GitHub Actions pipeline, so nobody logs into the server to ship code.

deploy.log

When a single deploy took 20 minutes

[problem]

As the codebase grew, each deployment took more than 20 minutes, which slowed every fix and release.

[diagnosis]

I traced the time to the pipeline repeating work on every run that it didn't need to do.

[fix]

Reworked the pipeline so that work only happens when something actually changes.

[result]

Deployments dropped from more than 20 minutes to about 3.

Results

  • Hosted entirely in the UK, meeting the client's compliance requirement
  • Faster API responses and page loads than on the managed setup
  • No more plan upgrades every 2–3 months, saving that recurring monthly cost
  • Deployments down from 20+ minutes to about 3, with no manual server access
  • Key issues identified and resolved within the first month, followed by 6+ months of ongoing support

Stack

Lovable Supabase (self-hosted) PostgreSQL Node.js React PM2 Docker Ubuntu GitHub Actions Bash Make

Client details are anonymized to protect confidentiality.

Taking your MVP to production?

Let's talk it through. 30 minutes, free.

Book your free 30-min call