Skip to content

ADR 0004: Postgres per app with a read only bridge

  • Status: Accepted
  • Date: 2026-09-11

Context

The website and portal have different schemas, migration cadences and blast radii. The portal still needs website data (article search stats, advisor conversations) for its insight screens.

Decision

Each app owns its own Postgres database and migrations; nothing shares tables. Where the portal needs website data it connects with a dedicated read only connection (SITE_DATABASE_URL) and never writes.

Consequences

A botched migration in one app cannot corrupt the other. Cross-app writes are forced through explicit APIs (which is where validation and audit live). Duplication of reference data is accepted and tiny.