# ADR-0005: In-memory default adapters

# Context

We had two goals that pull in opposite directions. The reference implementation needs to boot and pass the full test suite on a fresh clone — no Docker, no Postgres, no Valkey, just bun install && bun test. At the same time it has to be a credible starting point for a real production deployment, not a toy that gets thrown away the moment someone gets serious.

# Decision

Ship in-memory repositories, an in-memory event bus, and an in-memory delivery journal as the default adapters. They implement the same application/ports.ts interfaces as any future Postgres / Valkey backing. Production adapters plug in via composition-root.ts without touching application code.

The in-memory adapters are not stubs and not test doubles. They're real implementations of the port contract — they just happen to keep state in RAM.

# Consequences

The wins:

The risk worth managing:

# What else we considered