A AtlasWiki Engineering
/ Architecture overview
Saved ✓
MKDZ
Engineering handbook

Architecture overview

How the fleet is shaped, why each product is isolated, and where AI agents are allowed to touch.

MKDZ
Marta K. and 2 othersUpdated Jul 12, 20268 min read

Every service in the fleet follows one rule: it must be explainable on a whiteboard in ninety seconds. If the diagram needs an apology, the design is not done. This page is the ninety-second version, written down.

The shape of the system

Traffic enters through a single reverse proxy that terminates TLS and applies the fleet-wide middleware stack: security headers, rate limits, and auth gates. Behind it, each product runs as an isolated compose stack with its own database. Nothing shares a datastore, so the blast radius of any failure is exactly one product.

i
Rule of oneOne repo, one stack, one database per product. Cross-product reads go through APIs, never through shared tables.

The data plane

Databases run with row-level security enabled from the first migration. The application role cannot read across tenants even if a WHERE clause is forgotten; isolation is the database's job, not the code reviewer's.

policy.sqlSQL
-- tenant isolation, enforced by Postgres itself
CREATE POLICY tenant_isolation ON documents
  USING (tenant_id = current_setting('app.tenant')::uuid);

Failure domains

Each product's blast radius is itself. A crash auto-restarts in seconds; a database issue touches one product's data and restores from a nightly snapshot; only the shared proxy can take the whole fleet down, so every change to it is rehearsed on staging first.

DomainBlast radiusRecovery
Single product crashthat product onlyauto-restart < 10s
Database corruptionone product's datasnapshot · 11 min RTO
Proxy failurewhole fleetwatchdog · drilled monthly
!
The proxy is the one shared componentTreat every change to it as production surgery: staged, reviewed, and rehearsed on the staging entrypoint first.

Where AI agents fit

Agents write migrations, tests and doc drafts. They do not hold production credentials and cannot merge. Every agent-written line passes the same review gate as a human's, and the incident runbook applies to agent-caused incidents identically.

Was this page helpful?
🔍esc