Architecture portfolio

Case study

A production platform on a 2-vCPU server

Eighteen public sites and services, including games, everyday tools, a blog, children's apps, analytics and a workflow engine. One person, one small server, under $15 a month, deployed on every push to Git.

1. Context and constraints

DriverWhat it meant for the design
Cost: personal budget, fixedNo per-app or per-request pricing; one host shared well
Operations: one person, often on a phoneFully automated deploys; no manual steps on the server; alerts to the phone
Speed: new apps every few daysA repeatable "golden path": three files and one command to go live with HTTPS
Privacy: families and children as usersLocal-first by default; no third-party trackers; encrypted backups
Security: internet-facing, AI-assisted developmentLeast privilege everywhere, including the AI agent and the CI system
Availability: hobby and early-product appsA single host is acceptable; recovery through Git plus backups, not redundancy

2. System context (C4 level 1)

System context diagram Visitors and the owner use the platform. GitHub holds the code and runs deploys. Let's Encrypt issues certificates. Backups go offsite to a private GitHub repository. Alerts go to Telegram. Visitors phones, tablets, browsers Owner + AI agent code, reviews, decisions The platform 18 sites and services 1 VPS, Docker, Traefik GitHub repos + Actions Let's Encrypt TLS certificates Offsite backups private repo, encrypted Telegram alerts to phone HTTPS git push deploy
Dashed boxes are external systems. The platform pushes nothing to GitHub except encrypted backups, which go to a separate repository with a narrowly scoped token.

3. Containers (C4 level 2)

Container diagram Traefik on ports 443 and 80 routes by hostname to static sites, Node apps that each have a private Postgres, the blog with MySQL, Umami analytics with Postgres, and n8n. A backup container reads every database and writes an encrypted file that n8n copies offsite. VPS: 2 vCPU · 8 GB RAM · Ubuntu 24.04 · Docker Traefik :443 · routes by Host · TLS Static sites × 8 nginx, strict CSP, ~3 MB each tools, kids, home organiser, games hub, app sites, this site Node apps × 6 ~35 MB each, own network multiplayer games, family app, self-discovery tests Shared services Ghost blog (+ MySQL) Umami analytics (+ Postgres) n8n workflows and alerts Postgres 16 × 6 one per app, private network Backup container 02:30 dump all DBs → age-encrypt read 03:15 n8n fetches the encrypted file → offsite
Each app is its own Compose project with its own network. An app's database is reachable only from that app and the backup container, never from Traefik or the internet.

4. Deploy flow: from git push to live

Deploy flow Push to main, GitHub Actions connects with a key locked to one command, deploy-app pulls with a read-only key, resets to main, rebuilds in Docker, and polls HTTPS until it returns 200 or fails the run. git push to main GitHub Actions holds 1 locked key SSH forced cmd deploy-app <app> no shell, no tunnels Fetch + reset read-only key Git always wins Build + run docker compose up --build Health check over real HTTPS HTTP 200 within 60 s, or the run fails (red)
Details and alternatives: ADR 002. Builds happen in Docker, so the host has no language runtimes installed.

5. Measured footprint

A snapshot from 4 December 2026 (docker stats):

ComponentCountRAM eachNotes
Static sites (nginx)83–4 MBIncluding this site
Node apps623–40 MBMultiplayer games, family app, tests
Postgres 16729–37 MBOne per stateful app, plus analytics
Traefik136 MBEdge, TLS, routing
Ghost blog + MySQL 82184 / 444 MBThe heaviest pair, and a candidate for tuning
Umami analytics1234 MBSelf-hosted, cookieless
Backup job112 MBNightly dump and encrypt
n8n1448 MBWorkflows, alerts, offsite backup job
Total27≈ 1.8 GBOf 8 GB; load average about 0.2 on 2 vCPUs

What this shows: right-sizing matters more than raw capacity. Three components (n8n, MySQL, Umami) use about 60% of the memory. If capacity got tight, I'd tune or move those first rather than buy a bigger server.

6. Quality and delivery practices

7. The same platform at bank scale

The design principles carry over unchanged. The implementation changes with the risk and the scale:

ConcernHereIn a bank
Compute1 VPS, ComposeManaged Kubernetes across 2–3 availability zones; a DR region
DeliveryPush → locked SSH → build on hostBuild once, sign, scan; Argo CD pulls; promote the same digest through environments
IdentityPer-app keys, limited sudoWorkload identity (OIDC), PAM for humans, just-in-time access
SecretsEnv files in private repos (a known gap)Vault or a cloud KMS, rotated, never in Git
DataPostgres per app, nightly dumpsManaged DB with point-in-time recovery, cross-region replicas, WORM backups
EdgeTraefik + Let's EncryptWAF, DDoS protection, API gateway, mTLS inside
ObservabilityHealth checks + phone alertsOpenTelemetry, SLOs with error budgets, on-call rota
GovernanceADRs in GitADRs plus architecture review board, risk register, audit evidence