Ho Ngoc Hai
0c26dd85ef
fix: resolve all lint errors across codebase
...
- Convert CacheTTL enum to const object to fix duplicate value errors
- Fix import ordering in test files (eslint-disable for vi.mock pattern)
- Fix unused variable warnings (prefix with underscore)
- Auto-fix import ordering in subscription page, dashboard layout
- 0 lint errors remaining
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 23:13:35 +07:00
Ho Ngoc Hai
a87532ff6e
refactor(api): improve cache service and analytics handlers
...
Update cache service with better error handling and analytics
query handlers to use consistent caching patterns.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 23:07:00 +07:00
Ho Ngoc Hai
2502aa69b7
fix: production readiness — resolve build, lint, and code quality issues
...
- Fix Next.js build failure: remove duplicate route at (dashboard)/listings/[id]
that conflicted with (public)/listings/[id] (same URL path in two route groups)
- Fix 772 ESLint errors: auto-fix import ordering (import-x/order), remove unused
imports/variables, convert empty interfaces to type aliases, replace require()
with ESM imports, fix consistent-type-imports violations
- Add CLAUDE.md for developer onboarding documentation
- All checks pass: 0 lint errors, typecheck clean, 230 tests passing, build success
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 07:15:06 +07:00
Ho Ngoc Hai
2a392525a2
feat(cache): implement Redis caching layer for hot-read endpoints
...
Add cache-aside pattern for listing detail, search results, market
analytics (4 endpoints), and user profile queries. Cache invalidation
on all write mutations. Prometheus cache_hit_total/cache_miss_total
metrics with resource labels.
- CacheService: getOrSet, invalidate, invalidateByPrefix (SCAN-based)
- TTLs: listing 5m, search 1m, market 30m, profile 10m
- All 230 tests passing (13 new cache tests + 6 updated handler tests)
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 04:14:06 +07:00