┌─────────────────────────────────────────────────────────────────────────────┐
│ Frontend Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ Next.js App (SSR/SSG) │ Real-time Dashboard │ Mobile PWA │
│ - Client Components │ - SSE Connections │ - Offline Support │
│ - Server Components │ - Dynamic UI Updates │ - Push Notifications │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────────────────────┐
│ API Gateway Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ Nginx + Easegress API Gateway │
│ - Load Balancing │ - Rate Limiting │ - SSL Termination │
│ - Authentication │ - Request Routing │ - API Versioning │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────────────────────┐
│ Microservices Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ Account Service │ Transaction Service │ Payment Service │ Rule Engine Service│
│ Card Service │ Balance Service │ Fee Service │ Notification Service│
│ Customer Service│ Audit Service │ Report Service │ Alert Service │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────────────────────┐
│ Message & Streaming Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ NATS (JetStream) Message Queue System │
│ - Event Streaming │ - Message Persistence │ - Dead Letter Queue │
│ - Transaction Events │ - Payment Events │ - Balance Updates │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────────────────────┐
│ Data Layer │
├─────────────────────────────────────────────────────────────────────────────┤
│ PostgreSQL (OLTP) │ ClickHouse (OLAP) │ Redis (Cache) │
│ - Transactional Data │ - Analytics Data │ - Session Storage │
│ - ACID Compliance │ - Time Series Data │ - Real-time Balances │
│ - Materialized Views │ - Audit Logs │ - Rule Cache │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────────────────────┐
│ Configuration & Service Discovery │
├─────────────────────────────────────────────────────────────────────────────┤
│ etcd Cluster │
│ - Service Discovery │ - Configuration Mgmt │ - Leader Election │
│ - Feature Flags │ - Circuit Breaker │ - Health Monitoring │
└─────────────────────────────────────────────────────────────────────────────┘customers:
- customer_id (UUID, PK)
- customer_number (VARCHAR, UNIQUE)
- first_name (VARCHAR)
- last_name (VARCHAR)
- email (VARCHAR, UNIQUE)
- phone (VARCHAR)
- date_of_birth (DATE)
- status (ENUM: active, suspended, closed)
- kyc_status (ENUM: pending, verified, rejected)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)
- created_by (UUID)
- updated_by (UUID)accounts:
- account_id (UUID, PK)
- customer_id (UUID, FK -> customers.customer_id)
- account_number (VARCHAR, UNIQUE)
- account_type (ENUM: checking, savings, credit, wallet)
- currency (VARCHAR(3))
- status (ENUM: active, frozen, closed)
- available_balance (DECIMAL(20,4))
- pending_balance (DECIMAL(20,4))
- credit_limit (DECIMAL(20,4))
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)
- last_transaction_at (TIMESTAMP)cards:
- card_id (UUID, PK)
- account_id (UUID, FK -> accounts.account_id)
- card_number_hash (VARCHAR)
- card_type (ENUM: debit, credit, prepaid)
- card_status (ENUM: active, blocked, expired)
- expiry_date (DATE)
- daily_limit (DECIMAL(20,4))
- monthly_limit (DECIMAL(20,4))
- pin_attempts (INTEGER)
- created_at (TIMESTAMP)
- last_used_at (TIMESTAMP)transactions:
- transaction_id (UUID, PK)
- account_id (UUID, FK -> accounts.account_id)
- related_transaction_id (UUID, FK -> transactions.transaction_id)
- transaction_type (ENUM: debit, credit, fee, reversal)
- amount (DECIMAL(20,4))
- currency (VARCHAR(3))
- status (ENUM: pending, posted, archived, failed)
- description (TEXT)
- reference_number (VARCHAR, UNIQUE)
- merchant_info (JSONB)
- posting_date (DATE)
- transaction_date (TIMESTAMP)
- created_at (TIMESTAMP)
- posted_at (TIMESTAMP)
- archived_at (TIMESTAMP)payments:
- payment_id (UUID, PK)
- from_account_id (UUID, FK -> accounts.account_id)
- to_account_id (UUID, FK -> accounts.account_id)
- payment_type (ENUM: transfer, payment, topup)
- amount (DECIMAL(20,4))
- currency (VARCHAR(3))
- status (ENUM: initiated, processing, completed, failed, reversed)
- payment_method (ENUM: card, bank_transfer, wallet)
- reference_number (VARCHAR, UNIQUE)
- external_reference (VARCHAR)
- scheduled_at (TIMESTAMP)
- processed_at (TIMESTAMP)
- created_at (TIMESTAMP)rules:
- rule_id (UUID, PK)
- rule_name (VARCHAR)
- rule_type (ENUM: fee, limit, validation, alert)
- rule_category (VARCHAR)
- conditions (JSONB)
- actions (JSONB)
- priority (INTEGER)
- effective_from (TIMESTAMP)
- effective_till (TIMESTAMP)
- status (ENUM: active, inactive, draft)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)
rule_executions:
- execution_id (UUID, PK)
- rule_id (UUID, FK -> rules.rule_id)
- entity_type (VARCHAR)
- entity_id (UUID)
- input_data (JSONB)
- output_data (JSONB)
- execution_time_ms (INTEGER)
- executed_at (TIMESTAMP)fee_tiers:
- tier_id (UUID, PK)
- tier_name (VARCHAR)
- tier_type (ENUM: customer, account, transaction)
- effective_from (TIMESTAMP)
- effective_till (TIMESTAMP)
- created_at (TIMESTAMP)
fee_structures:
- fee_structure_id (UUID, PK)
- tier_id (UUID, FK -> fee_tiers.tier_id)
- transaction_type (VARCHAR)
- fee_type (ENUM: flat, percentage, tiered)
- flat_amount (DECIMAL(20,4))
- percentage_rate (DECIMAL(10,6))
- minimum_fee (DECIMAL(20,4))
- maximum_fee (DECIMAL(20,4))
- currency (VARCHAR(3))transaction_analytics:
- transaction_id (String)
- account_id (String)
- customer_id (String)
- transaction_type (String)
- amount (Decimal64(4))
- currency (String)
- merchant_category (String)
- location (String)
- timestamp (DateTime64)
- processing_time_ms (UInt32)
- status (String)
- date (Date)
- hour (UInt8)balance_history:
- account_id (String)
- balance_date (Date)
- balance_timestamp (DateTime64)
- available_balance (Decimal64(4))
- pending_balance (Decimal64(4))
- currency (String)
- change_amount (Decimal64(4))
- change_reason (String)Key: "balance:{account_id}"
Type: Hash
Fields:
- available: "1000.50"
- pending: "150.25"
- last_updated: "1640995200"
- currency: "USD"Key: "rules:{rule_type}:{entity_id}"
Type: String (JSON)
TTL: 3600 seconds (1 hour)Key: "session:{session_id}"
Type: Hash
TTL: 1800 seconds (30 minutes)Responsibilities:
Key Features:
Responsibilities:
Key Features:
Responsibilities:
Key Features:
Responsibilities:
Key Features:
Responsibilities:
Key Features:
// Account Service
service AccountService {
rpc GetAccount(GetAccountRequest) returns (Account);
rpc UpdateBalance(UpdateBalanceRequest) returns (BalanceResponse);
rpc GetRealTimeBalance(GetBalanceRequest) returns (stream BalanceUpdate);
}
// Transaction Service
service TransactionService {
rpc CreateTransaction(CreateTransactionRequest) returns (Transaction);
rpc PostTransaction(PostTransactionRequest) returns (TransactionResponse);
rpc GetTransactionHistory(GetHistoryRequest) returns (stream Transaction);
}
// Rule Engine Service
service RuleEngineService {
rpc EvaluateRules(EvaluateRulesRequest) returns (RuleEvaluationResponse);
rpc CreateRule(CreateRuleRequest) returns (Rule);
rpc GetActiveRules(GetActiveRulesRequest) returns (stream Rule);
}// Transaction Events
transactions.created.{account_id}
transactions.posted.{account_id}
transactions.failed.{account_id}
// Balance Events
balances.updated.{account_id}
balances.insufficient.{account_id}
// Payment Events
payments.initiated.{payment_id}
payments.completed.{payment_id}
payments.failed.{payment_id}
// Rule Events
rules.evaluated.{rule_id}
rules.triggered.{entity_type}.{entity_id}
// System Events
alerts.generated.{severity}
system.health.{service_name}// Real-time balance updates
/api/sse/balance/{accountId}
// Transaction status updates
/api/sse/transactions/{transactionId}
// System alerts
/api/sse/alerts/{userId}JetStream Configuration:
- Retention: WorkQueue for transactions
- Retention: Interest for notifications
- Max Age: 7 days for audit events
- Replicas: 3 for high availability// Transaction Event
{
"event_type": "transaction.created",
"timestamp": "2024-01-01T12:00:00Z",
"account_id": "uuid",
"transaction_id": "uuid",
"amount": "100.50",
"currency": "USD",
"metadata": {}
}
// Balance Update Event
{
"event_type": "balance.updated",
"timestamp": "2024-01-01T12:00:00Z",
"account_id": "uuid",
"previous_balance": "1000.00",
"new_balance": "900.50",
"change_reason": "transaction"
}// Hierarchical key structure
fintech:accounts:{account_id}:balance
fintech:customers:{customer_id}:profile
fintech:rules:{rule_type}:active
fintech:fees:{tier_id}:structure
fintech:sessions:{session_id}:dataTransaction → NATS Event → Balance Service → Redis Update → SSE Push → UI Update{
"rule_id": "uuid",
"name": "Daily Transaction Limit",
"type": "validation",
"conditions": {
"account_type": "checking",
"daily_amount": {"$lte": 5000},
"transaction_count": {"$lte": 50}
},
"actions": {
"reject": true,
"message": "Daily limit exceeded"
},
"effective_from": "2024-01-01T00:00:00Z",
"effective_till": "2024-12-31T23:59:59Z"
}Metabase Dashboard → PostgreSQL/ClickHouse → Real-time Data SyncPostgreSQL → CDC → Kafka/NATS → ETL Service → ClickHouse → MetabaseMain Navigation:
├── Dashboard (Overview)
├── Accounts
│ ├── Account List
│ ├── Account Details
│ └── Balance History
├── Cards
│ ├── Card Management
│ ├── Card Limits
│ └── Card Transactions
├── Transactions
│ ├── Transaction History
│ ├── Pending Transactions
│ └── Transaction Search
├── Payments
│ ├── Make Payment
│ ├── Payment History
│ └── Scheduled Payments
├── Reports
│ ├── Financial Reports
│ ├── Analytics Dashboard
│ └── Custom Reports
├── Settings
│ ├── Rule Management
│ ├── Fee Configuration
│ └── System Settings
└── Administration
├── Customer Management
├── Alert Configuration
└── System Monitoring┌─────────────────────────────────────────────────────────────────────┐
│ FinTech Platform [User] [Settings]│
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Total Balance │ │ Active Cards │ │ Pending Trans │ │
│ │ $125,432.50 ↗ │ │ 12 cards │ │ 5 transactions │ │
│ │ +2.3% from last │ │ 2 blocked │ │ $2,450.00 │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Real-Time Transaction Stream │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ ⚡ Live Transactions [Auto-refresh]│ │ │
│ │ │ 12:45:32 - Card Payment -$45.99 [POSTED] │ │ │
│ │ │ 12:44:15 - ATM Withdrawal -$100.00 [PENDING] │ │ │
│ │ │ 12:43:01 - Online Transfer +$500.00 [POSTED] │ │ │
│ │ │ 12:42:33 - Fee Charge -$2.50 [POSTED] │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │
│ │ Quick Actions │ │ Balance Trend Chart │ │
│ │ [Make Payment] │ │ $130K ┌─────────────────────────────┐ │ │
│ │ [Transfer] │ │ │ ╭─╮ │ │ │
│ │ [Add Card] │ │ $125K │ ╭─╯ ╰─╮ │ │ │
│ │ [View Reports] │ │ │ ╭─╯ ╰─╮ │ │ │
│ │ │ │ $120K │╭─╯ ╰─╮ │ │ │
│ │ System Status: │ │ └─────────────────────────────┘ │ │
│ │ 🟢 All Systems │ │ 7 days 30 days 90 days │ │
│ │ Operational │ │ │ │
│ └─────────────────┘ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Accounts > Account Details [Search] [+ New] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Account: CHK-2024-001234 Status: 🟢 Active │ │
│ │ Customer: John Doe Type: Checking Account │ │
│ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │
│ │ │ Available Bal │ │ Pending Bal │ │ Credit Limit │ │ │
│ │ │ $12,450.75 │ │ $325.50 │ │ $5,000.00 │ │ │
│ │ │ [Real-time ⚡] │ │ [2 pending] │ │ [75% utilized] │ │ │
│ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Transaction History [Export] [Filter] │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │Date │Type │Amount │Status │Reference ││ │ │
│ │ │2024-01-15 │Card Payment │-$45.99 │Posted │TXN-4521456 ││ │ │
│ │ │2024-01-15 │ATM Withdraw │-$100.00 │Pending │TXN-4521457 ││ │ │
│ │ │2024-01-14 │Deposit │+$1,200.00│Posted │TXN-4521454 ││ │ │
│ │ │2024-01-14 │Fee Charge │-$2.50 │Posted │TXN-4521453 ││ │ │
│ │ │2024-01-13 │Transfer In │+$500.00 │Posted │TXN-4521451 ││ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ │ Showing 5 of 1,245 transactions [1][2][3]...[25] [Next] │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │
│ │ Account Actions │ │ Monthly Transaction Volume │ │
│ │ [Block Account] │ │ │ │
│ │ [Adjust Limits] │ │ $15K ┌─────────────────────────────────┐ │ │
│ │ [Generate Stmt] │ │ │ ████ │ │ │
│ │ [Close Account] │ │ $10K │ ████ ████ │ │ │
│ │ │ │ │ ████ ████ ████ │ │ │
│ │ Alerts: │ │ $5K │ ████ ████ ████ ████ │ │ │
│ │ 🔔 2 new alerts │ │ └─────────────────────────────────┘ │ │
│ │ View Details │ │ Jan Feb Mar Apr │ │
│ └─────────────────┘ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Transactions > Live Processing [Pause] [Settings] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ ⚡ Real-Time Transaction Stream [Auto-refresh ON]│ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │Status│Time │Account │Type │Amount │Action ││ │ │
│ │ │🟡 │12:45:45│CHK-001234 │Card Pay │-$67.89 │[View]││ │ │
│ │ │🟢 │12:45:32│SAV-005678 │Transfer In │+$1,000.00│[View]││ │ │
│ │ │🔴 │12:45:20│CHK-009876 │ATM Withdraw│-$500.00 │[Retry]││ │ │
│ │ │🟡 │12:45:15│CRD-112233 │Online Pay │-$123.45 │[View]││ │ │
│ │ │🟢 │12:45:01│CHK-445566 │Deposit │+$2,500.00│[View]││ │ │
│ │ │🟡 │12:44:58│SAV-778899 │Fee Charge │-$5.00 │[View]││ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ │ Legend: 🟢 Posted 🟡 Pending 🔴 Failed │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────┐ │
│ │ Processing Stats│ │ Queue Status │ │ Rule Engine Status │ │
│ │ Throughput: │ │ Pending: 45 │ │ Rules Evaluated: 1,247 │ │
│ │ 1,234 TPS │ │ Processing: 12 │ │ Rules Triggered: 23 │ │
│ │ │ │ Failed: 3 │ │ Avg Response: 15ms │ │
│ │ Success Rate: │ │ Retry Queue: 8 │ │ Cache Hit Rate: 94.5% │ │
│ │ 99.7% │ │ │ │ │ │
│ │ │ │ [View Queue] │ │ [View Rules] │ │
│ │ Avg Latency: │ │ [Drain Queue] │ │ [Performance Metrics] │ │
│ │ 125ms │ │ │ │ │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Transaction Details (TXN-4521456) [Close] [Actions]│ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ Account: CHK-001234 Amount: -$67.89 │ │ │
│ │ │ Type: Card Payment Currency: USD │ │ │
│ │ │ Status: Pending → Posted Merchant: Amazon.com │ │ │
│ │ │ Created: 12:45:32 Posted: 12:45:45 │ │ │
│ │ │ │ │ │
│ │ │ Rule Evaluations: │ │ │
│ │ │ ✅ Daily Limit Check (passed) │ │ │
│ │ │ ✅ Fraud Detection (passed) │ │ │
│ │ │ ✅ Balance Validation (passed) │ │ │
│ │ │ ⚙️ Fee Calculation (applied: $0.25) │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Payments > Make Payment [History] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Payment Wizard Step 1 of 4│ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ From Account: │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ ● CHK-001234 - Checking Available: $12,450.75 │ │ │ │
│ │ │ │ ○ SAV-005678 - Savings Available: $25,000.00 │ │ │ │
│ │ │ │ ○ CRD-112233 - Credit Card Available: $3,750.00 │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ To Account/Beneficiary: │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ Account Number: [_________________] [Validate] │ │ │ │
│ │ │ │ ○ Internal Account ● External Account │ │ │ │
│ │ │ │ Beneficiary Name: [_________________] │ │ │ │
│ │ │ │ Bank Name: [_________________] │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ Amount: [$_________] USD [Calculate Fees] │ │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ Transfer Amount: $1,000.00 │ │ │ │
│ │ │ │ Processing Fee: $2.50 │ │ │ │
│ │ │ │ Total Debit: $1,002.50 │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ │ [Cancel] [Next Step] │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Recent Payments [View All] │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │Date │To Account │Amount │Status │Action ││ │ │
│ │ │2024-01-15 │EXT-987654321 │$500.00 │Completed │[View] ││ │ │
│ │ │2024-01-14 │CHK-445566 │$1,200.00 │Completed │[View] ││ │ │
│ │ │2024-01-13 │EXT-123456789 │$750.00 │Failed │[Retry]││ │ │
│ │ │2024-01-12 │SAV-778899 │$300.00 │Completed │[View] ││ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Settings > Rule Management [+ Create Rule] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Active Rules Overview [Import] [Export]│ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │Name │Type │Priority│Effective│Status│Actions││ │ │
│ │ │Daily Limit Check │Validation│High │Active │🟢 │[Edit] ││ │ │
│ │ │Fraud Detection │Alert │Critical│Active │🟢 │[Edit] ││ │ │
│ │ │Fee Calculation │Fee │Medium │Active │🟢 │[Edit] ││ │ │
│ │ │Weekend Limit │Validation│Low │Scheduled│🟡 │[Edit] ││ │ │
│ │ │Large Transaction │Alert │High │Draft │⚪ │[Edit] ││ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Rule Editor: Daily Limit Check [Save] [Test] │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ Rule Configuration: │ │ │
│ │ │ Name: [Daily Transaction Limit Check___________________] │ │ │
│ │ │ Type: [Validation ▼] Priority: [High ▼] │ │ │
│ │ │ │ │ │
│ │ │ Effective Period: │ │ │
│ │ │ From: [2024-01-01] [00:00] To: [2024-12-31] [23:59] │ │ │
│ │ │ │ │ │
│ │ │ Conditions (JSON Editor): │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │{ │ │ │ │
│ │ │ │ "account_type": "checking", │ │ │ │
│ │ │ │ "daily_amount": {"$lte": 5000}, │ │ │ │
│ │ │ │ "transaction_count": {"$lte": 50}, │ │ │ │
│ │ │ │ "time_window": "24h" │ │ │ │
│ │ │ │} │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ │ │ │ │
│ │ │ Actions: │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │{ │ │ │ │
│ │ │ │ "reject": true, │ │ │ │
│ │ │ │ "message": "Daily transaction limit exceeded", │ │ │ │
│ │ │ │ "alert_level": "warning", │ │ │ │
│ │ │ │ "notify_customer": true │ │ │ │
│ │ │ │} │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │
│ │ Rule Performance│ │ Test Results │ │
│ │ Executions: │ │ Test Case 1: ✅ Passed │ │
│ │ 1,247 today │ │ Account: CHK-001234 │ │
│ │ │ │ Amount: $3,000 (under limit) │ │
│ │ Avg Response: │ │ │ │
│ │ 15ms │ │ Test Case 2: ❌ Failed │ │
│ │ │ │ Account: CHK-005678 │ │
│ │ Success Rate: │ │ Amount: $6,000 (exceeds limit) │ │
│ │ 99.9% │ │ Action: Transaction rejected │ │
│ │ │ │ │ │
│ │ [View Metrics] │ │ [Run Full Test Suite] │ │
│ └─────────────────┘ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Settings > Fee Configuration [+ New Fee Tier] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Fee Tier Overview [Bulk Actions] │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │Tier Name │Type │Effective Period│Status│Actions ││ │ │
│ │ │Premium │Customer │2024-01-01 → │🟢 │[Config] ││ │ │
│ │ │Standard │Customer │2024-01-01 → │🟢 │[Config] ││ │ │
│ │ │Basic │Customer │2024-01-01 → │🟢 │[Config] ││ │ │
│ │ │High Volume │Transaction │2024-03-01 → │🟡 │[Config] ││ │ │
│ │ │ATM Fees │Account │2024-01-01 → │🟢 │[Config] ││ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Fee Structure Editor: Premium Tier [Save] [Preview]│ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ Basic Information: │ │ │
│ │ │ Tier Name: [Premium Customer Tier__________________] │ │ │
│ │ │ Type: [Customer ▼] Currency: [USD ▼] │ │ │
│ │ │ Effective: [2024-01-01] to [2024-12-31] │ │ │
│ │ │ │ │ │
│ │ │ Fee Structures: │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │Transaction Type │Fee Type │Amount │Min │Max ││ │ │ │
│ │ │ │ATM Withdrawal │Flat │$0.00 │$0.00 │$0.00 ││ │ │ │
│ │ │ │Wire Transfer │Flat │$10.00 │$10.00│$25.00 ││ │ │ │
│ │ │ │Foreign Exchange │Percentage│2.5% │$2.00 │$50.00 ││ │ │ │
│ │ │ │Card Payment │Percentage│0.1% │$0.00 │$5.00 ││ │ │ │
│ │ │ │Overdraft │Flat │$0.00 │$0.00 │$0.00 ││ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ │ [+ Add Fee Structure] │ │ │
│ │ │ │ │ │
│ │ │ Tier Conditions: │ │ │
│ │ │ ┌─────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ ☑ Monthly balance > $10,000 │ │ │ │
│ │ │ │ ☑ Account age > 12 months │ │ │ │
│ │ │ │ ☑ Monthly transactions > 20 │ │ │ │
│ │ │ │ ☐ Credit score > 750 │ │ │ │
│ │ │ └─────────────────────────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────┐ ┌─────────────────────────────────────────────┐ │
│ │ Fee Calculator │ │ Revenue Impact Analysis │ │
│ │ Test Transaction│ │ │ │
│ │ Type: [Wire ▼] │ │ Current Month Revenue: $45,230 │ │
│ │ Amount: [$500] │ │ Projected Impact: +$2,150 │ │
│ │ Customer: [Prem]│ │ │ │
│ │ │ │ Fee Distribution: │ │
│ │ Calculated Fee: │ │ ┌─────────────────────────────────────────┐ │ │
│ │ $10.00 (Flat) │ │ │ Wire Transfer ████████████ 45% │ │ │
│ │ │ │ │ FX Fees ███████ 28% │ │ │
│ │ [Calculate] │ │ │ Card Fees █████ 20% │ │ │
│ │ [Reset] │ │ │ Other ██ 7% │ │ │
│ │ │ │ └─────────────────────────────────────────┘ │ │
│ └─────────────────┘ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────┐
│ Reports > Analytics Dashboard [Full Screen] [⚙] │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ 📊 Embedded Metabase Dashboard [Refresh Data]│ │
│ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │
│ │ │ Total Revenue │ │ Transaction Vol │ │ Active Customers│ │ │
│ │ │ $2.4M │ │ 1.2M transactions│ │ 45,670 users │ │ │
│ │ │ ↗ +15.3% │ │ ↗ +8.7% │ │ ↗ +5.2% │ │ │
│ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────────────────┐ │ │
│ │ │ Transaction Volume Trend (Last 30 Days) │ │ │
│ │ │ 50K ┌─────────────────────────────────────────────────┐ │ │ │
│ │ │ │ ╭─╮ ╭─╮ │ │ │ │
│ │ │ 40K │ ╭─╯ ╰─╮ ╭─╯ ╰─╮ │ │ │ │
│ │ │ │ ╭─╯ ╰─╮ ╭─╯ ╰─╮ │ │ │ │
│ │ │ 30K │╭╯ ╰─╮ ╭─╯ ╰─╮ │ │ │ │
│ │ │ └─────────────────────────────────────────────────┘ │ │ │
│ │ │ Week 1 Week 2 Week 3 Week 4 Week 5 │ │ │
│ │ └─────────────────────────────────────────────────────────┘ │ │
│ │ │ │
│ │ ┌─────────────────┐ ┌─────────────────────────────────────┐ │ │
│ │ │ Top Merchants │ │ Revenue by Product Type │ │ │
│ │ │ 1. Amazon.com │ │ ┌─────────────────────────────────┐ │ │ │
│ │ │ $145K (12%) │ │ │ Checking ████████████ 52% │ │ │ │
│ │ │ 2. Walmart │ │ │ Savings ██████ 28% │ │ │ │
│ │ │ $98K (8%) │ │ │ Credit Card ████ 15% │ │ │ │
│ │ │ 3. Gas Stations │ │ │ Prepaid █ 5% │ │ │ │
│ │ │ $87K (7%) │ │ └─────────────────────────────────┘ │ │ │
│ │ │ 4. Grocery │ │ │ │ │
│ │ │ $76K (6%) │ │ │ │ │
│ │ │ [View All] │ │ [Drill Down] │ │ │
│ │ └─────────────────┘ └─────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Custom Report Builder [Save Report]│ │
│ │ ┌─────────────────────────────────────────────────────────┐ │ │
│ │ │ Data Source: [PostgreSQL ▼] [ClickHouse ▼] │ │ │
│ │ │ Table: [transactions ▼] │ │ │
│ │ │ │ │ │
│ │ │ Filters: │ │ │
│ │ │ Date Range: [Last 30 Days ▼] │ │ │
│ │ │ Account Type: [All ▼] │ │ │
│ │ │ Transaction Status: [Posted ▼] │ │ │
│ │ │ │ │ │
│ │ │ Group By: [Account Type] [Transaction Type] │ │ │
│ │ │ Metrics: [Count] [Sum] [Average] │ │ │
│ │ │ │ │ │
│ │ │ [Generate Report] [Schedule] [Export] │ │ │
│ │ └─────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
#### 8. Real-Time Monitoring Dashboard┌─────────────────────────────────────────────────────────────────────┐ │ Administration > System Monitoring [Auto-refresh 5s]│ ├─────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ System Health Overview 🟢 All Green │ │ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ │ │ API Gateway │ │ Microservices │ │ Database Cluster│ │ │ │ │ │ 🟢 Operational │ │ 🟢 12/12 Running│ │ 🟢 All Healthy │ │ │ │ │ │ 99.9% Uptime │ │ 0 Alerts │ │ 0 Slow Queries │ │ │ │ │ │ 1.2K RPS │ │ Avg: 45ms │ │ Connections: 85%│ │ │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ Service Performance Metrics [Last 1 Hour] │ │ │ │ ┌─────────────────────────────────────────────────────────────┐ │ │ │ │ │Service │CPU%│Memory%│Requests│Latency│Errors│Status ││ │ │ │ │ │Account Svc │15% │45% │450/min │25ms │0 │🟢 ││ │ │ │ │ │Transaction Svc│28% │62% │1.2K/min│35ms │2 │🟢 ││ │ │ │ │ │Payment Svc │12% │38% │200/min │40ms │0 │🟢 ││ │ │ │ │ │Rule Engine │35% │55% │800/min │15ms │1 │🟢 ││ │ │ │ │ │Fee Service │8% │25% │150/min │20ms │0 │🟢 ││ │ │ │ │ │Notification │5% │20% │300/min │10ms │0 │🟢 ││ │ │ │ │ └─────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────┐ │ │ │ Message Queue │ │ Cache Status │ │ Database Performance │ │ │ │ NATS JetStream │ │ Redis Cluster │ │ PostgreSQL + ClickHouse │ │ │ │ │ │ │ │ │ │ │ │ Messages/sec: │ │ Hit Rate: 94.5% │ │ Queries/sec: 2.4K │ │ │ │ 2,450 │ │ Memory: 68% │ │ Avg Query Time: 12ms │ │ │ │ │ │ Connections: 42 │ │ Active Connections: 85 │ │ │ │ Queue Depth: │ │ │ │ │ │ │ │ 45 messages │ │ Evictions: 0 │ │ Slow Queries: 0 │ │ │ │ │ │ Network I/O: │ │ Lock Waits: 2 │ │ │ │ Consumers: 12 │ │ 15 MB/s │ │ │ │ │ │ Status: 🟢 │ │ Status: 🟢 │ │ Status: 🟢 │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────────────┘ │ │ │ │