architecture-decision-records
Architecture Decision Records
Document significant technical decisions so future you (and your team) understands why.
Create an ADR
Standard format
# ADR-001: Use PostgreSQL for primary database
## Status
Accepted
## Date
2024-01-15
## Context
We need a primary database for the application. Requirements:
- Relational data with complex queries
- Full-text search capability
- JSON column support for flexible schemas
- Strong consistency guarantees
## Decision
Use PostgreSQL with pgvector extension for vector similarity search.
## Alternatives Considered
### MySQL
- Pros: Familiar to team, wide hosting support
- Cons: Weaker JSON support, no native vector search
- Rejected: Missing key features we need
### MongoDB
- Pros: Flexible schema, good for document storage
- Cons: Weaker consistency, complex transactions
- Rejected: Our data is fundamentally relational
## Consequences
- Team needs PostgreSQL expertise
- Hosting on Supabase (managed Postgres)
- pgvector enables future AI/semantic search features
- Migration path exists if we need to switch (standard SQL)
Directory Structure
docs/
adr/
000-template.md
001-use-postgresql.md
002-adopt-nextjs-app-router.md
003-api-authentication-strategy.md
README.md # Index of all ADRs
ADR Index
# Generate index from ADR files
echo "# Architecture Decision Records" > docs/adr/README.md
echo "" >> docs/adr/README.md
for f in docs/adr/[0-9]*.md; do
title=$(head -1 "$f" | sed 's/^# //')
status=$(grep "^## Status" -A1 "$f" | tail -1)
echo "- [$title]($f) — $status" >> docs/adr/README.md
done
When to Write an ADR
- Choosing a framework, language, or database
- Changing authentication/authorization approach
- Adopting a new deployment strategy
- Major refactoring decisions
- Third-party service selection
- API design decisions (REST vs GraphQL, versioning strategy)
When NOT to Write an ADR
- Routine bug fixes
- Minor library version updates
- Code style changes (use linter config instead)
- Anything that doesn't affect other developers
Updating ADRs
Don't edit old ADRs. If a decision changes, write a new ADR that supersedes the old one:
## Status
Superseded by [ADR-007](007-switch-to-supabase-auth.md)
Notes
- ADRs are immutable history. They record what was decided and why at that time.
- Keep them short. One page is ideal. If it's longer, the decision might be too complex.
- Store ADRs in the repo, not in a wiki. They should travel with the code.
- The "Alternatives Considered" section is the most valuable part — it prevents re-litigating decisions.
More from thinkfleetai/thinkfleet-engine
feishu-bridge
Connect a Feishu (Lark) bot to ThinkFleet via WebSocket long-connection. No public server, domain, or ngrok required. Use when setting up Feishu/Lark as a messaging channel, troubleshooting the Feishu bridge, or managing the bridge service (start/stop/logs). Covers bot creation on Feishu Open Platform, credential setup, bridge startup, macOS launchd auto-restart, and group chat behavior tuning.
13voice-transcribe
Transcribe audio files using OpenAI's gpt-4o-mini-transcribe model with vocabulary hints and text replacements. Requires uv (https://docs.astral.sh/uv/).
10freshrss
Query headlines and articles from a self-hosted FreshRSS instance. Use when the user asks for RSS news, latest headlines, feed updates, or wants to browse articles from their FreshRSS reader. Supports filtering by category, time range, and count.
9pollinations
Pollinations.ai API for AI generation - text, images, videos, audio, and analysis. Use when user requests AI-powered generation (text completion, images, videos, audio, vision/analysis, transcription) or mentions Pollinations. Supports 25+ models (OpenAI, Claude, Gemini, Flux, Veo, etc.) with OpenAI-compatible chat endpoint and specialized generation endpoints.
6whoop
WHOOP morning check-in (recovery/sleep/strain) with suggestions.
6gitignore-gen
Generate .gitignore by analyzing your project. Use when setting up a new repo.
5