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βœ…
035Gateway Adapter Pattern β€” Multi-Gateway Orchestrationβœ…
045stoa.yaml Declarative API Specificationβœ…

Platform & Infrastructure​

#TitleStatus
001Third-Party API Exposure Strategy β€” Public API Facadeβœ…
002stoactl CLI DesignπŸ“‹
007GitOps with Argo CDβœ…
025Gateway Resilience β€” Anti-Zombie Node PatternπŸ“‹
031CI/CD Reusable Workflow Architectureβœ…
040Born GitOps β€” Multi-Environment Promotion Architectureβœ…
043Kafka β†’ MCP Event Bridge ArchitectureπŸ“‹

Security & Compliance​

#TitleStatus
011API Security Mode Selection β€” mTLS / OAuth2 / Hybridβœ…
015Token Optimization ArchitectureπŸ“‹
018Security Hardening P0 β€” Team Coca Pentestβœ…
026Multi-IAM Federation Pattern β€” Zero User Storageβœ…
027X.509 Header Authenticationβœ…
028RFC 8705 Certificate Bindingβœ…
029mTLS Certificate Lifecycleβœ…
039Rust Gateway mTLS Cert-Bound Tokensβœ…
044MCP OAuth 2.1 Gateway Proxy Architectureβœ…
054RBAC Taxonomy v2 β€” Persona Roles & Display Namesβœ…
056FAPI 2.0 Security Architectureβœ…

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βœ…
046MCP Federation ArchitectureπŸ“‹
047MCP Skills System β€” Context InjectionπŸ“‹
048Integrated Chat Agent ArchitectureπŸ“‹
051Lazy MCP Discovery with Cache-First Patternβœ…

Performance & Observability​

#TitleStatus
008Semantic Response Caching β€” pgvector Strategyβœ…
009Error Snapshots β€” Time-Travel Debuggingβœ…
049Enterprise AI-Native Gateway Benchmarkβœ…
050Guardrails V2 β€” Token Budget State Managementβœ…
052Benchmark OpenSearch Persistence & LLM Routingβœ…
053LLM Cost-Aware Routingβœ…

Gateway & Deployment​

#TitleStatus
034Python to Rust Migration Strategyβœ…
036Gateway Auto-Registration β€” Zero-Config Onboardingβœ…
037Deployment Modes β€” Sovereign First Strategyβœ…
038Sidecar Deployment on VM InfrastructureπŸ“‹
057Product Lineup β€” STOA Gateway, STOA Link, STOA Connectβœ…
058Pingora Integration β€” Embedded Connection Poolβœ…

Frontend & UX​

#TitleStatus
032Response Transformation β€” Pluggable Adaptersβœ…
033Shared UI Components β€” Theme Abstractionβœ…
055Portal/Console Governance β€” Clear Separation of Concernsβœ…

Business & Strategy​

#TitleStatus
019Business Model & Moat Strategyβœ…
041Plugin Architecture β€” Community Core vs Enterprise Extensionsβœ…

Developer Experience & AI Workflow​

#TitleStatus
030AI-Native Context Management Architectureβœ…
065STOA PR Guardian β€” Advisory AI Review on GitHub Actionsβœ…

Planned ADRs​

#TitlePriority
010Blockchain Decision β€” Digital Euro 2027+Low
013Idempotency & Saga Patterns β€” Exactly-Once for B2BMedium
014Delivery Guardrails β€” Canary & SLO Auto-FreezeMedium
016Release Engineering β€” Git Workflow & VersioningHigh
017Kafka/Redpanda Internal-Only β€” Zero External ExposureMedium

Legend: βœ… Accepted Β· πŸ“‹ Draft/Proposed

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 (Pingora)Go, 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