datasynth_banking/lib.rs
1//! # synth-banking
2//!
3//! KYC/AML banking transaction generator for synthetic data.
4//!
5//! This crate provides comprehensive banking transaction simulation for:
6//! - Compliance testing and model training
7//! - AML/fraud detection system evaluation
8//! - KYC process simulation
9//! - Regulatory reporting testing
10//!
11//! ## Features
12//!
13//! - **Customer Generation**: Retail, business, and trust customers with realistic KYC profiles
14//! - **Account Generation**: Multiple account types with proper feature sets
15//! - **Transaction Engine**: Persona-based transaction generation with causal drivers
16//! - **AML Typologies**: Structuring, funnel accounts, layering, mule networks, and more
17//! - **Ground Truth Labels**: Multi-level labels for ML training
18//! - **Spoofing Mode**: Adversarial transaction generation for robustness testing
19//!
20//! ## Architecture
21//!
22//! The crate follows a layered architecture:
23//!
24//! ```text
25//! BankingOrchestrator (orchestration)
26//! ↓
27//! Generators (customer, account, transaction, counterparty)
28//! ↓
29//! Typologies (AML pattern injection)
30//! ↓
31//! Labels (ground truth generation)
32//! ↓
33//! Models (customer, account, transaction, KYC)
34//! ```
35//!
36//! ## Usage
37//!
38//! ```rust,ignore
39//! use datasynth_banking::{BankingOrchestrator, BankingConfig};
40//!
41//! let config = BankingConfig::default();
42//! let mut orchestrator = BankingOrchestrator::new(config, 12345);
43//!
44//! // Generate customers and accounts
45//! let customers = orchestrator.generate_customers();
46//! let accounts = orchestrator.generate_accounts(&customers);
47//!
48//! // Generate transaction stream
49//! let transactions = orchestrator.generate_transactions(&accounts);
50//! ```
51
52pub mod generators;
53pub mod labels;
54pub mod models;
55pub mod personas;
56pub mod typologies;
57
58mod config;
59mod orchestrator;
60
61pub use config::*;
62pub use orchestrator::*;
63
64// Re-export key types for convenience
65pub use datasynth_core::models::banking::{
66 AmlTypology, BankAccountType, BankingCustomerType, Direction, LaunderingStage,
67 MerchantCategoryCode, RiskTier, Sophistication, TransactionCategory, TransactionChannel,
68};
69pub use models::{BankAccount, BankTransaction, BankingCustomer, CounterpartyPool, KycProfile};