Skip to content

All projects

2019 to Now · Production · B2B platform

Investcare Vet

A production platform for a UK distributor of veterinary diagnostic reagents: a public site in six locales, an API, an admin CMS and all of the infrastructure.

  • Next.js 16
  • FSD
  • NestJS 11
  • Prisma 7
  • PostgreSQL
  • Docker
  • GitLab CI/CD
  • Terraform
  • Ansible
  • Cloudflare
locales without an i18n library
6
changes and destroys in the imported plan
0
steps to resolve a locale, English last
4
Hetzner CPX32 behind one nginx
1

What I walked into

A UK distributor of veterinary diagnostic reagents selling across six languages, where a missing translation could not leave a hole on the page.

The infrastructure had been provisioned by hand before I took it over.


What I changed, and why

  1. Locales without a library

    Locales live on app/[locale]; proxy.ts resolves the cookie, then Accept-Language, then Cloudflare’s CF-IPCountry, then falls back to English.

  2. Content with a fallback built in

    Database content is typed LocalizedText and resolved with an English fallback, so a missing translation never leaves a hole on the page.

  3. One request, three effects

    POST /feedback validates a class-validator DTO, writes a Lead row and fires a Telegram message inside one request.

  4. Geography from the edge

    City, country and IP are derived server-side from Cloudflare headers, so the browser only sends screen size and locale.

  5. Built by hand, then imported

    I imported the live server, firewall and DNS records into Terraform and drove the plan down to zero changes and zero destroys.

A missing translation never leaves a hole on the page.

Where it landed

The platform runs as containers on one Hetzner CPX32 behind a single server_name-routing nginx, and the site speaks six locales without an i18n library.

The infrastructure that had been built by hand now lives in Terraform and Ansible, with the plan at zero changes and zero destroys.