Skip to content

Architecture Decision Records

This document records the major architecture decisions for the Functorium framework. Each decision follows the MADR v4.0 template, structuring the context, alternatives considered, rationale for the chosen option, and expected consequences.

When architecture decisions are scattered across code and commit messages, it becomes increasingly difficult to trace “why was this done this way?” over time. ADRs preserve the context at the time of each decision, allowing new team members to quickly understand the rationale when joining or when revisiting existing decisions.

StatusDescription
acceptedAdopted and currently in effect
proposedProposed but not yet agreed upon
deprecatedNo longer valid
supersededReplaced by a newer ADR
NumberTitleStatus
ADR-0001Foundation - Represent Failures with Fin Types Instead of Exceptionsaccepted
ADR-0002Foundation - Adopt LanguageExt as the Functional Base Libraryaccepted
ADR-0003Domain - CQRS Read/Write Path Separationaccepted
ADR-0004Domain - Ulid-Based Entity IDaccepted
ADR-0005Domain - UnionValueObject State Machineaccepted
ADR-0006Domain - Specification + Expression Treeaccepted
ADR-0007Domain - ID-Only Cross-Aggregate Referencesaccepted
ADR-0008Domain - Domain Service Pure vs Repositoryaccepted
ADR-0009Domain - Value Object Class/Record Dual Hierarchyaccepted
ADR-0010Domain - Error Code Sealed Record Hierarchyaccepted
ADR-0011Application - Pipeline Execution Order Designaccepted
ADR-0012Application - FinResponse Pipeline Type Constraintsaccepted
ADR-0013Application - Validation Order: Normalize Then MaxLengthaccepted
ADR-0014Application - Explicit Transaction Supportaccepted
ADR-0015Adapter - Observable Port Source Generatoraccepted
ADR-0016Adapter - Persistence Suffix Naming Patternaccepted
ADR-0017Observability - ctx.* Pillar Targeting Defaultsaccepted
ADR-0018Observability - Automatic 3-Type Error Classificationaccepted
ADR-0019Observability - Field Naming: snake_case + dotaccepted
ADR-0020Event - DomainEvent Publisher Simplificationaccepted
ADR-0021Event - DomainEvent Tracing Correlation IDsaccepted
ADR-0022Testing - Architecture Test Suite Frameworkaccepted