Architecture Decision Records (ADRs)
Architecture Decision Records document significant architectural choices made in Prism. Each ADR captures the problem context, decision rationale, alternatives considered, and consequencesβcreating a historical record of "why" behind the architecture.
π― New to Prism? Start Hereβ
If you're exploring Prism's architecture, start with these foundational decisions:
- ADR-001: Rust for Proxy - Why Rust powers Prism's core
- ADR-003: Protobuf Single Source of Truth - Data modeling philosophy
- ADR-002: Client-Originated Configuration - How apps declare requirements
- ADR-005: Backend Plugin Architecture - Pluggable backend design
π Reading Paths by Intentβ
Understanding the Core Architectureβ
Learn the foundational decisions that shaped Prism:
- ADR-001: Rust for Proxy - Why Rust over Java/Go/C++
- ADR-003: Protobuf Single Source of Truth - Using protobuf for everything
- ADR-005: Backend Plugin Architecture - Extensible plugin system
- ADR-008: Observability Strategy - Logging, metrics, tracing approach
Building Backend Pluginsβ
Decisions that affect plugin development:
- ADR-012: Go for Backend Plugins - Why Go for plugins vs Rust
- ADR-015: Go Testing Strategy - TDD and coverage requirements
- ADR-041: Pattern Acceptance Test Framework - Automated cross-backend testing
- ADR-043: Hygienic Build System - Out-of-source builds in
build/
Deploying and Operating Prismβ
Operational decisions for platform engineers:
- ADR-006: Namespace Multi-Tenancy - Tenant isolation strategy
- ADR-007: Authentication & Authorization - mTLS and OAuth2 security
- ADR-009: Shadow Traffic Migrations - Zero-downtime backend changes
- ADR-048: Local Signoz Observability - OpenTelemetry + Signoz setup
Setting Up Local Developmentβ
Decisions that affect your dev environment:
- ADR-036: SQLite Config Storage - Local-first configuration
- ADR-044: Prismctl CLI with Typer - Python CLI design
- ADR-040: UV-Only Python Tooling - No system Python packages
- ADR-049: Podman Container Optimization - Scratch containers and MicroVMs
π ADRs by Categoryβ
ποΈ Foundation Decisionsβ
Core technology choices that define Prism's architecture:
- ADR-001: Rust for Proxy (Accepted) - 10-100x performance over JVM, memory safety, zero-cost abstractions
- ADR-003: Protobuf Single Source of Truth (Accepted) - Type safety, code generation, backward compatibility
- ADR-004: Local-First Testing (Accepted) - Real backends over mocks for realistic tests
- ADR-012: Go for Backend Plugins (Accepted) - Ecosystem, testability, developer productivity
ποΈ Architecture Patternsβ
How Prism is structured and organized:
- ADR-002: Client-Originated Configuration (Accepted) - Applications declare their requirements
- ADR-005: Backend Plugin Architecture (Accepted) - Clean separation between proxy and backends
- ADR-010: Caching Layer (Proposed) - Look-aside and write-through strategies
- ADR-011: Implementation Roadmap (Accepted) - Phased delivery strategy
π Security & Multi-Tenancyβ
Authentication, authorization, and isolation:
- ADR-006: Namespace Multi-Tenancy (Accepted) - Logical isolation for multiple tenants
- ADR-007: Authentication & Authorization (Accepted) - mTLS for service-to-service, OAuth2 for users
- ADR-050: Topaz for Policy-Based Authorization (Accepted) - Relationship-based access control (ReBAC)
π§ Operations & Reliabilityβ
How Prism runs in production:
- ADR-008: Observability Strategy (Accepted) - Structured logging, metrics, distributed tracing
- ADR-009: Shadow Traffic Migrations (Accepted) - Zero-downtime backend migrations
- ADR-013: Error Handling Strategy (Accepted) - Structured errors with retryability signals
- ADR-048: Local Signoz Observability (Accepted) - OpenTelemetry + Signoz for local testing
π§ͺ Testing & Quality Assuranceβ
How we ensure code quality and correctness:
- ADR-015: Go Testing Strategy (Accepted) - TDD with 80%+ coverage requirements
- ADR-041: Pattern Acceptance Test Framework (Accepted) - Cross-backend test automation
- ADR-020: Parallel Testing Infrastructure (Accepted) - Fork-join execution (40% faster)
- ADR-021: Parallel Linting System (Accepted) - 54-90x faster linting (45min β 3-4sec)
π οΈ Developer Toolingβ
Tools and workflows for local development:
- ADR-036: SQLite Config Storage (Accepted) - Local-first configuration database
- ADR-040: UV-Only Python Tooling (Accepted) - Modern Python dependency management
- ADR-043: Hygienic Build System (Accepted) - Out-of-source builds in
build/
- ADR-044: Prismctl CLI with Typer (Accepted) - Python CLI for namespace management
- ADR-049: Podman Container Optimization (Accepted) - Minimal scratch containers (87% reduction)
π Documentation & Processβ
How we document and share knowledge:
- ADR-042: MDX Docusaurus Migration (Accepted) - Static site generation with React components
- ADR-050: Documentation Validation Pipeline (Accepted) - Automated link checking and frontmatter validation
- ADR-016: Local Development Infrastructure (Proposed) - Dex, Signoz, service lifecycle management
π ADR Status Meaningsβ
ADRs progress through these states:
- Proposed β Under discussion, not yet decided
- Accepted β Decision made and documented
- Implemented β Decision implemented in code
- Deprecated β No longer applicable
- Superseded β Replaced by a newer ADR (with reference)
π‘ Why ADRs Matterβ
ADRs help teams:
- Understand why certain decisions were made (prevents revisiting settled debates)
- Evaluate alternatives that were considered (shows due diligence)
- Learn from past decisions (builds institutional knowledge)
- Onboard new team members to architectural philosophy (accelerates ramp-up)
π Contributing ADRsβ
When making a significant architectural decision:
- Create a new ADR using the template:
docs-cms/adr/000-template.md
- Number it sequentially (next available ADR-XXX number)
- Structure it with: Context, Decision, Rationale, Consequences
- Submit for review with the core team
- Update status as the decision progresses
What Deserves an ADR?β
Write an ADR when:
- Choosing between technology alternatives (e.g., Rust vs Go)
- Defining system-wide patterns (e.g., error handling)
- Making security or compliance decisions
- Establishing development workflows (e.g., testing strategy)
- Selecting third-party tools/services
Don't write an ADR for:
- Implementation details (use code comments)
- Temporary workarounds (use TODOs)
- Personal preferences (use code reviews)
π Related Documentationβ
- RFCs - Detailed technical specifications for features
- MEMOs - Implementation diagrams and visual documentation
- Changelog - Recent documentation updates
Total ADRs: 50+ architectural decisions documented
Latest Updates: See the Changelog for recent ADRs