System Architecture
Modules
| Module | Port | Purpose |
|---|---|---|
| admin-api (PMS) | 8080 | Manage SDUI, pricing rules, partners, listings, offers |
| crs | 8080 | Search, detail, offers, AI search, sales intelligence |
| website | 8080 | Customer-facing APIs with traffic context awareness |
| listing-core | — | Shared search, pricing, offer resolution logic |
| dao | — | JDBI DAOs, Redis OM, SDUI services |
| common | — | Entities, DTOs, enums, cache utilities |
| ai-search | — | RAG search for properties and listings |
| notification | — | Email, 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 ←