Skip to main content

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