Case study · 04
Hexproof
A one-person web studio, and the monorepo and VPS every site runs on.

- 1Dockerfile builds every site
- 1VPS runs the sites, booking, mail, analytics and API
- 0public ports for the deploy dashboard
- 1registry file drives deploys and the portfolio
The problem
I build bespoke sites for small local businesses. Each one should look like it was made for that business, but I don’t want a separate codebase, host and set of subscriptions per client, and I want the hosting to be something I can secure and look after myself.
Hexproof’s own site had to prove the approach: built and deployed exactly like a client site, with prices published and a Work page that can’t show a client who hasn’t agreed to it.
Architecture
One npm-workspaces monorepo holds every site, a shared kit and the infrastructure. Each site fills in a typed config contract that the kit’s components render against, but owns its own layouts and design. Every site builds through the same Dockerfile into a small nginx image, and Coolify on a single hardened VPS deploys them behind Traefik with automatic HTTPS.
Frontend
- A shared kit (@hexproof/site-kit) for SEO, schema.org data, the booking embed, the motion system and the nail configurator. Each site aliases its own typed config into the kit at build time, so kit components render against whichever site is building.
- The rule is to move something into the kit only when a second site needs it, then make it config-driven, so no site ends up looking like a template.
- The motion system wires Lenis and GSAP to data attributes (reveal, parallax, horizontal scroll, magnetic buttons, an optional lazy-loaded WebGL hero) and respects reduced motion everywhere.
- Hexproof’s Work page and case studies are generated at build time from the deploy registry, and only show a site once the client’s consent date is recorded.
Infrastructure
- One multi-stage Dockerfile for every site: install only that site’s workspace, build it, copy the output into nginx:stable-alpine with shared security headers and a health check. A build argument switches a staging deploy to noindex.
- A bootstrap script hardens a fresh Ubuntu VPS: unattended security upgrades, key-only SSH, ufw allowing only 22/80/443, fail2ban and swap, then installs Coolify.
- Coolify’s dashboard has no DNS record and no public port. Its ports are dropped at the provider’s edge firewall and in the DOCKER-USER chain (Docker-published ports bypass ufw). Day-to-day access is over Tailscale.
- GitHub Actions type-checks, unit-tests and builds every workspace on each push. Deploys stay manual, and the repo is connected with a read-only deploy key because there’s no inbound webhook.
- Shared services on the same box: a self-hosted calendar for bookings, the mail service, the pack simulator’s API and cookieless analytics.
- A scaffold script creates a new client site and registers it, and the registry is kept in step with Coolify.
Interesting problems
01
A private control plane
The simplest way to deploy is a public dashboard with a GitHub webhook. Keeping the dashboard off the internet means no webhooks, so GitHub is connected by a read-only deploy key and deploys are a button pressed over Tailscale. It’s a deliberate trade of convenience for a much smaller attack surface.
02
Bespoke without forking
Shared code wants to make every site look the same. The kit only holds behaviour (SEO, booking, motion, the configurator) behind a typed config contract, and each site owns its layouts, theme and copy.
03
Header inheritance
nginx doesn’t inherit add_header into a block that sets its own headers, so any location that adds a caching header would silently drop every security header. The headers live in one snippet that every location includes, and the Dockerfile copies it somewhere nginx won’t also load it as a config of its own.
Outcome
Four sites live from one repo, plus booking, email, analytics and a game API on one VPS, with a repeatable path for adding the next client.