Architectural Decisions¶
This document provides an overview of how we document architectural decisions in the CO2 Calculator project. For the complete index of all decisions, see the Architecture Decision Records section.
What Are ADRs?¶
Architecture Decision Records (ADRs) document why decisions were made, what alternatives were considered, and when they occurred. They help teams understand trade-offs and avoid revisiting settled questions.
Each ADR follows a consistent structure:
- Title - Short descriptive phrase (e.g., "Use FastAPI")
- Status - Current state (Accepted, Planned, Deprecated, Superseded)
- Context - Problem or need driving the decision
- Decision - What we chose and why
- Consequences - Trade-offs and implications
Why Document Decisions?¶
ADRs serve multiple purposes:
- Onboarding - New team members understand why the system is built this way
- Consistency - Prevents rehashing settled debates
- Context preservation - Captures reasoning that might otherwise be lost
- Accountability - Makes trade-offs explicit and reviewable
Decision Categories¶
We organize ADRs into several categories:
- Technology Stack - Languages, frameworks, libraries
- Security & Authorization - Authentication, authorization, data protection
- Infrastructure - Deployment, storage, networking
- Architecture Patterns - System design, communication patterns
Quick Reference¶
For a comprehensive list of all decisions with status indicators, rationale summaries, and rejected alternatives, see:
Key decisions include:
- Python package management (uv vs pip/poetry)
- Frontend framework (Vue 3 + Quasar)
- Backend framework (FastAPI)
- Database selection (PostgreSQL + SQLite)
- Authorization strategy (in-code RBAC vs OPA)
- Authentication approach (JWT-based)
Contributing New ADRs¶
When making a significant architectural decision:
- Create new ADR in
architecture-decision-records/(use next number) - Follow the 5-part structure listed above
- Keep concise - aim for 40-60 lines (under 80 lines max)
- Update the ADR Index
- Link from Tech Stack document if relevant
- Submit with related code changes in same PR
What qualifies as an ADR? Technology choices, architectural patterns, security models, infrastructure decisions, or any choice that impacts multiple systems or is hard to reverse.
Not an ADR: Routine implementation details, bug fixes, or small refactorings.
References¶
- Complete ADR Index - Full list with status and rationale
- Tech Stack Specification - Implementation details
- ADR Methodology - Best practices and examples
Last Updated: 2025-11-11
Readable in: ~2 minutes