Skip to main content

System Architecture

Modules

ModulePortPurpose
admin-api (PMS)8080Manage SDUI, pricing rules, partners, listings, offers
crs8080Search, detail, offers, AI search, sales intelligence
website8080Customer-facing APIs with traffic context awareness
listing-coreShared search, pricing, offer resolution logic
daoJDBI DAOs, Redis OM, SDUI services
commonEntities, DTOs, enums, cache utilities
ai-searchRAG search for properties and listings
notificationEmail, SMS, WhatsApp

Tech Stack

  • Java 25 + Spring Boot 4.0.3
  • PostgreSQL with pgvector for embeddings
  • Redis Stack (Redis OM Spring) for L2 cache
  • Caffeine for L1 local cache
  • JDBI 3 for data access (no JPA/Hibernate)
  • Spring AI with OpenAI for AI features
  • Liquibase for migrations
  • Scalar for API documentation

Data Flow

Request with Traffic Context

Browser → Website API

├─ BevCookieInterceptor
│ └─ Sets/reads bev cookie (1-year, HttpOnly)

├─ TrafficContextInterceptor
│ ├─ Fresh params? → Persist + cache
│ └─ No params? → Resolve from bev: L1 → L2 → DB

├─ Controller (SDUI / Listings / Offers)
│ └─ TrafficContext injected automatically

└─ Service Layer
├─ SDUI: Visibility rules evaluated against context
├─ Pricing: PricingContextService matches rules
└─ Offers: Filtered by PricingAdjustment

Caching Layers

L1 (Caffeine)          L2 (Redis OM)         DB (PostgreSQL)
5-min TTL 7-day TTL Permanent
Per-JVM Shared Source of truth
──────────── → miss → ──────────── → miss → ────────────
← fill ← ← fill ←