SQLite best practices for Node.js with better-sqlite3 — WAL mode, pragmas, foreign keys, STRICT tables, transactions, migrations, graceful shutdown, and query patterns
97
98%
Does it follow best practices?
Impact
96%
1.65xAverage score across 5 eval scenarios
Passed
No known issues
A small team needs a task management backend built with Node.js, TypeScript, and Fastify. Use SQLite for storage (single-server deployment).
The system needs:
Produce:
src/db.ts — Database setup and migrationssrc/routes/projects.ts — Project CRUDsrc/routes/tasks.ts — Task CRUD including bulk importsrc/routes/dashboard.ts — Dashboard and overdue queriespackage.json — With dependenciesComplete TypeScript, no placeholders.