CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/sqlite-node-best-practices

SQLite best practices for Node.js with better-sqlite3 — WAL mode, pragmas, foreign keys, STRICT tables, transactions, migrations, graceful shutdown, and query patterns

97

1.65x
Quality

98%

Does it follow best practices?

Impact

96%

1.65x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-5/

Task Management App Backend

Problem/Feature Description

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:

  • Projects: create, list, archive. Each project has a name, description, and owner (user ID).
  • Tasks: create, update, delete. Each task belongs to a project and can be assigned to a user. Tasks have a title, description, priority (low/medium/high/urgent), status (todo/in_progress/review/done), due date, and estimated hours.
  • Users: simple user table with name and email.
  • Bulk import: accept an array of tasks (10-500) for a project and create them all at once efficiently.
  • Dashboard query: for a given user, return counts of tasks grouped by status across all their assigned projects.
  • Overdue tasks: list all tasks where the due date has passed and status is not "done".

Output Specification

Produce:

  • src/db.ts — Database setup and migrations
  • src/routes/projects.ts — Project CRUD
  • src/routes/tasks.ts — Task CRUD including bulk import
  • src/routes/dashboard.ts — Dashboard and overdue queries
  • package.json — With dependencies

Complete TypeScript, no placeholders.

evals

tile.json