feat: Solace Bank Group PLC Treasury Management Portal
- Web3 authentication with MetaMask, WalletConnect, Coinbase wallet options - Demo mode for testing without wallet - Overview dashboard with KPI cards, asset allocation, positions, accounts, alerts - Transaction Builder module (full IDE-style drag-and-drop canvas with 28 gap fixes) - Accounts module with multi-account/subaccount hierarchical structures - Treasury Management module with positions table and 14-day cash forecast - Financial Reporting module with IPSAS, US GAAP, IFRS compliance - Compliance & Risk module with KYC/AML/Sanctions monitoring - Settlement & Clearing module with DVP/FOP/PVP operations - Settings with role-based permissions and enterprise controls - Dark theme professional UI with Solace Bank branding - HashRouter for static hosting compatibility Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
This commit is contained in:
108
src/types/index.ts
Normal file
108
src/types/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import type { Node, Edge } from '@xyflow/react';
|
||||
|
||||
export interface ComponentItem {
|
||||
id: string;
|
||||
label: string;
|
||||
category: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
color: string;
|
||||
inputs?: string[];
|
||||
outputs?: string[];
|
||||
engines?: string[];
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
id: string;
|
||||
agent: string;
|
||||
content: string;
|
||||
timestamp: Date;
|
||||
type: 'user' | 'agent' | 'system';
|
||||
}
|
||||
|
||||
export interface TerminalEntry {
|
||||
id: string;
|
||||
timestamp: Date;
|
||||
level: 'info' | 'warn' | 'error' | 'success';
|
||||
source: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ValidationIssue {
|
||||
id: string;
|
||||
severity: 'error' | 'warning' | 'info';
|
||||
node?: string;
|
||||
field?: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface AuditEntry {
|
||||
id: string;
|
||||
timestamp: Date;
|
||||
user: string;
|
||||
action: string;
|
||||
detail: string;
|
||||
}
|
||||
|
||||
export interface SettlementItem {
|
||||
id: string;
|
||||
txId: string;
|
||||
status: 'pending' | 'in_review' | 'awaiting_approval' | 'dispatched' | 'partially_settled' | 'settled' | 'failed';
|
||||
amount: string;
|
||||
asset: string;
|
||||
counterparty: string;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
export interface Notification {
|
||||
id: string;
|
||||
title: string;
|
||||
message: string;
|
||||
type: 'info' | 'success' | 'warning' | 'error';
|
||||
timestamp: Date;
|
||||
read: boolean;
|
||||
}
|
||||
|
||||
export interface ThreadEntry {
|
||||
id: string;
|
||||
title: string;
|
||||
agent: Agent;
|
||||
timestamp: Date;
|
||||
messageCount: number;
|
||||
}
|
||||
|
||||
export interface TransactionTab {
|
||||
id: string;
|
||||
name: string;
|
||||
nodes: Node[];
|
||||
edges: Edge[];
|
||||
}
|
||||
|
||||
export interface HistoryEntry {
|
||||
nodes: Node[];
|
||||
edges: Edge[];
|
||||
}
|
||||
|
||||
export type TransactionNode = Node<{
|
||||
label: string;
|
||||
category: string;
|
||||
icon: string;
|
||||
color: string;
|
||||
status?: 'valid' | 'warning' | 'error';
|
||||
}>;
|
||||
|
||||
export type TransactionEdge = Edge<{
|
||||
animated?: boolean;
|
||||
}>;
|
||||
|
||||
export type PanelSide = 'left' | 'right' | 'bottom';
|
||||
|
||||
export type SessionMode = 'Sandbox' | 'Simulate' | 'Live' | 'Compliance Review';
|
||||
|
||||
export type ActivityTab = 'builder' | 'assets' | 'templates' | 'compliance' | 'routes' | 'protocols' | 'agents' | 'terminal' | 'audit' | 'settings';
|
||||
|
||||
export type BottomTab = 'terminal' | 'validation' | '800system' | 'settlement' | 'audit' | 'messages' | 'events' | 'reconciliation' | 'exceptions';
|
||||
|
||||
export type Agent = 'Builder' | 'Compliance' | 'Routing' | 'ISO-20022' | 'Settlement' | 'Risk' | 'Documentation';
|
||||
|
||||
export type ConversationScope = 'current-node' | 'current-flow' | 'full-transaction' | 'terminal' | 'compliance';
|
||||
143
src/types/portal.ts
Normal file
143
src/types/portal.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
export interface WalletInfo {
|
||||
address: string;
|
||||
chainId: number;
|
||||
balance: string;
|
||||
ensName?: string;
|
||||
provider: 'metamask' | 'walletconnect' | 'coinbase' | 'injected';
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
isAuthenticated: boolean;
|
||||
wallet: WalletInfo | null;
|
||||
user: PortalUser | null;
|
||||
loading: boolean;
|
||||
}
|
||||
|
||||
export interface PortalUser {
|
||||
id: string;
|
||||
displayName: string;
|
||||
role: UserRole;
|
||||
permissions: Permission[];
|
||||
institution: string;
|
||||
department: string;
|
||||
lastLogin: Date;
|
||||
walletAddress: string;
|
||||
}
|
||||
|
||||
export type UserRole = 'admin' | 'treasurer' | 'analyst' | 'compliance_officer' | 'auditor' | 'viewer';
|
||||
|
||||
export type Permission =
|
||||
| 'accounts.view' | 'accounts.manage' | 'accounts.create'
|
||||
| 'transactions.view' | 'transactions.create' | 'transactions.approve' | 'transactions.execute'
|
||||
| 'treasury.view' | 'treasury.manage' | 'treasury.rebalance'
|
||||
| 'compliance.view' | 'compliance.manage' | 'compliance.override'
|
||||
| 'reports.view' | 'reports.generate' | 'reports.export'
|
||||
| 'settlements.view' | 'settlements.approve'
|
||||
| 'admin.users' | 'admin.settings' | 'admin.audit';
|
||||
|
||||
export interface Account {
|
||||
id: string;
|
||||
name: string;
|
||||
type: AccountType;
|
||||
currency: string;
|
||||
balance: number;
|
||||
availableBalance: number;
|
||||
status: 'active' | 'frozen' | 'closed' | 'pending';
|
||||
parentId?: string;
|
||||
institution: string;
|
||||
iban?: string;
|
||||
swift?: string;
|
||||
walletAddress?: string;
|
||||
lastActivity: Date;
|
||||
subaccounts?: Account[];
|
||||
}
|
||||
|
||||
export type AccountType =
|
||||
| 'operating' | 'reserve' | 'custody' | 'escrow'
|
||||
| 'settlement' | 'nostro' | 'vostro' | 'collateral'
|
||||
| 'treasury' | 'crypto_wallet' | 'stablecoin' | 'omnibus';
|
||||
|
||||
export interface FinancialSummary {
|
||||
totalAssets: number;
|
||||
totalLiabilities: number;
|
||||
netPosition: number;
|
||||
unrealizedPnL: number;
|
||||
realizedPnL: number;
|
||||
pendingSettlements: number;
|
||||
dailyVolume: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export interface TreasuryPosition {
|
||||
id: string;
|
||||
assetClass: string;
|
||||
instrument: string;
|
||||
quantity: number;
|
||||
marketValue: number;
|
||||
costBasis: number;
|
||||
unrealizedPnL: number;
|
||||
currency: string;
|
||||
custodian: string;
|
||||
maturityDate?: Date;
|
||||
}
|
||||
|
||||
export interface CashForecast {
|
||||
date: Date;
|
||||
projected: number;
|
||||
actual?: number;
|
||||
variance?: number;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export type ReportingStandard = 'IPSAS' | 'US_GAAP' | 'IFRS';
|
||||
|
||||
export interface ReportConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
standard: ReportingStandard;
|
||||
type: ReportType;
|
||||
period: ReportPeriod;
|
||||
status: 'draft' | 'generated' | 'reviewed' | 'published';
|
||||
generatedAt?: Date;
|
||||
generatedBy?: string;
|
||||
}
|
||||
|
||||
export type ReportType =
|
||||
| 'balance_sheet' | 'income_statement' | 'cash_flow'
|
||||
| 'trial_balance' | 'general_ledger' | 'regulatory'
|
||||
| 'position_summary' | 'risk_exposure' | 'compliance_summary';
|
||||
|
||||
export type ReportPeriod = 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'annual' | 'custom';
|
||||
|
||||
export interface PortalModule {
|
||||
id: string;
|
||||
name: string;
|
||||
icon: string;
|
||||
description: string;
|
||||
path: string;
|
||||
requiredPermission: Permission;
|
||||
status: 'active' | 'coming_soon' | 'maintenance';
|
||||
}
|
||||
|
||||
export interface ComplianceAlert {
|
||||
id: string;
|
||||
severity: 'critical' | 'high' | 'medium' | 'low';
|
||||
category: string;
|
||||
message: string;
|
||||
timestamp: Date;
|
||||
status: 'open' | 'acknowledged' | 'resolved';
|
||||
assignedTo?: string;
|
||||
}
|
||||
|
||||
export interface SettlementRecord {
|
||||
id: string;
|
||||
txId: string;
|
||||
type: 'DVP' | 'FOP' | 'PVP' | 'internal';
|
||||
status: 'pending' | 'matched' | 'affirmed' | 'settled' | 'failed' | 'cancelled';
|
||||
amount: number;
|
||||
currency: string;
|
||||
counterparty: string;
|
||||
settlementDate: Date;
|
||||
valueDate: Date;
|
||||
csd?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user