Project system brief
A real estate platform built on NestJS 12 microservices over Redis transport with Clean Architecture, shared Zod v4 contracts, and a React 19 + Tailwind CSS v4 frontend.
Product Context
Product Context
A real estate platform built on NestJS 12 microservices over Redis transport with Clean Architecture, shared Zod v4 contracts, and a React 19 + Tailwind CSS v4 frontend.
System Problem & Scope
System Problem & Scope
Monolithic property portals often tightly couple user authentication, listing search, and buyer lead capture, making independent scaling, strict security boundaries, and shared validation across backend and frontend difficult to maintain.
Engineering Constraints
Engineering Constraints
Coordinating four decoupled NestJS services over Redis RPC while preserving end-to-end type safety, preventing refresh token replay, defending regex-based search against ReDoS, and enforcing strict IDOR ownership checks on property mutations.
System Architecture Flow
System Architecture Flow
Monorepo workspace separating an HTTP API Gateway from three Redis-backed microservices (Identity, Listing, and Inquiry), each structured in Clean Architecture layers (domain, application, infrastructure, presentation) and backed by MongoDB 7 and shared Zod contracts.
React 19 + Vite Client
Active StageNestJS API Gateway
Redis Transport & Shared Contracts
Identity, Listing & Inquiry Services
MongoDB 7 Persistence
React 19 + Vite Client
Handles property discovery on Leaflet maps, authenticated user dashboards, and optimistic UI queries via TanStack Query v5.
NestJS API Gateway
Exposes /api/v1/* REST endpoints with Helmet, Throttler rate limits, cookie JWT extraction, and ZodValidationPipe.
Redis Transport & Shared Contracts
Routes typed microservice commands and maps DomainError exceptions uniformly via @griya/nest-common.
Identity, Listing & Inquiry Services
Execute isolated business rules for token rotation, ReDoS-safe listing search, IDOR checks, and SMTP lead notifications.
MongoDB 7 Persistence
Stores User, RefreshToken, Listing, and Inquiry collections with Mongoose schemas and indexed query paths.
Execution & Failure-Mode Explorer
How the architecture behaves under real faults
The gateway extracts httpOnly cookie JWTs and routes commands over Redis to Identity and Listing services.
Key Engineering Contributions
Key Engineering Contributions
Built the NestJS 12 API Gateway with Swagger (/api/docs), ZodValidationPipe, ParseObjectIdPipe, Helmet, CORS, and Throttler rate-limiting. Implemented Identity, Listing, and Inquiry microservices with refresh token reuse detection, Firebase Admin OAuth verification, lifecycle states (draft, active, under_offer, sold), and SMTP seller notifications. Developed the React 19 + Vite 6 frontend with TanStack Query v5, Redux Toolkit, React Router v7, Leaflet maps, and Vitest/Playwright test coverage.
Reliability & Integrity Guarantees
Reliability & Integrity Guarantees
Enforced via shared Zod v4 boundary validation, DomainRpcInterceptor error mapping, ReDoS-safe regex escaping, Vitest unit/integration suites, Supertest gateway E2E tests, and Playwright browser verification.