feat: add MFA/TOTP auth, PII encryption, agents/leads/inquiries modules, and comprehensive tests

- Add TOTP-based MFA with setup, verify, disable, backup codes, and challenge flow
- Add PII field encryption middleware with AES-256-GCM and deterministic search hashes
- Add agents, inquiries, and leads domain modules with entities, events, value objects
- Add web dashboard pages for inquiries and leads with detail dialogs
- Add 30+ component tests (valuation, charts, listings, search, providers, UI)
- Add Prisma migrations for encryption hash columns and MFA TOTP support
- Fix all ESLint errors (unused imports, duplicate imports, lint auto-fixes)
- Update dependencies and lock file
- Clean up obsolete exploration/QA docs, add audit documentation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-11 23:43:20 +07:00
parent 9e2bf9a4b5
commit 1fbe2f4e73
131 changed files with 11436 additions and 2595 deletions

View File

@@ -8,6 +8,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- CEO full audit & implementation plan (TEC-1882) — 8-part report covering architecture, quality, security
- 7 new subtasks created (TEC-1888 through TEC-1894) for Wave 11D-13
- Updated PROJECT_TRACKER with Waves 11D-13 subtask tracking
- Updated QA_TRACKER with 2026-04-11 test report (27 failing tests identified)
- Comprehensive audit reports: AUDIT_SUMMARY, COMPREHENSIVE_AUDIT, AUDIT_INDEX
### Identified (from CEO Audit 2026-04-11)
- 725 ESLint errors (712 auto-fixable) — TEC-1888
- TypeScript errors in web tests (json-ld.spec.tsx) — TEC-1888
- 27 failing rate limit guard tests — TEC-1889
- 3 incomplete API modules (health, metrics, mcp) — TEC-1890
- MCP servers are stubs (~50 lines each) — TEC-1891
- Only 6 web unit tests (need 50+) — TEC-1892
- No field-level PII encryption — TEC-1893
- No MFA for agent/admin accounts — TEC-1894
### Previously Added
- CEO audit plan document with full improvement & feature matrix (TEC-1682)
- Wave 5 issues: npm vulnerability fixes, test coverage, Saved Searches, Dependabot
- PgBouncer connection pooling for production PostgreSQL