Appearance
System Components
Detailed specifications for each platform component.
API Gateway Layer
Traefik v3 (Reverse Proxy)
Purpose: TLS termination, routing, load balancing, WAF, rate limiting
Configuration: infrastructure/traefik/
| Feature | Implementation |
|---|---|
| TLS | Let's Encrypt (ACME) + custom certs |
| Routing | Path-based, Host-based, Header-based |
| Load Balancing | Round-robin, least connections |
| Rate Limiting | Token bucket (per IP, per tenant) |
| WAF | ModSecurity + OWASP CRS 3.3 |
| Observability | OpenTelemetry → Tempo, Prometheus metrics |
Key Middlewares:
yaml
# Rate limiting per tenant
- name: tenant-rate-limit
plugin:
rateLimit:
average: 1000
burst: 2000
sourceCriterion:
requestHeaderName: "X-Tenant-ID"Keycloak (Identity Provider)
Purpose: Authentication, authorization, federation, SSO
Configuration: infrastructure/keycloak/
| Realm | Clients | Purpose |
|---|---|---|
real-estate | real-estate-api, operator-console, developer-console, edc-v, xroad, mcp-gateway | Main platform realm |
master | admin-cli | Keycloak administration |
Authentication Flows:
- Browser Flow: Username/password → OTP → Terms → Profile
- Direct Grant: Resource owner password credentials (dev only)
- Client Credentials: Service-to-service (machine accounts)
- SAML 2.0: Enterprise federation
- OpenID Connect: Standard OIDC with PKCE
Custom Providers:
- SPI: Custom user storage (PostgreSQL sync)
- Event Listener: Audit logging to Kafka
- Protocol Mapper: Custom claims (participant_context_id, roles, quotas)
Core Services
Real Estate API
Technology: Node.js 22 + Fastify + TypeScript Port: 4000 (HTTP), 4001 (gRPC) Repository: apps/real-estate-api
Architecture:
src/
├── modules/
│ ├── participants/ # Participant & organization management
│ ├── assets/ # Asset catalog & discovery
│ ├── contracts/ # Contract negotiation & agreements
│ ├── transfers/ # Data transfer processes
│ ├── policies/ # ODRL policy management
│ ├── real-estate/ # Real estate domain (assets, projects)
│ ├── kyc/ # KYC & compliance
│ ├── financial/ # Payments, subscriptions, club deals
│ ├── valuation/ # Valuation engine
│ └── projects/ # Project management
├── shared/
│ ├── database/ # PostgreSQL connection pool
│ ├── cache/ # Redis client
│ ├── messaging/ # Kafka producer/consumer
│ ├── storage/ # MinIO client
│ ├── auth/ # Keycloak integration
│ └── validation/ # Zod schemas from @real-estate/shared-types
└── plugins/
├── swagger.ts # OpenAPI 3.1 generation
├── graphql.ts # GraphQL schema (Mercurius)
├── websocket.ts # WebSocket server (Socket.io)
└── metrics.ts # Prometheus metricsAPI Endpoints:
GET /health- Health checkGET /api/info- API metadataGET /api/v1/participants- List participantsPOST /api/v1/participants- Create participantGET /api/v1/assets- Search assets (EDC-V catalog)POST /api/v1/contract-negotiations- Start negotiationGET /api/v1/transfer-processes- Monitor transfersGET /api/v1/real-estate/assets- Real estate assetsGET /api/v1/projects- Real estate projects
EDC-V Connector
Technology: Java 21 + Spring Boot 3.x Ports: 8081 (Management), 8082 (Control), 8083 (Protocol) Repository: apps/edc-v (wraps Eclipse EDC)
Components:
| Component | Port | Purpose |
|---|---|---|
| Management API | 8081 | Asset, policy, contract definition CRUD |
| Control Plane | 8082 | Contract negotiation, transfer process control |
| Protocol Plane | 8083 | DSP 1.1 endpoint (multilateral) |
| Data Plane | 8084 | Data transfer (HTTP, S3, Kafka, etc.) |
Configuration:
yaml
edc:
vault: "hashicorp" # or "kubernetes", "filesystem"
keystore: "pkcs12"
participant-context-id: "${PARTICIPANT_CONTEXT_ID}"
dsp:
version: "1.1"
endpoint: "https://api.example.com/protocol"
data-plane:
public-url: "https://data.example.com"
token-signer: "jwt"Extensions:
- Real Estate Asset Types: Custom asset types for properties/projects
- X-Road Data Address: Custom data address type for X-Road exchange
- MCP Data Address: Custom data address for MCP tool exposure
- French Cadastre Adapter: Integration with French land registry
X-Road Security Server
Technology: Go 1.22 + X-Road 7.x Port: 4001 (internal), 5500 (external mTLS) Repository: apps/xroad-security-server
Architecture:
┌─────────────────┐ ┌─────────────────┐
│ Client App │────▶│ Security Server│
│ (Real Estate │ │ (This Instance)│
│ API) │ │ │
└─────────────────┘ └────────┬────────┘
│ mTLS (X-Road Protocol)
▼
┌─────────────────┐
│ Security Server│
│ (Counterparty) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Counterparty │
│ Service │
└─────────────────┘Configuration:
- Global Configuration: Downloaded from X-Road Center
- Local Configuration:
/etc/xroad/conf.d/local.ini - Certificates: Managed by Keycloak / cert-manager
- Services: Registered via X-Road Admin API
Supported Protocols:
- REST: JSON over HTTP (OpenAPI documented)
- SOAP: Legacy system integration
- Raw: Binary data transfer
MCP Gateway
Technology: Node.js 22 + TypeScript + MCP SDK Port: 4002 Repository: apps/mcp-gateway
Purpose: Expose platform capabilities as MCP tools for AI agents
Tools Exposed:
| Tool | Description | Parameters |
|---|---|---|
search_assets | Search EDC-V catalog | query, filter, limit |
get_asset_details | Get asset metadata | asset_id |
initiate_negotiation | Start contract negotiation | asset_id, policy_id |
get_transfer_status | Check transfer progress | transfer_id |
get_participant_info | Get participant details | participant_id |
search_real_estate | Search properties/projects | criteria |
get_valuation | Get automated valuation | asset_id, method |
check_compliance | Verify compliance status | participant_id, regulation |
Authentication: OAuth2 / API Key / Bearer token Transport: HTTP+SSE (Streamable HTTP) or stdio
Domain Services
Participant Management
Responsibility: Onboarding, lifecycle, roles, contexts
Key Entities:
- Organization: Legal entity (SIREN, address, KYC status)
- Participant: Actor within organization (role, status)
- ParticipantContext: EDC-V tenant (quotas, features, Keycloak client)
Workflows:
- Registration: Organization → KYC → Participant → Context
- Suspension: Context suspended → Assets hidden → Transfers blocked
- Decommission: Data export → Context deleted → Certificates revoked
Asset Catalog
Responsibility: Asset registration, discovery, metadata management
Asset Types:
| Type | Description | EDC-V Mapping |
|---|---|---|
dataset | Tabular/structured data | Dataset |
service | API/websocket service | Service |
document | PDF, contracts, reports | Document |
model | ML model, valuation model | Model |
real-estate-asset | Property, building, land | Custom |
real-estate-project | Construction project | Custom |
Discovery:
- Full-text search: Elasticsearch
- Faceted search: By type, region, price, status
- DSP Catalog Request: Standard DSP 1.1 protocol
Contract Negotiation
Responsibility: DSP negotiation protocol, state machine
States:
INITIAL → REQUESTED → OFFERED → ACCEPTED → AGREED → VERIFIED → FINALIZED
↓ ↓ ↓ ↓
ERROR REJECTED EXPIRED TERMINATEDFeatures:
- Multilateral DSP: Standard protocol
- Bilateral Custom: Direct negotiation
- Policy Templates: Pre-approved ODRL policies
- Callbacks: Webhook notifications on state changes
Data Transfer
Responsibility: Secure data exchange, provenance tracking
Transfer Types:
| Type | Source | Destination | Use Case |
|---|---|---|---|
CONSUMER | Provider | Consumer | Data download |
PROVIDER | Consumer | Provider | Data upload |
Protocols:
- HTTP/HTTPS: Direct download/upload
- S3: MinIO presigned URLs
- Kafka: Stream processing
- X-Road: Cross-organization
- MCP: AI agent tool calls
ODRL Policy Engine
Responsibility: Policy evaluation, obligation enforcement
Policy Types:
- Set: Reusable policy building blocks
- Offer: Data provider offers (permissions, prohibitions, duties)
- Request: Data consumer requests
Actions: use, read, write, execute, delete, transfer, publish, subscribe, aggregate, derive, transform
Constraints: Time, count, purpose, geography, recipient, annotation
Data Layer Services
PostgreSQL 16 + TimescaleDB
Schema: public (core), timescaledb (metrics), audit (immutable logs)
Key Tables:
| Table | Partitioning | Retention |
|---|---|---|
participants | None | Permanent |
assets | By participant_context_id | Permanent |
contract_negotiations | By month (TimescaleDB) | 7 years |
transfer_processes | By month (TimescaleDB) | 7 years |
audit_logs | By month (TimescaleDB) | 10 years |
metrics | By hour (TimescaleDB) | 2 years |
events | By day (TimescaleDB) | 1 year |
Redis 7 Cluster
Topology: 3 masters + 3 replicas (6 nodes)
Databases:
| DB | Purpose | TTL |
|---|---|---|
| 0 | Sessions (Keycloak) | 24h |
| 1 | API Rate Limits | 1m-1h |
| 2 | Asset Cache | 5m |
| 3 | Policy Cache | 1h |
| 4 | Search Results | 10m |
| 5 | WebSocket Pub/Sub | N/A |
MinIO (S3-Compatible)
Configuration: 4 nodes, erasure coding (2:2), versioning enabled
Buckets:
| Bucket | Purpose | Lifecycle |
|---|---|---|
real-estate-assets | Asset data files | 7 years |
documents | Contracts, reports, KYC | 10 years |
backups | Database backups | 90 days |
ml-models | Valuation models | Permanent |
audit-exports | Compliance exports | 10 years |
Apache Kafka 3.6
Topology: 3 brokers, KRaft mode, tiered storage (S3)
Topics:
| Topic | Partitions | Retention | Compaction |
|---|---|---|---|
participant.events | 12 | 7 days | Key |
asset.events | 24 | 30 days | Key |
contract.events | 12 | 7 years | Key |
transfer.events | 24 | 7 years | Key |
audit.events | 6 | 10 years | Key |
metrics.raw | 48 | 2 days | No |
notifications | 12 | 7 days | No |
Next: Data Flow for message flows, or Deployment for deployment guides.