Summary
SQLite is perfect for self-hosted single-instance deployments, but teams deploying to
Railway/Render/Fly.io with horizontal scaling need PostgreSQL.
Acceptance criteria
Notes
Keep better-sqlite3 as the default — SQLite requires zero config.
Consider a lightweight adapter interface: { prepare, exec } for SQLite vs { query } for Postgres.
Only add pg as a dependency (not pg-native).
Summary
SQLite is perfect for self-hosted single-instance deployments, but teams deploying to
Railway/Render/Fly.io with horizontal scaling need PostgreSQL.
Acceptance criteria
DATABASE_URLenv var is set, usepg(node-postgres) instead of better-sqlite3src/db/database.jsdetects which driver to usedocker-compose.ymlgains an optionalpostgresservice profileDATABASE_URLformatNotes
Keep
better-sqlite3as the default — SQLite requires zero config.Consider a lightweight adapter interface:
{ prepare, exec }for SQLite vs{ query }for Postgres.Only add
pgas a dependency (notpg-native).