Aller au contenu principal

Architecture Decision Records (ADRs)

"Each tool to its purpose" — No one-size-fits-all

This directory contains important architectural decisions for STOA Platform.


📚 ADR Index

🏛️ Core Architecture

#TitleStatus
003Monorepo Architecture — Multi-Service Polyglot
004Gateway Adapter Pattern — Multi-Gateway Orchestration
005Event-Driven Architecture — Kafka Topics Design
006Tool Registry Architecture — 7-Module Design

⚡ Performance & Reliability

#TitleStatus
008Semantic Response Caching — pgvector Strategy
009Error Snapshots — Time-Travel Debugging

🏗️ Platform & Infrastructure

#TitleStatus
001Third-Party API Exposure Strategy — Public API Façade
002stoactl CLI Design📋
007GitOps with Argo CD
025Gateway Resilience — Anti-Zombie Node Pattern📋
026Multi-IAM Federation Pattern — Zero User Storage

🔐 Security & Compliance

#TitleStatus
011API Security Mode Selection — mTLS / OAuth2 / Hybrid
018Security Hardening P0 — Team Coca Pentest

🤖 MCP & AI Gateway

#TitleStatus
012MCP Tools Architecture — RBAC & Multi-Tenant Governance
020Runtime Data Governance
021UAC-Driven Observability📋
022UAC Tenant Architecture
023Zero Blind Spot Observability
024Unified Gateway Architecture — 4 Deployment Modes

💼 Business & Strategy

#TitleStatus
019Business Model & Moat Strategy
041Plugin Architecture — Community Core vs Enterprise Extensions

🛠️ Developer Experience & AI Workflow

#TitleStatus
030AI-Native Context Management Architecture
031CI/CD Reusable Workflow Architecture
032Response Transformation — Pluggable Adapters

🎨 Frontend & UX

#TitleStatus
033Shared UI Components — Theme Abstraction

🦀 Evolution

#TitleStatus
034Python to Rust Migration Strategy

🌐 Gateway & Deployment

#TitleStatus
035Gateway Adapter Pattern — Multi-Gateway Orchestration
036Gateway Auto-Registration — Zero-Config Onboarding
037Deployment Modes — Sovereign First Strategy

🔮 Planned ADRs

#TitlePriority
010Blockchain Decision — Digital Euro 2027+🔵
013Idempotency & Saga Patterns — Exactly-Once for B2B🟡
014Delivery Guardrails — Canary & SLO Auto-Freeze🟡
015Sender-Constrained Tokens — mTLS Binding, DPoP & DCR🟡
016Release Engineering — Git Workflow & Versioning🟢
017Kafka/Redpanda Internal-Only — Zero External Exposure🟡

Legend: ✅ Accepted · 📋 Draft · 🟢 High · 🟡 Medium · 🔵 Low

Technology Choices Overview

CategorySTOA ChoiceAlternativesRationale
MessagingKafka (Redpanda)RabbitMQ, NATSEvent sourcing, replay, scale
DatabasePostgreSQLMySQL, MongoDBACID, JSON, extensions
AuthKeycloakAuth0, OktaSelf-hosted, full OIDC
ObservabilityPrometheus + Grafana + LokiDatadog, ELKOpen source, K8s-native
GitOpsArgoCDFlux, JenkinsUI, multi-cluster
AutomationArgoCD + Gateway AdaptersTerraformIdempotent, auditable
Gateway v1webMethodsKong, APISIXLegacy expertise
Gateway v2Rust + eBPFGo, C++Performance, safety
SearchOpenSearchElasticsearchApache 2.0, AWS-free

Guiding Principles

PrincipleApplication
Open Source firstAvoid lock-in, contribute upstream
K8s-nativeOperators, CRDs, GitOps
Right tool for the jobKafka for events, PostgreSQL for ACID
Self-hosted possibleNo mandatory SaaS dependency
Permissive licenseApache 2.0, MIT — avoid GPL, SSPL
Cloud-agnosticNo mandatory managed service

ADR Template

Use the template below to create new ADRs.

# ADR-XXX: [Title]

## Metadata
| Field | Value |
|-------|-------|
| **Status** | 📋 Draft / ✅ Accepted / ❌ Rejected / 🔄 Superseded |
| **Date** | YYYY-MM-DD |
| **Linear** | [CAB-XXX](link) |

## Context
[Why is this decision needed?]

## Decision
[What was decided?]

## Consequences
### Positive
### Negative
### Mitigations

## References