- Add file-level biome-ignore for noExplicitAny in prisma-facade.ts (intentional any for Prisma API compatibility surface) - Fix noNonNullAssertion errors in cached-db.ts (redis null-guard fixes) - Auto-fix formatting + organizeImports across modified files - 0 tsc errors, 0 biome errors, 583 tests passing
- Add Redis cache wrapper (cached-db.ts) — cachedQuery + invalidate helpers - Add cached login user lookup (auth.ts: getLoginUser) — short 15s TTL for brute-force protection, cache invalidation on password/rank changes - Switch auth.ts login flow from Prisma facade to raw SQL via db.execute (avoids abstraction overhead for this hot path) - Cache invalidation wired in: login password upgrade, updateUser, resetPassword - Connection pool tuning: enableKeepAlive, namedPlaceholders, prepared statement cache (Node 22+), multipleStatements off (SQLi hardening) - 0 tsc errors, 583 tests passing