feat(defects): read API — feed, per-section counts and history (T6)

GET /api/defects returns a newest-first feed joined to the project name,
bounded by limit; ?section=ID narrows to one section's history. GET
/api/defects/counts returns { sectionId: n } for the weak-point map. Adds a
(section_id, created_at) index and a db:seed script; ~2k rows query in ~20ms.
This commit is contained in:
Julien Calixte
2026-05-28 00:18:18 +02:00
parent fc958ba59f
commit 999593b426
11 changed files with 384 additions and 14 deletions

View File

@@ -15,6 +15,7 @@
"typecheck": "nuxt typecheck",
"db:generate": "drizzle-kit generate",
"db:migrate": "tsx server/db/migrate.ts",
"db:seed": "tsx server/db/seed.ts",
"db:verify": "tsx scripts/verify-db.ts",
"docker:dev": "docker compose -f docker-compose.dev.yml up",
"docker:dev:build": "docker compose -f docker-compose.dev.yml up --build",