This repository contains a complete implementation of the CHECK24 Home Widgets Platform - a distributed, high-performance system that enables decentralized product teams to deliver personalized content to the CHECK24 Home experience across Web and Android platforms.
Key Features:
- β Server-Driven UI (SDUI) via JSON contracts
- β SWR caching
- β availability through circuit breakers
- β Real-time cache invalidation via Kafka + SSE
- β Personalization via user, dynamic layout by components (with ordering) and mixed widget grouping in components
- β Multi-platform support (Web/React, Android/Kotlin)
- β Zero client deploys for content/layout changes
Preview WebApp and Android App:
π CONCEPT.md - Complete technical specification for implementing the platform
What's Inside:
- System architecture & component specifications
- API contracts & data flows
- Performance & caching strategy (SWR pattern)
- High availability & resilience patterns
- Deployment architecture
- Decision rationale & trade-offs
π DEVELOPER_GUIDELINE.md - Integration guide for product teams
What's Inside:
- Quick start guide (5-minute setup)
- Widget JSON contract specification
- Required API endpoints
- Component types (Card, InfoBox, ProductGrid)
- Personalization strategies
- Testing & troubleshooting
Video URL: https://youtu.be/afz6HEtqgXk
Demo URL: https://check24-challenge-gamma.vercel.app/
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
β ββββββββββββββββ ββββββββββββββββ β
β β Web Client β β Android App β β
β β (React) β β (Kotlin) β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ β
βββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββ
β β
ββββββββββββββββββββ¬βββββββββββββββββββ
β HTTPS/JSON
βΌ
ββββββββββββββββββββββββββββββββββββββββ
β Core Service (BFF) β
β - FastAPI REST API β
β - Redis Cache (SWR Pattern) β
β - Kafka Consumer (Invalidation) β
β - Circuit Breaker Protection β
ββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββ
β Product Services Layer β
β - Car Insurance Service β
β - Health Insurance Service β
β - House Insurance Service β
β - Banking Service β
β Each with: PostgreSQL + Kafka β
ββββββββββββββββββββββββββββββββββββββββ
Core Design Principles:
- Server-Driven UI: JSON contracts enable zero-client-deploy updates
- Stale-While-Revalidate: Balance data freshness with service protection
- Circuit Breakers: Fail gracefully, isolate failures
- Event-Driven: Real-time cache invalidation via Kafka
- Decoupled Autonomy: Products control their widgets independently
.
βββ CONCEPT.md # Technical specification (Core teams)
βββ DEVELOPER_GUIDELINE.md # Integration guide (Product teams)
βββ README.md # This file
β
βββ docker-compose.yml # Local development setup
β
βββ core-service/ # BFF - Widget aggregator
β βββ app/
β β βββ main.py # FastAPI app
β β βββ api/home.py # Main API endpoints
β β βββ core/
β β β βββ cache.py # SWR caching logic
β β β βββ clients.py # Product service clients
β β β βββ models.py # Pydantic models
β β β βββ logging_config.py # Structured logging
β β βββ workers/
β β βββ kafka_consumer.py # Cache invalidation worker
β βββ Dockerfile
β βββ requirements.txt
β
βββ car-insurance-service/ # Product service example
β βββ app/
β β βββ main.py # FastAPI app
β β βββ core/
β β βββ logging_config.py
β βββ db_init/init.sql # Database schema + seed data
β βββ Dockerfile
β βββ requirements.txt
β
βββ health-insurance-service/ # Product service
βββ house-insurance-service/ # Product service
βββ banking-service/ # Product service
β
βββ web-client/ # React frontend
β βββ src/
β β βββ components/
β β β βββ widgets/ # Widget renderers
β β β βββ layout/ # Header, Footer, Navigation
β β βββ pages/HomePage.jsx # Main home page
β β βββ contexts/ # React context (notifications)
β β βββ utils/imageLoader.js # Asset URL resolver
β β βββ styles/ # CSS modules
β βββ package.json
β βββ vite.config.js
β
βββ android-client/ # Kotlin + Jetpack Compose
βββ app/src/main/
β βββ kotlin/
β β βββ data/
β β β βββ api/ApiService.kt
β β β βββ model/Models.kt
β β β βββ repository/Check24Repository.kt
β β βββ ui/
β β β βββ components/ # Composable widgets
β β β βββ screens/HomeScreen.kt
β β β βββ theme/ # Material 3 theme
β β βββ MainActivity.kt
β βββ res/
βββ build.gradle.kts
βββ settings.gradle.kts
- Docker 20.10+ & Docker Compose 2.0+
- Python 3.12+ (for local development)
- Node.js 18+ (for web client)
- Android Studio (for Android app)
# Clone repository
git clone
# Start infrastructure + services
docker-compose up -d
# Verify all services are healthy
docker-compose psExpected Output:
NAME STATUS PORTS
core-service Up 0.0.0.0:8000->8000/tcp
car-insurance Up 0.0.0.0:8001->8000/tcp
health-insurance Up 0.0.0.0:8002->8000/tcp
house-insurance Up 0.0.0.0:8003->8000/tcp
banking-service Up 0.0.0.0:8004->8000/tcp
redis Up 0.0.0.0:6379->6379/tcp
kafka Up 0.0.0.0:9092->9092/tcp
zookeeper Up 0.0.0.0:2181->2181/tcp
# Fetch home widgets
curl http://localhost:8000/home | jq
# Expected: JSON with services (car_insurance, health_insurance, etc.)cd web-client
npm install
npm run dev
# Open http://localhost:5173cd android-client
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk
# Launch app on device/emulator# Create car insurance contract
curl -X POST http://localhost:8001/widget/car-insurance/contract \
-H "Content-Type: application/json" \
-d '{"user_id": 123, "widget_id": "car_offer_devk"}'
# Verify cache invalidation
curl http://localhost:8000/home | jq '.services.car_insurance.widgets | length'
# Expected: 0 (widgets hidden after purchase)# Core Service
curl http://localhost:8000/health
# Product Services
curl http://localhost:8001/health # Car Insurance
curl http://localhost:8002/health # Health Insurance
curl http://localhost:8003/health # House Insurance
curl http://localhost:8004/health # BankingCore Service (core-service/.env):
REDIS_HOST=redis
REDIS_PORT=6379
KAFKA_BROKER=kafka:9093
CAR_INSURANCE_SERVICE_URL=http://car-insurance-service:8000
HEALTH_INSURANCE_SERVICE_URL=http://health-insurance-service:8000
HOUSE_INSURANCE_SERVICE_URL=http://house-insurance-service:8000
BANKING_SERVICE_URL=http://banking-service:8000Product Service (car-insurance-service/.env):
DB_HOST=product-db-car
DB_USER=product_user
DB_PASSWORD=product_password
DB_NAME=car_insurance_db
KAFKA_BROKER=kafka:9093
CORE_SERVICE_URL=http://core-service:8000# core-service/app/core/cache.py
TTL = timedelta(hours=1) # Cache lifetime
SWR_GRACE_PERIOD = timedelta(minutes=5) # Stale-but-usable period# core-service/app/core/clients.py
FAILURE_THRESHOLD = 5 # Open circuit after 5 failures
RESET_TIMEOUT = 10 # Try again after 10 secondsSolution:
# Check Docker resources
docker system df
# Clean up old containers
docker-compose down -v
docker-compose up -d --buildDebug:
# Check Kafka messages
docker exec kafka kafka-console-consumer \
--bootstrap-server localhost:9092 \
--topic user.car.insurance.purchased \
--from-beginning
# Manually invalidate cache
curl -X POST http://localhost:8000/cache/invalidateDebug:
# Check Core Service logs
docker logs core-service | grep "ERROR"
# Check circuit breaker state
curl http://localhost:8000/debug/circuit-breaker-status
# Test product service directly
curl http://localhost:8001/widget/car-insuranceThis project was created as part of the CHECK24 GenDev IT Scholarship application (Submission December 2025).
Key Technologies:
- FastAPI (Python web framework)
- Redis (Caching layer)
- Kafka (Event streaming)
- PostgreSQL (Data persistence)
- React (Web frontend)
- Kotlin + Jetpack Compose (Android app)
- Docker (Containerization)
Last Updated: December 21, 2025
Version: 1.1.0
Status: PoC



