Commit History
-
chore(lint): add ESLint, fix mechanical violations, remove dead code
DONG-WEI-YANG +1: Claude Sonnet 5No lint tooling existed in this project at all. Added ESLint 9 flat config (eslint.config.js) with typescript-eslint, eslint-plugin-react, and only the two classic eslint-plugin-react-hooks rules (rules-of-hooks, exhaustive-deps) rather than its full v7 "recommended" preset — that preset bundles the entire React Compiler rule set (set-state-in-effect, immutability, purity, etc.) as errors, which flags common existing patterns (e.g. syncing a tRPC query's error into local state via useEffect) that are safe today since this codebase doesn't use the Compiler. Adopting those is a deliberate future decision, not a side effect of adding lint tooling. `npm run lint` / `lint:fix` added. Ran eslint --fix for the mechanically-safe violations (useless escapes, useless try/catch, prefer-const, unused eslint-disable directives), then fixed the rest by hand: - target="_blank" without rel="noreferrer" on 3 external links (Home.tsx, Privacy.tsx x2) — real reverse-tabnabbing risk in older browsers.…01fbb71
-
fix(security): patch critical vulnerabilities from full-app audit
DONG-WEI-YANG +1: Claude Sonnet 5- record.retrieve/genogram.load/ecomap.load now travel via POST body instead of GET, so the record access key never lands in URL query strings, proxy logs, browser history, or Referer headers (httpBatchLink methodOverride + allowMethodOverride) - express.json body limit 2mb -> 20mb, and ai.ts's imageBase64 gets an explicit .max() -- the old 2mb cap silently 413'd realistic photo uploads and multi-file record attachments before Zod ever ran - app.use('/trpc/ai.', aiLimiter) never actually matched in Express 5 (a path-prefix mount only matches when followed by '/' or EOS, never a procedure name) -- every paid AI call was silently running under only the generic 100/min limiter instead of the intended 10/min. Fixed via explicit req.path.startsWith() check; also caps tRPC batch size so one HTTP request can't smuggle dozens of AI calls past the per-request limiter - genogram.save/ecomap.save never verified the caller's key against the record's keyHash before encryptin…b81c93f
-
feat: complete Group B+C+D — full system implementation
DONG-WEI-YANG +1: Claude Opus 4.6 (1M context)Backend (Group B): - tRPC routers: record, genogram, ecomap, voice, ltc3, consent, export, rag - Services: crypto (AES-256-GCM+HKDF), Word export, voice structuring, LTC3 matching, cleanup cron, crawl targets - Middleware: rate limiter per endpoint Frontend (Group C): - Role selection home page with 9 shared UI components - Social worker workspace: visit record + social assessment forms - Nurse workspace: SOAP + nursing note + nursing plan forms - Case manager workspace: care tracking with LTC3 code mapping - Supervisor workspace: quality check with compliance review - Canvas editors: genogram (1422 lines, McGoldrick) + ecomap (865 lines) - Voice recorder (Web Speech API) + LTC3 code suggestions - Consent dialog + key/QR display + retrieve form with QR scanner RAG + AI (Group D): - Per-role distributed SQLite RAG stores (4 databases) - Embedder (Transformers.js all-MiniLM-L6-v2) - Hybrid search (0.7*vector + 0.3*BM25) - Record ingester with PII anonymization - Auto-crawler (9 LTC r…7c280c7