De-risks the flagship. The app is synchronous (better-sqlite3) but Kysely executes async, so db/kysely.cts uses Kysely as a TYPE-SAFE BUILDER only: build the query (columns + user_id/deleted_at scoping + types checked at compile time), `.compile()`, then run via sync helpers (all/get/run) on the shared connection. No async ripple, no change to the sync model. - Schema typed for `categories` (extend as adopted). - tests/kyselyPoc.test.js proves byte-identical rows vs the raw SQL and that compiled SQL is parameterized (injection-safe). - Pattern documented in CODE_STANDARDS; adopt for new/refactored queries; it type-enforces user-scoping (the biggest data-isolation win) and removes Row=any at the call site. typecheck:server + check:server clean; 248/248 server tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| images | ||
| Authentik-Integration.md | ||
| BRAND.md | ||
| CODE_STANDARDS.md | ||
| CSRF-SPA-Setup.md | ||
| Engineering_Reference_Manual.md | ||
| Engineering_Reference_promp.md | ||
| QA_PLAN.md | ||
| RATE_LIMITING_ENHANCEMENT.md | ||
| ROADMAP_REDESIGN_PLAN.md | ||
| ROADMAP_UI_AUDIT.md | ||
| UI_IMPROVEMENTS.md | ||
| advisory_non_bill_transaction_filters_us_ms_5000.json | ||
| cents-migration-plan.md | ||
| merchant_store_match_us_nems_online_5k_v0_2.json | ||
| top_200_us_subscriptions.csv | ||
| top_200_us_subscriptions_researched_2026-06-06.json | ||