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
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
Ho Ngoc Hai
400a75845c
feat(observability): integrate Sentry error tracking for API and Web apps
...
- API: add @sentry/nestjs with instrument.ts, SentryModule, and SentryGlobalFilter
- Web: add @sentry/nextjs with client/server/edge configs, instrumentation hook
- Update next.config.js with withSentryConfig wrapper
- Replace TODO in error.tsx with Sentry.captureException
- Add SENTRY_DSN, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT to .env.example
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 13:44:57 +07:00
Ho Ngoc Hai
af71270a2e
feat: upgrade major dependencies to latest versions
...
- Prisma 6.19 → 7.7 (driver adapter pattern, prisma.config.ts)
- TypeScript 5.9 → 6.0 (ignoreDeprecations, CSS type declarations)
- Vitest 3.2 → 4.1
- Pino 9.14 → 10.3
- @types/node 22.x → 25.x
All 307 tests pass, typecheck clean, build succeeds.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 13:15:36 +07:00
Ho Ngoc Hai
00d2f26e25
feat(web): build agent dashboard with analytics charts and listing management
...
- Dashboard overview: stats cards (listings, views, inquiries, market avg price), Recharts bar chart for district pricing, recent listings feed with engagement metrics
- Analytics page: tabbed layout (overview/trends/districts), interactive bar chart for district comparison, line chart for price trend over quarters with dual Y-axis, clickable heatmap cards
- Listings management: grid/table view toggle, status filter, stats summary cards, table view with thumbnails and engagement data
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 05:20:28 +07:00
Ho Ngoc Hai
b6bb422d33
feat(web): add listing detail page and Mapbox GL JS map integration
...
- Create public listing detail page at /listings/[id] with image gallery,
property specs, contact card, and embedded map
- Rewrite ListingMap component to use Mapbox GL JS with interactive markers,
price labels, and listing popups
- Add selectedListingId prop to search page map views for marker highlighting
- Install mapbox-gl dependency
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 05:12:48 +07:00
Ho Ngoc Hai
0b29fac35e
feat(notifications): add multi-channel notification module with Email, FCM, templates, and event listeners
...
- Domain: NotificationLog/NotificationPreference entities, repositories, channel value object
- Infrastructure: EmailService (nodemailer/SMTP), FcmService (firebase-admin), TemplateService (Handlebars)
- Application: SendNotification CQRS command, UserRegistered + AgentVerified event listeners
- Presentation: NotificationsController with history, preferences, and templates endpoints
- Prisma: NotificationLog and NotificationPreference models with proper indexes
- Templates: Vietnamese notification templates for user.registered, agent.verified, listing.approved, inquiry.received, password.reset
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-08 01:42:17 +07:00
Ho Ngoc Hai
e1e5fa6252
feat: scaffold monorepo with Turborepo + NestJS + Next.js
...
- Turborepo monorepo with pnpm workspaces
- apps/api: NestJS 11.x with CQRS module
- apps/web: Next.js 14 App Router + TailwindCSS
- src/modules/shared: base entities, Result pattern, value objects
- TypeScript 5.7+ strict mode, shared tsconfig base
- Build pipeline: dev, build, lint, test, typecheck
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-04-07 23:52:33 +07:00