- Overview
- Core Design Principles
- System Architecture
- Core Components
- Package Management
- Configuration System
- Core Libraries
- Data Flow & Processing
- SR2025 Compliance
- Technology Stack
- Performance Architecture
- Deployment Architecture
- Monitoring & Observability
Reframe v3.1.1 is an enterprise-grade bidirectional SWIFT MT ↔ ISO 20022 transformation engine built in Rust. This release introduces a unified package-based architecture with configuration-driven design, providing financial institutions with a transparent, high-performance, and fully auditable message transformation solution.
- Package-Based Architecture: External workflow packages with reframe-package.json configuration
- Configuration-Driven: Runtime configuration via reframe.config.json with environment variable overrides
- Unified Transformation Engine: Single bidirectional engine handling both MT→MX and MX→MT transformations
- GraphQL API: Query transformation history with custom fields support
- Custom Fields: Package-specific computed fields using JSONLogic expressions
- Database Integration: MongoDB persistence with audit trail
- Metadata Support: User-provided metadata for workflow customization
- Hot-Reload Capability: Update workflows without service restart
- Simplified API: Unified endpoints with automatic message detection
- SR2025 Compliance: Full implementation of SWIFT's November 2025 standards release
- All transformation logic externalized in human-readable JSON
- Package-based workflow organization
- Full audit trail for compliance and debugging
- No proprietary black boxes or hidden logic
- Sub-millisecond transformation latency
- Rust-powered for memory safety and speed
- Async runtime with Tokio for concurrent processing
- Zero-copy parsing where possible
- External package-based workflow system
- Runtime configuration via reframe.config.json
- Environment variable overrides for deployment flexibility
- Hot-reloadable workflow configurations
- Declarative transformation pipelines
- JSONLogic-based business rules
- Version-controlled configuration
- Visual workflow representation
- Unified engine for both directions
- Automatic message format detection
- Symmetric transformation capabilities
- Consistent handling of edge cases
- Production-grade error handling
- Comprehensive monitoring and metrics
- Container-native deployment
- Horizontal scaling support
graph TB
subgraph "External Systems"
CLIENT[REST API Clients]
WEB[Web Applications]
CLI[CLI Tools]
end
subgraph "API Gateway Layer"
HTTP[Axum HTTP Server<br/>REST API v3.1.1]
AUTH[Authentication]
end
subgraph "Processing Core"
ROUTER[Intelligent Message Router<br/>Auto Format Detection]
subgraph "Unified Engines"
TRANSFORM_ENGINE[Transform Engine<br/>Bidirectional MT ↔ MX]
GENERATION_ENGINE[Generation Engine<br/>Sample Messages]
VALIDATION_ENGINE[Validation Engine<br/>Message Compliance]
end
end
subgraph "Message Processing"
subgraph "Parsers"
PARSE_MT[MT Parser<br/>SWIFT MT Format]
PARSE_MX[MX Parser<br/>ISO 20022 XML]
end
subgraph "Publishers"
PUB_MT[MT Publisher<br/>Generate MT]
PUB_MX[MX Publisher<br/>Generate XML]
end
subgraph "Generators"
SAMPLE_GEN[Sample Generator<br/>Test Data Creation]
BAH_GEN[BAH Generator<br/>Business Headers]
end
end
subgraph "Workflow Engine"
DATAFLOW[Dataflow-rs<br/>Pipeline Orchestration]
DATALOGIC[Datalogic-rs<br/>Business Logic]
VALIDATOR[SR2025 Validator<br/>Compliance Rules]
end
subgraph "Package Management"
PKG_MGR[Package Manager<br/>Discovery & Loading]
subgraph "External Package"
PKG_CONFIG[reframe-package.json<br/>Package Configuration]
WF_TRANSFORM[Transform Workflows<br/>Bidirectional Rules]
WF_GENERATE[Generate Workflows<br/>Sample Creation]
WF_VALIDATE[Validate Workflows<br/>Compliance Checks]
SCENARIOS[Test Scenarios<br/>Sample Data]
end
end
subgraph "Configuration"
CONFIG[reframe.config.json<br/>Runtime Configuration]
ENV_VARS[Environment Variables<br/>Deployment Overrides]
end
subgraph "Observability"
LOGS[Structured Logging<br/>tracing/env_logger]
METRICS[Prometheus Metrics]
HEALTH[Health Checks]
end
%% Connections
CLIENT --> HTTP
WEB --> HTTP
CLI --> HTTP
HTTP --> AUTH
AUTH --> ROUTER
ROUTER -->|Auto-detect format| TRANSFORM_ENGINE
ROUTER -->|Generate request| GENERATION_ENGINE
ROUTER -->|Validate request| VALIDATION_ENGINE
TRANSFORM_ENGINE --> PARSE_MT
TRANSFORM_ENGINE --> PARSE_MX
TRANSFORM_ENGINE --> DATAFLOW
TRANSFORM_ENGINE --> PUB_MT
TRANSFORM_ENGINE --> PUB_MX
GENERATION_ENGINE --> SAMPLE_GEN
GENERATION_ENGINE --> DATAFLOW
VALIDATION_ENGINE --> PARSE_MT
VALIDATION_ENGINE --> PARSE_MX
VALIDATION_ENGINE --> DATAFLOW
DATAFLOW --> DATALOGIC
DATAFLOW --> VALIDATOR
DATAFLOW --> WF_TRANSFORM
DATAFLOW --> WF_GENERATE
DATAFLOW --> WF_VALIDATE
SAMPLE_GEN --> SCENARIOS
TRANSFORM_ENGINE --> PKG_MGR
GENERATION_ENGINE --> PKG_MGR
VALIDATION_ENGINE --> PKG_MGR
PKG_MGR --> PKG_CONFIG
PKG_MGR --> CONFIG
CONFIG --> ENV_VARS
ROUTER --> LOGS
DATAFLOW --> LOGS
HTTP --> METRICS
HTTP --> HEALTH
- Initializes Axum HTTP server
- Sets up unified route handlers
- Manages engine lifecycle
- Loads configuration from reframe.config.json
- Unified Transform Handler: Auto-detects message format and direction
- Generate Handler: Creates sample messages for testing
- Validate Handler: Validates MT and MX messages
- Admin Handlers: Workflow reload and package management
- Request validation with metadata support
- Response formatting and error handling
- Package discovery and loading from reframe.config.json
- Package validation and version compatibility
- Configuration management with environment variable overrides
- Runtime package information and metadata
- Transform Engine: Unified bidirectional MT ↔ ISO 20022 transformations
- Generation Engine: Sample message creation for both MT and MX
- Validation Engine: Message compliance checking for both formats
- Workflow orchestration using dataflow-rs
- Hot-reload capability without service restart
- Package-based workflow loading
- MT Parser (
src/parse_mt.rs): Custom SWIFT MT parser with field validation - MX Parser (
src/parse_mx.rs): ISO 20022 XML parsing with schema validation - Validation Helpers (
src/validation_helpers.rs): Common validation utilities
- MX Generator (
src/mx_generator.rs): JSON to ISO 20022 XML conversion - MT Generator (
src/mt_generator.rs): Structured data to SWIFT MT format - Sample Generator (
src/sample_generator.rs): Test data creation using datafake-rs
- MT Publisher (
src/publish_mt.rs): Format and publish MT messages - MX Publisher (
src/publish_mx.rs): Format and publish MX messages with proper namespaces
- Package-specific computed fields using JSONLogic expressions
- Three storage strategies: precompute, runtime, and hybrid
- Field evaluation at storage and query time
- Error handling with graceful degradation
- MongoDB Client (
mongodb.rs): Audit trail persistence with custom field support - Conversion Utilities (
conversion.rs): Message to/from database document conversion - Custom field filtering and querying
- Transaction history and analytics
- Schema (
schema.rs): GraphQL query and mutation definitions - Types (
types.rs): GraphQL types with custom fields support - Message querying with filters and pagination
- Package-specific custom field resolvers
- Load test scenarios from package
- Generate realistic test data
- Support for multiple message variants
- Swagger/OpenAPI spec generation with runtime configuration
- Interactive API documentation
- Request/response examples
- Configurable server URLs and metadata
- Common data structures and types
- Request/response models with metadata support
- AppState with three unified engines
- Error types for structured error handling
External packages follow this standardized structure:
reframe-package-swift-cbpr/
├── reframe-package.json # Package configuration
├── transform/
│ ├── index.json # Unified workflow index
│ ├── outgoing/ # MT → MX transformations
│ │ ├── parse-mt.json
│ │ ├── MT103/
│ │ │ ├── bah-mapping.json
│ │ │ ├── document-mapping.json
│ │ │ ├── precondition.json
│ │ │ └── postcondition.json
│ │ └── combine-xml.json
│ └── incoming/ # MX → MT transformations
│ ├── parse-mx.json
│ └── pacs008/
│ ├── 01-variant-detection.json
│ ├── 02-preconditions.json
│ └── ...
├── generate/
│ ├── index.json
│ ├── generate-mt.json
│ └── generate-mx.json
├── validate/
│ ├── index.json
│ ├── validate-mt.json
│ └── validate-mx.json
└── scenarios/
├── index.json
├── outgoing/
│ └── mt103_to_pacs008_cbpr_standard.json
└── incoming/
└── pacs008_to_mt103_cbpr_standard.json
reframe-package.json:
{
"id": "swift-cbpr-mt-mx",
"name": "SWIFT CBPR+ MT <-> MX Transformations - SR2025",
"version": "2.0.0",
"description": "Official SWIFT CBPR+ transformations",
"author": "Plasmatic Team",
"license": "Apache-2.0",
"engine_version": "3.1.1",
"required_plugins": ["swift-mt-message", "mx-message"],
"workflows": {
"transform": {
"path": "transform",
"description": "Unified bidirectional transformation workflows",
"entry_point": "index.json"
},
"generate": {
"path": "generate",
"description": "Sample message generation",
"entry_point": "index.json"
},
"validate": {
"path": "validate",
"description": "Message validation workflows",
"entry_point": "index.json"
}
},
"scenarios": {
"path": "scenarios",
"description": "Test scenarios",
"entry_point": "index.json"
}
}reframe.config.json (project root):
{
"packages": [
{
"path": "../reframe-package-swift-cbpr",
"enabled": true
}
],
"server": {
"host": "0.0.0.0",
"port": 3000,
"runtime": {
"tokio_worker_threads": "auto",
"thread_name_prefix": "reframe-worker"
}
},
"logging": {
"format": "compact",
"level": "info",
"show_target": false,
"show_thread": false,
"show_file_location": false,
"show_span_events": false,
"file_output": {
"enabled": false,
"directory": "./logs",
"file_prefix": "reframe",
"rotation": "daily"
}
},
"api_docs": {
"enabled": true,
"title": "Reframe API",
"version": "3.1.1",
"description": "Enterprise-grade bidirectional SWIFT MT ↔ ISO 20022 transformation service",
"contact": {
"name": "Plasmatic Team",
"email": "enquires@goplasmatic.io"
},
"license": {
"name": "Apache 2.0",
"identifier": "Apache-2.0",
"url": "https://opensource.org/license/apache-2-0"
},
"external_docs_url": "https://sandbox.goplasmatic.io",
"server_url": "http://localhost:3000"
},
"defaults": {
"package_id": null,
"package_path": "../reframe-package-swift-cbpr"
}
}Configuration values are resolved in this order (highest to lowest priority):
- Environment Variables (highest priority)
- reframe.config.json file
- Built-in Defaults (lowest priority)
| Variable | Description | Default |
|---|---|---|
REFRAME_PACKAGE_PATH |
Path to workflow package | ../reframe-package-swift-cbpr |
TOKIO_WORKER_THREADS |
Async runtime worker threads | CPU count |
API_SERVER_URL |
OpenAPI server URL override | http://localhost:3000 |
RUST_LOG |
Logging level | info |
- Purpose: JSON-based workflow orchestration
- Features:
- Declarative pipeline definitions
- Conditional routing
- Data transformation operators
- Error handling and recovery
- Purpose: JSONLogic implementation for business rules
- Features:
- Complex conditional evaluation
- Variable substitution
- Mathematical operations
- String manipulation
- Purpose: Realistic test data generation
- Features:
- Faker.js compatible API
- Custom generators
- Locale support
- Reproducible data with seeds
- Purpose: SWIFT MT message handling
- Version: 3.0+
- Features:
- All MT message types
- Field validation
- Block structure parsing
- SR2025 compliance
- Purpose: ISO 20022 message handling
- Version: 3.0+
- Features:
- Complete message catalog
- XML serialization/deserialization
- Schema validation
- BAH v3 support
sequenceDiagram
participant Client
participant Router
participant Transform Engine
participant Parser (MT/MX)
participant Workflow Engine
participant Publisher (MX/MT)
Client->>Router: POST /api/transform
Note over Router: Auto-detect format<br/>from message content
Router->>Transform Engine: Route message
Transform Engine->>Parser (MT/MX): Parse message
Parser (MT/MX)-->>Transform Engine: Structured data
Note over Transform Engine: Set metadata<br/>including user metadata
Transform Engine->>Workflow Engine: Execute transformation
Note over Workflow Engine: Load appropriate workflows<br/>from package (outgoing/incoming)
Workflow Engine-->>Transform Engine: Transformed data
Transform Engine->>Publisher (MX/MT): Generate output
Publisher (MX/MT)-->>Client: Transformed message
User-provided metadata is merged into the workflow execution context:
{
"message": "<message content>",
"metadata": {
"priority": "high",
"custom_field": "value"
}
}The workflow can access these values:
{
"logic": {
"if": [
{"==": [{"var": "metadata.priority"}, "high"]},
"URGENT",
"NORMAL"
]
}
}-
Business Application Header v3
- Enhanced party identification
- Improved service level codes
- Extended priority options
-
Structured Remittance Information
- Creditor reference information
- Structured reference types
- Document adjustment details
-
Enhanced Data Quality
- Mandatory UETR (Unique End-to-end Transaction Reference)
- LEI (Legal Entity Identifier) support
- Improved address structures
-
New Message Types
- camt.105 - Billing report
- camt.106 - Investigation response
- camt.107 - Non-deliverable information
- Additional pain and pacs variants
-
Validation Enhancements
- Cross-field validation rules
- Business rule enforcement
- Format validation improvements
| Component | Technology | Version | Purpose |
|---|---|---|---|
| Language | Rust | 1.75+ | Core implementation |
| Async Runtime | Tokio | 1.47 | Asynchronous I/O |
| Web Framework | Axum | 0.8 | HTTP server |
| XML Processing | quick-xml | 0.38 | Fast XML parsing |
| JSON Processing | serde_json | 1.0 | JSON serialization |
| API Documentation | utoipa | 5.4 | OpenAPI generation |
| Logging | tracing/env_logger | Latest | Structured logging |
| Configuration | arc-swap | Latest | Lock-free config updates |
-
Async Processing
- Tokio runtime for non-blocking I/O
- Concurrent request handling
- Efficient resource utilization
- Automatic CPU core scaling
-
Engine Caching
- Pre-loaded workflow engines
- Arc-swap for zero-downtime reloads
- Shared engine state across threads
-
Zero-Copy Parsing
- Direct memory access for string operations
- Minimal allocations during parsing
- Reuse of buffers where possible
-
Configuration System
- Lock-free configuration reads with ArcSwap
- Hot-reload without service interruption
- Package-based workflow loading
The async runtime automatically scales with available CPU cores:
# Auto-detection (default, uses all CPU cores)
cargo run --release
# Explicit configuration
TOKIO_WORKER_THREADS=4 cargo run --release
# Low-resource environment
TOKIO_WORKER_THREADS=1 cargo run# Multi-stage build
FROM rust:1.75 as builder
# Build optimized binary
FROM debian:bookworm-slim
# Minimal runtime with only required libraries
# Non-root user execution
# Health check endpoint-
Docker Standalone
- Single container deployment
- Volume mounts for packages and config
- Environment-based configuration
-
Docker Compose
- Multi-container orchestration
- Service dependencies
- Network isolation
-
Kubernetes
- Horizontal pod autoscaling
- ConfigMaps for configuration and workflows
- Ingress controllers
- Service mesh integration
-
Cloud Native
- AWS ECS/Fargate
- Azure Container Instances
- Google Cloud Run
- OpenShift
- Horizontal Scaling: Stateless design allows linear scaling
- Load Balancing: Round-robin or least-connections
- Auto-scaling: Based on CPU/memory or request rate
- Geographic Distribution: Deploy close to users
GET /health
{
"status": "healthy",
"timestamp": "2025-10-14T10:00:00Z",
"engines": {
"transform": "ready",
"generation": "ready",
"validation": "ready"
},
"capabilities": [
"bidirectional_transformation",
"sample_generation",
"message_validation",
"workflow_reload"
],
"config": {
"thread_count": 8
}
}// Structured logging example
info!(
message_type = "MT103",
direction = "outgoing",
duration_ms = 5,
"Transformation completed successfully"
);Key metrics to monitor:
- Request throughput (requests/second)
- Transformation latency (milliseconds)
- Error rates by message type
- Engine workflow execution time
- Memory usage and GC pressure
POST /api/transform: Unified bidirectional transformation- Auto-detects message format (MT or MX)
- Supports optional
message_type_hintfor routing - Handles both MT → MX and MX → MT
- Accepts user metadata for workflow customization
POST /api/generate: Generate sample messages- Supports both MT and MX message types
- Uses scenarios from package
POST /api/validate: Validate messages- Auto-detects and validates MT or MX
- Returns validation status and errors
POST /admin/reload-workflows: Hot reload workflows from packageGET /api/packages: List loaded packages with detailsGET /health: Health check with engine statusGET /swagger-ui: Interactive API documentationGET /api-docs/openapi.json: OpenAPI specification
- Kafka/RabbitMQ integration
- Enhanced monitoring dashboard
- Multi-package support (beyond single default package)
- Real-time WebSocket notifications
- Plugin system for custom functions
- Multi-tenant support
- Cloud-native SaaS offering
- Performance optimization tools
- Real-time streaming transformations
- Machine learning for mapping suggestions
- Predictive error detection
- Cross-border payment optimization
Reframe v3.1.1 represents a significant advancement with its unified package-based architecture. The configuration-driven design with external packages provides:
- Scalability: From single instances to global deployments
- Maintainability: Clear separation of concerns and modular design
- Extensibility: Easy to add new message types via packages
- Observable: Comprehensive monitoring and debugging capabilities
- Secure: Multiple layers of security and compliance features
- Flexible: Runtime configuration without recompilation
For more information, see our other documentation:
- Configuration Guide - Detailed configuration options
- Installation Guide - Setup and deployment
- Custom Fields Guide - Package-specific computed fields and GraphQL API
- Message Formats - Supported messages