Nº 01 — SaaS platform on Kubernetes
Dimension
A SaaS platform for brands and agencies selling on TikTok Shop: several Next.js apps, a typed API and background workers, deployed on a Kubernetes cluster.
Nº 01 — Diagram
- Year
- 2025
- Role
- Full-stack & AI engineer, freelance
- Stack
- Next.jsTypeScripttRPCPostgreSQLPrismaBullMQRedisKubernetesTerraformOpenTelemetry
01Context
A platform that keeps shops, affiliates and campaigns in sync around the clock: a lot of background processing, several interfaces, and a team that ships several times a day.
02What I built
- End-to-end features in the Next.js apps (brands, affiliates, onboarding) and their tRPC routers.
- BullMQ workers for synchronizations and long-running jobs.
- Moved the monorepo to Bun and Oxlint, and split it into packages by layer and domain, with dependency rules checked in CI.
- Docker images built from two shared templates, and deployed to Kubernetes by GitHub Actions.
03Technical decisions
- A Kubernetes cluster (k3s) described in Terraform: nodes, networking and cluster add-ons are versioned like code.
- One source of truth for deploys: each service declares its image, its Kustomize manifests and its smoke tests, and CI only rebuilds what changed.
- OpenTelemetry traces to Grafana Tempo, with the same dashboards locally and in production.