Architecture#

How the service is structured and why. Roughly ordered C4-style — start at the top for the big picture and zoom in.

Doc

When you need it

Architecture style

Hexagonal layout, layer rules, why we picked this pattern

System context

The app and its external neighbours (LLM provider, Presidio, Postgres, callers)

Components

Ports, adapters, the orchestrator, the composition root

Cross-cutting concerns

Anonymisation, tracking, error handling, logging — concerns that span layers

Data model

Domain models and persistence schema

For decision history (why we chose what we chose), see the architecture decision records.