Developer DocsDecision records

Decision records

Significant technical decisions are captured as Architecture Decision Records in docs/ADR/. Each records the context, the decision, and its consequences.

#Decision
001Monorepo structure (Turborepo + pnpm workspaces)
002Supabase multi-tenant model (RLS-based isolation)
003Event-driven gamification (rule engine over the event stream)
004TypeScript monorepo config (relative tsconfig extends, no app declarations)
005Nextra v3 docs setup
006Journey automation engine
007Message editors (per-channel)
008Self-hosted push & in-app (VAPID, no vendor)
009Player auth (Supabase auth for the portal)
010Per-brand player identity
011Localization: currency, timezone, language
012ML player scoring
013PAM integration — brand-scoped keys & per-brand configurable mapping

When to write one

Write an ADR when a decision is hard to reverse, affects multiple parts of the system, or a future reader would ask “why is it done this way?” — e.g. a new external dependency, a security model change, a schema pattern, or a build-tooling choice.

Keep the format simple: Context → Decision → Consequences (plus alternatives considered where useful). See ADR-013 for a recent example covering the PAM integration.