System Model
This file documents the architecture of the ORE Studio system. ORE Studio provides a graphical interface and data management for Open Source Risk Engine (ORE).
ORE Studio is a C++-23 application providing persistent storage, graphical user interface, and orchestration tools for quantitative risk analysis using ORE. The system is built on a layered architecture with clear separation of concerns. The objective of this page is to describe the system architecture.
To operate on the system architecture, see the System Architect skill.
System Architecture
Diagram:
The system is organised into four architectural layers:
Foundation Layer
- ores.utility: UUID generation, base32/base64 encoding, string conversion, faker utilities. No ores dependencies.
- ores.platform: Filesystem utilities, environment variables, network info, cross-platform time utilities. Depends on: utility.
- ores.logging: Core logging infrastructure with Boost.Log integration, logger factory, severity levels. Depends on: platform.
- ores.telemetry: Extends logging with distributed tracing (trace_id, span_id), OpenTelemetry integration, log record export. Depends on: logging, platform.
- ores.database: PostgreSQL connectivity, connection pooling, health monitoring, repository helpers. Depends on: telemetry, utility.
- ores.variability: Feature flags and runtime configuration management.
- ores.geo: IP-to-location geolocation using MaxMind GeoLite2-City database. Provides country, city, and coordinate lookups for session tracking.
- ores.sql: Postgres Database setup.
- ores.security: Shared security primitives for cryptography (password hashing with scrypt, AES-256-GCM encryption) and validation (password policy, email format). Used by ores.iam and ores.connections.
- ores.codegen: Basic code-generation utility.
- Dependency order: utility → platform → logging → telemetry → database.
Infrastructure Layer
- ores.nats: NATS-based messaging for all inter-service and client-server communication. Provides request/reply, pub/sub, and JetStream (durable persistent messaging). Replaced the old ores.comms binary protocol stack.
- ores.testing: Catch2 integration with database isolation and logging listeners.
- ores.eventing: Event-driven architecture with in-process publish/subscribe event bus, PostgreSQL LISTEN/NOTIFY integration, and entity change notifications.
- ores.assets: Asset management for images and visual resources. Binary image storage, hierarchical tagging, currency-to-image linking, messaging handlers (0x4000-0x4FFF).
- ores.http: HTTP infrastructure for RESTful API support. JWT token parsing, claims extraction, authentication middleware support.
- ores.connections: Client-side server connection bookmark manager. Hierarchical folder organization, tag-based categorization, encrypted credential storage using AES-256-GCM with master password, SQLite local persistence.
- Depends on: Foundation (telemetry, database).
Domain Layer
- ores.refdata: ORE domain model with XML/CSV/JSON I/O and temporal versioning.
- ores.iam: User authentication, authorisation, and session management.
- ores.fpml: Financial Products Markup Language (FPML) processing infrastructure for handling derivatives and securities trade representations.
- ores.ore: ORE (Open Source Risk Engine) specific code, mainly importing and exporting capabilities.
- ores.trading: Trade booking and lifecycle management. FSM-enforced trade status (new, live, expired, cancelled), full activity type taxonomy (~30 types across five categories), temporal versioning, and message API. Depends on: refdata, fpml, dq.
- Depends on: Foundation, Infrastructure
Application Layer
- ores.shell: REPL client. Connects to the service layer via NATS request/reply subjects.
- ores.cli: Command-line import/export of entities in multiple formats, exercises the database layer directly.
- ores.qt: Desktop GUI with MDI interface for visual data management.
- ores.http.server: RESTful HTTP API server for ORE Studio. Alternative to NATS for web clients and integrations.
- ores.wt: Web application built with Wt framework for browser-based access. Account management, currency operations, system settings via web UI.
- Depends on: All layers
Useful Pages
- To understand the binary protocol, see the Protocol Reference.
- To understand how we generate PlantUML diagrams see the PlantUML Modeler skill.
- To understand how to add new domain types, see the Domain Type Creator skill.
- To understand unit testing, see the Unit Test Writer skill.
General information
- For detailed component documentation, see the individual components.
- API documentation: https://orestudio.github.io/OreStudio/doxygen/html/index.html
- Source code: https://github.com/OreStudio/OreStudio
- Project website: https://orestudio.github.io/OreStudio
This project has no affiliation with Acadia, Open Source Risk Engine, or QuantLib. See Doxygen documentation for full context.
| Previous: Documentation |
