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โ
| # | Title | Status |
|---|---|---|
| 003 | Monorepo Architecture โ Multi-Service Polyglot | โ |
| 004 | Gateway Adapter Pattern โ Multi-Gateway Orchestration | โ |
| 005 | Event-Driven Architecture โ Kafka Topics Design | โ |
| 006 | Tool Registry Architecture โ 7-Module Design | โ |
โก Performance & Reliabilityโ
| # | Title | Status |
|---|---|---|
| 008 | Semantic Response Caching โ pgvector Strategy | โ |
| 009 | Error Snapshots โ Time-Travel Debugging | โ |
๐๏ธ Platform & Infrastructureโ
| # | Title | Status |
|---|---|---|
| 001 | Third-Party API Exposure Strategy โ Public API Faรงade | โ |
| 002 | stoactl CLI Design | ๐ |
| 007 | GitOps with Argo CD | โ |
| 025 | Gateway Resilience โ Anti-Zombie Node Pattern | ๐ |
| 026 | Multi-IAM Federation Pattern โ Zero User Storage | โ |
๐ Security & Complianceโ
| # | Title | Status |
|---|---|---|
| 011 | API Security Mode Selection โ mTLS / OAuth2 / Hybrid | โ |
| 018 | Security Hardening P0 โ Team Coca Pentest | โ |
๐ค MCP & AI Gatewayโ
| # | Title | Status |
|---|---|---|
| 012 | MCP Tools Architecture โ RBAC & Multi-Tenant Governance | โ |
| 020 | Runtime Data Governance | โ |
| 021 | UAC-Driven Observability | ๐ |
| 022 | UAC Tenant Architecture | โ |
| 023 | Zero Blind Spot Observability | โ |
| 024 | Unified Gateway Architecture โ 4 Deployment Modes | โ |
๐ผ Business & Strategyโ
| # | Title | Status |
|---|---|---|
| 019 | Business Model & Moat Strategy | โ |
| 041 | Plugin Architecture โ Community Core vs Enterprise Extensions | โ |
๐ ๏ธ Developer Experience & AI Workflowโ
| # | Title | Status |
|---|---|---|
| 030 | AI-Native Context Management Architecture | โ |
| 031 | CI/CD Reusable Workflow Architecture | โ |
| 032 | Response Transformation โ Pluggable Adapters | โ |
๐จ Frontend & UXโ
| # | Title | Status |
|---|---|---|
| 033 | Shared UI Components โ Theme Abstraction | โ |
๐ฆ Evolutionโ
| # | Title | Status |
|---|---|---|
| 034 | Python to Rust Migration Strategy | โ |
๐ Gateway & Deploymentโ
| # | Title | Status |
|---|---|---|
| 035 | Gateway Adapter Pattern โ Multi-Gateway Orchestration | โ |
| 036 | Gateway Auto-Registration โ Zero-Config Onboarding | โ |
| 037 | Deployment Modes โ Sovereign First Strategy | โ |
๐ฎ Planned ADRsโ
| # | Title | Priority |
|---|---|---|
| 010 | Blockchain Decision โ Digital Euro 2027+ | ๐ต |
| 013 | Idempotency & Saga Patterns โ Exactly-Once for B2B | ๐ก |
| 014 | Delivery Guardrails โ Canary & SLO Auto-Freeze | ๐ก |
| 015 | Sender-Constrained Tokens โ mTLS Binding, DPoP & DCR | ๐ก |
| 016 | Release Engineering โ Git Workflow & Versioning | ๐ข |
| 017 | Kafka/Redpanda Internal-Only โ Zero External Exposure | ๐ก |
Legend: โ Accepted ยท ๐ Draft ยท ๐ข High ยท ๐ก Medium ยท ๐ต Low
Technology Choices Overviewโ
| Category | STOA Choice | Alternatives | Rationale |
|---|---|---|---|
| Messaging | Kafka (Redpanda) | RabbitMQ, NATS | Event sourcing, replay, scale |
| Database | PostgreSQL | MySQL, MongoDB | ACID, JSON, extensions |
| Auth | Keycloak | Auth0, Okta | Self-hosted, full OIDC |
| Observability | Prometheus + Grafana + Loki | Datadog, ELK | Open source, K8s-native |
| GitOps | ArgoCD | Flux, Jenkins | UI, multi-cluster |
| Automation | ArgoCD + Gateway Adapters | Terraform | Idempotent, auditable |
| Gateway v1 | webMethods | Kong, APISIX | Legacy expertise |
| Gateway v2 | Rust + eBPF | Go, C++ | Performance, safety |
| Search | OpenSearch | Elasticsearch | Apache 2.0, AWS-free |
Guiding Principlesโ
| Principle | Application |
|---|---|
| Open Source first | Avoid lock-in, contribute upstream |
| K8s-native | Operators, CRDs, GitOps |
| Right tool for the job | Kafka for events, PostgreSQL for ACID |
| Self-hosted possible | No mandatory SaaS dependency |
| Permissive license | Apache 2.0, MIT โ avoid GPL, SSPL |
| Cloud-agnostic | No 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