ADR-0003: Use SQLite for WatchTower Event Storage
- Status: Accepted
- Date: 2026-05-26
Context
WatchTower requires persistent storage for:
- telemetry events
- error logs
- performance metrics
- user feedback
- deployment metadata
The database solution must:
- remain lightweight
- support rapid development
- minimize infrastructure complexity
- work well with Node.js
- fit the project’s operational scope
Decision
Use SQLite as the primary database for WatchTower.
Rationale
- SQLite is lightweight and serverless
- No separate database server setup is required
- Fast local development and testing
- Works naturally with Node.js backend architecture
- Suitable for moderate telemetry workloads and prototyping
- Reduces deployment and operational complexity
- File-based storage simplifies project portability and debugging
Alternatives Considered
PostgreSQL
Rejected due to increased infrastructure and configuration overhead for the current project scope.
MongoDB
Rejected because WatchTower’s event structure benefits from relational querying and simpler local setup.
MySQL
Rejected due to unnecessary server management complexity compared to SQLite.
Consequences
Positive
- Simple setup and onboarding
- Lightweight deployment
- Fast prototyping
- Minimal operational overhead
- Easy local persistence for development and demos
Negative
- Not ideal for very high concurrent write workloads
- Less scalable than dedicated database servers
- May require migration to PostgreSQL or another DBMS if system scale increases significantly
Conclusion
SQLite was selected because it provides a lightweight, low-maintenance, and development-friendly persistence layer that aligns well with WatchTower’s scope and rapid iteration goals.