Skip to content

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/

FeatureImplementation
TLSLet's Encrypt (ACME) + custom certs
RoutingPath-based, Host-based, Header-based
Load BalancingRound-robin, least connections
Rate LimitingToken bucket (per IP, per tenant)
WAFModSecurity + OWASP CRS 3.3
ObservabilityOpenTelemetry → 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/

RealmClientsPurpose
real-estatereal-estate-api, operator-console, developer-console, edc-v, xroad, mcp-gatewayMain platform realm
masteradmin-cliKeycloak 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 metrics

API Endpoints:

  • GET /health - Health check
  • GET /api/info - API metadata
  • GET /api/v1/participants - List participants
  • POST /api/v1/participants - Create participant
  • GET /api/v1/assets - Search assets (EDC-V catalog)
  • POST /api/v1/contract-negotiations - Start negotiation
  • GET /api/v1/transfer-processes - Monitor transfers
  • GET /api/v1/real-estate/assets - Real estate assets
  • GET /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:

ComponentPortPurpose
Management API8081Asset, policy, contract definition CRUD
Control Plane8082Contract negotiation, transfer process control
Protocol Plane8083DSP 1.1 endpoint (multilateral)
Data Plane8084Data 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:

ToolDescriptionParameters
search_assetsSearch EDC-V catalogquery, filter, limit
get_asset_detailsGet asset metadataasset_id
initiate_negotiationStart contract negotiationasset_id, policy_id
get_transfer_statusCheck transfer progresstransfer_id
get_participant_infoGet participant detailsparticipant_id
search_real_estateSearch properties/projectscriteria
get_valuationGet automated valuationasset_id, method
check_complianceVerify compliance statusparticipant_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:

  1. Registration: Organization → KYC → Participant → Context
  2. Suspension: Context suspended → Assets hidden → Transfers blocked
  3. Decommission: Data export → Context deleted → Certificates revoked

Asset Catalog ​

Responsibility: Asset registration, discovery, metadata management

Asset Types:

TypeDescriptionEDC-V Mapping
datasetTabular/structured dataDataset
serviceAPI/websocket serviceService
documentPDF, contracts, reportsDocument
modelML model, valuation modelModel
real-estate-assetProperty, building, landCustom
real-estate-projectConstruction projectCustom

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    TERMINATED

Features:

  • 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:

TypeSourceDestinationUse Case
CONSUMERProviderConsumerData download
PROVIDERConsumerProviderData 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:

TablePartitioningRetention
participantsNonePermanent
assetsBy participant_context_idPermanent
contract_negotiationsBy month (TimescaleDB)7 years
transfer_processesBy month (TimescaleDB)7 years
audit_logsBy month (TimescaleDB)10 years
metricsBy hour (TimescaleDB)2 years
eventsBy day (TimescaleDB)1 year

Redis 7 Cluster ​

Topology: 3 masters + 3 replicas (6 nodes)

Databases:

DBPurposeTTL
0Sessions (Keycloak)24h
1API Rate Limits1m-1h
2Asset Cache5m
3Policy Cache1h
4Search Results10m
5WebSocket Pub/SubN/A

MinIO (S3-Compatible) ​

Configuration: 4 nodes, erasure coding (2:2), versioning enabled

Buckets:

BucketPurposeLifecycle
real-estate-assetsAsset data files7 years
documentsContracts, reports, KYC10 years
backupsDatabase backups90 days
ml-modelsValuation modelsPermanent
audit-exportsCompliance exports10 years

Apache Kafka 3.6 ​

Topology: 3 brokers, KRaft mode, tiered storage (S3)

Topics:

TopicPartitionsRetentionCompaction
participant.events127 daysKey
asset.events2430 daysKey
contract.events127 yearsKey
transfer.events247 yearsKey
audit.events610 yearsKey
metrics.raw482 daysNo
notifications127 daysNo

Next: Data Flow for message flows, or Deployment for deployment guides.