kubernetes.mdRomânăGet a quote
Back to the blog

How we built a multi-tenant SaaS platform on self-hosted open-source infrastructure

  • use case
  • SaaS
  • Kubernetes
  • SRE
  • self-hosted
  • Go

This article describes a real, ongoing project delivered for the owner of a B2B SaaS email deliverability platform in Moldova and Romania. The client is anonymized. The team includes backend, frontend and DevOps engineers with full-stack coverage. The platform started from scratch (greenfield) and keeps growing.

Project goals

  • Design and build a multi-tenant SaaS platform from scratch: architecture, backend and frontend, in one continuous engagement.
  • Run entirely on self-hosted, open-source infrastructure, with no vendor lock-in and full control over cost and data.
  • SRE practices from day one: observability, SLO-based alerting and incident runbooks, not bolted on later.
  • Complete technical documentation (C4 diagrams and ADRs), for long-term maintainability, not just working code.

Application architecture

The platform uses a microservices architecture, with three backend services written in Go: the delivery engine, billing/CRM and campaign management. The frontend is a Next.js/React dashboard plus a public landing page, both bilingual (EN/RO).

A native CRM is integrated directly into billing, with no third-party CRM dependency.

Tenant isolation

Strict data isolation between customers is verified with dedicated tests written for every route (cross-tenant tests). Across all backend services there are more than 600 automated tests, confirmed independently at every change.

Infrastructure

The platform runs on Docker Compose and on an HA Kubernetes cluster with a 3-node control plane, ready for CloudNativePG. Components include PostgreSQL ×3, RabbitMQ and Keycloak, all self-hosted.

DNS management is automated: SPF, DKIM and DMARC records are updated dynamically through TSIG-signed updates.

SRE and observability

  • SLO-based alerting, using error-budget burn rate.
  • An incident runbook built from real incidents.
  • An in-house, Prometheus-compatible metrics package, plus Loki for logs and automatic log-based error classification.

Self-hosted AI

A self-hosted LLM (Ollama) powers an AI sales chat and classifies incoming replies, with zero external API cost. The team also explored MCP-style tool calling, for secure, tenant-scoped data access from the chat.

The stack at a glance

LayerTechnologies
BackendGo (3 services)
FrontendNext.js, React
Data and messagingPostgreSQL, RabbitMQ
IdentityKeycloak
OrchestrationHA Kubernetes, Docker Compose
ObservabilityPrometheus-compatible metrics, Loki
AIOllama

Working model

The feature list keeps growing: the team is actively building new functionality on this platform, rather than wrapping up a delivery and moving on. The model is one team, embedded long-term, evolving the product as the client's needs grow.

Want infrastructure like this?

Tell us what you run today and get a fixed-price quote within 24 business hours.

Get a quote in 24 hours

Related articles

Tell us what infrastructure you run today

You get a fixed-price quote within 24 business hours. No obligation: the quote is yours whatever you decide.

Get a quote in 24 hours

For partnerships, enterprise integrations or platform onboarding inquiries.

Offices

Iuliu Maniu St., no. 32, office 15, Brașov, Romania
Nicolae Testemițanu St., 3/2, Chișinău, Moldova

Phone

+40 730 664 273 (Romania)
+373 60 63 82 82 (Moldova)

LinkedIn

LinkedIn