Ho Ngoc Hai
ccb82fddf8
feat(cache): implement Redis caching for search & analytics hot paths
...
- Add TTL-specific cache durations: district stats (5min), market report (15min), heatmap (5min)
- Add Redis caching to GeoSearch handler with 60s TTL
- Add cache invalidation on listing.approved, listing.updated, listing.deactivated, listing.sold events
- Invalidate search, geo_search, and all analytics cache prefixes on listing state changes
- Update tests for new CacheService dependency in event handler and geo-search handler
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 22:51:16 +07:00
Ho Ngoc Hai
8705a2d9a8
fix: resolve all ESLint errors across API and web packages
...
Fix 19+ lint errors: unused imports (Phone, DuplicateCandidate, listingDetailsSchema),
import ordering violations, consistent-type-imports, and constant binary expression
in test file.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 16:29:44 +07:00
Ho Ngoc Hai
cd2abdba7b
test(web): add Vitest setup and unit tests for validations and utils
...
- Add vitest config and test script to web app
- Auth validation tests: phone format, password rules, registration flow
- Listing validation tests: all schema steps, constants, merged schema
- Utils tests: cn() class merging with Tailwind conflict resolution
- 36 tests across 3 test files
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 14:59:00 +07:00