How stavomidnite661/production-ready-enterprise-financial-platform works
Primary user entrypoint
The frontend lives in frontend/sov-frontend and is a React/Vite app with pages for dashboard, wallet, transactions, payments, compliance, integrations, and settings. It uses a shared API client plus WebSocket context for live updates, so the UI is designed around real-time account/transaction/compliance state rather than static CRUD screens.
Backend service boundary
The core backend is a TypeScript microservice suite:
• api-gateway: authentication, authorization, rate limiting, circuit breaker, health checks, load balancing, WebSocket coordination.
• account-service: account state, wallet associations, blockchain verification, event sourcing, Redis/database access.
• transaction-service: payment orchestration, settlement, webhooks, message queue, blockchain/compliance/payment-gateway coordination.
• wallet-service: key custody, encryption/HSM integration, multi-chain wallet operations.
• compliance-service: AML/KYC, sanctions, PCI/FinCEN-oriented checks and reporting.
Transaction and settlement flow
transaction-service appears to be the orchestration hub for financial operations. It owns transaction persistence, payment gateway calls, blockchain interactions, compliance checks, settlement logic, and webhook handling. This is the place where a payment likely fans out to external gateway adapters, on-chain execution, and compliance validation before final settlement is confirmed back to the frontend via APIs/WebSockets.
Wallet custody and key management
wallet-service is a dedicated security boundary for wallet lifecycle and cryptographic operations. It includes encryption, audit logging, HSM abstractions, storage, and chain-specific modules. This suggests private keys and signing operations are intentionally isolated from the rest of the application, with HSM/KMS as an external dependency where available.
Blockchain and smart contract layer
There are two contract-oriented areas:
• contracts/: production smart contracts for token economics, settlement, compliance validation, governance, trust, and bridges.
• smart-contracts/: a separate security-focused contract project with tests, analysis, and hardened token/security contracts.
The backend services interact with these contracts for settlement, verification, and cross-chain operations, making the chain layer a distinct execution boundary from off-chain services.
Integration adapters
The adapters/ area is a pluggable integration layer for external ecosystems:
• blockchain adapters for Bitcoin, Ethereum, Polygon/BSC, Solana
• e-commerce adapters for Shopify, WooCommerce, Magento, BigCommerce
• payment gateway adapters for Stripe, PayPal, Square
• POS adapters for Square, Toast, Clover, traditional POS
• wallet adapters for MetaMask, WalletConnect, Coinbase, Phantom, Rainbow, Trust
These packages abstract vendor-specific APIs, OAuth/webhooks, rate limits, and compliance/security concerns so the core services can remain vendor-agnostic.
Security and compliance as a platform subsystem
Beyond the main compliance microservice, the repo has standalone security/compliance modules:
• security/compliance: compliance engines, rules, reporting, monitoring, workflows, audit trail, document collection, regulatory integrations, websocket notifications.
• security/encryption: field/column encryption, tokenization, masking, TLS/key exchange, GDPR/CCPA-related utilities.
• security/kms-hsm: KMS/HSM service abstractions, crypto services, backup/recovery, audit logging.
• security/fraud-detection: Python-based behavioral/velocity/geo/risk scoring and alerting.
These are cross-cutting subsystems that feed the financial services with risk scores, audit evidence, encryption, and policy decisions.
Observability and operational support
Monitoring is treated as a first-class layer under monitoring/: Prometheus, Grafana, Alertmanager, Jaeger, ELK, blackbox probes, and custom blockchain/financial exporters. This supports real-time system health, business metrics, compliance dashboards, and incident response. disaster-recovery/ adds backup, restore, replication, RTO/RPO, and runbooks as another operational boundary.
Deployment and runtime infrastructure
k8s/ contains Kubernetes base manifests, overlays for dev/staging/prod, ingress, RBAC, secrets, service accounts, and Istio service-mesh config. The repo also includes Dockerfiles/compose files for services and supporting components. This indicates the intended deployment model is containerized microservices with environment-specific overlays and network/security policy enforcement.
Quality, validation, and governance
testing/ centralizes unit, integration, end-to-end, security, performance/load, compliance, and smart-contract tests. security-scanning/ adds SAST/DAST, dependency, container, secret, license, and infrastructure scanning. Together, these form a governance pipeline around the whole system, not just the application code.
Main entry points: transaction-service Transaction Service · api-gateway API Gateway · wallet-service Wallet Service · sov-frontend SOV Frontend
Components 23
Frontend
User-facing app and client state
- SOV Frontend · Dashboard-centric UI with live wallet, transaction, payments, and compliance views
frontend/sov-frontend
Backend Services
Core API and domain microservices
- Backend Suite · API gateway plus account, transaction, wallet, and compliance services
backend - API Gateway · Ingress, auth, rate limiting, versioning, logging, and request fanout
backend/api-gateway - Account Service · Account state, wallet links, event sourcing, and blockchain verification
backend/account-service - Transaction Service · Payment orchestration, settlement, webhooks, and cross-system transaction flow
backend/transaction-service - Wallet Service · Wallet lifecycle, encryption, HSM integration, and chain operations
backend/wallet-service - Compliance Service · AML/KYC, sanctions, PCI/FinCEN checks, monitoring, and reporting
backend/compliance-service
Adapters
Pluggable external system integrations
- Blockchain Adapters · Bitcoin, Ethereum, Polygon/BSC, and Solana connectivity
adapters/blockchain - Commerce Adapters · Shopify, WooCommerce, Magento, and BigCommerce connectors
adapters/ecommerce - Payment Adapters · Stripe, PayPal, and Square gateway abstractions
adapters/payment-gateways - POS Adapters · Square, Toast, Clover, and traditional POS connectors
adapters/pos-systems - Wallet Adapters · MetaMask, WalletConnect, Coinbase, Phantom, Rainbow, and Trust connectors
adapters/wallets
Chain Layer
Smart contracts and contract tooling
- Core Contracts · Production settlement, governance, trust, bridge, and compliance contracts
contracts - Hardened Contracts · Security-focused smart contracts with analysis and dedicated tests
smart-contracts
Security Platform
Cross-cutting security, crypto, and fraud systems
- Compliance Engine · Rules, workflows, audits, evidence, reporting, and regulatory integrations
security/compliance - Encryption Stack · Field encryption, tokenization, masking, TLS, and key exchange
security/encryption - KMS/HSM · Cloud KMS and HSM abstractions with backup, recovery, and audit logging
security/kms-hsm - Fraud Detection · Behavioral, velocity, geolocation, and ML-based fraud analysis
security/fraud-detection
Operations
Deployment, monitoring, and recovery infrastructure
- Monitoring Stack · Prometheus, Grafana, Alertmanager, Jaeger, ELK, and exporters
monitoring - Kubernetes Runtime · Manifests, overlays, ingress, RBAC, secrets, and service mesh
k8s - Disaster Recovery · Backups, restores, replication, RTO/RPO, and runbooks
disaster-recovery
Quality Gate
Testing and scanning across the repo
- Testing Suite · Unit, integration, end-to-end, security, compliance, and load tests
testing - Security Scanning · SAST, DAST, dependency, container, secret, license, and infra scans
security-scanning
Connections 29
- SOV Frontend → API Gateway: API calls · UI submits authenticated requests through the gateway
- SOV Frontend → Transaction Service: live updates · WebSocket-driven transaction and settlement state
- SOV Frontend → Wallet Service: wallet UI · Wallet lifecycle and signing-related user flows
- API Gateway → Account Service: routes · Forwards account and user requests
- API Gateway → Transaction Service: routes · Forwards payment and transaction requests
- API Gateway → Wallet Service: routes · Forwards wallet operations
- API Gateway → Compliance Service: routes · Forwards policy and compliance requests
- Account Service → Blockchain Adapters: verifies on-chain · Checks blockchain-backed account and wallet state
- Account Service → Compliance Engine: policy checks · Uses compliance logic for account-related decisions
- Transaction Service → Payment Adapters: payment rails · Executes provider calls for payment processing
- Transaction Service → Blockchain Adapters: settlement · Coordinates chain execution and verification
- Transaction Service → Compliance Service: screening · Runs compliance checks during orchestration
- Transaction Service → Wallet Service: signing · Delegates custody and signing-sensitive actions
- Wallet Service → KMS/HSM: key ops · Uses KMS/HSM abstractions for private key protection
- Wallet Service → Wallet Adapters: connects · Interacts with external wallet ecosystems
- Compliance Service → Compliance Engine: policy engine · Shares compliance rules and workflows
- Compliance Service → Fraud Detection: risk input · Consumes fraud signals and monitoring signals
- Compliance Engine → Monitoring Stack: telemetry · Feeds compliance dashboards and alerts
- Encryption Stack → KMS/HSM: crypto backend · Delegates secure key and encryption primitives
- Core Contracts → Blockchain Adapters: deployed via · Contract interaction is mediated by blockchain connectivity
- Hardened Contracts → Core Contracts: hardens · Security-oriented contract suite complements core contracts
- Monitoring Stack → Kubernetes Runtime: runs on · Observability components are deployed into the cluster
- Kubernetes Runtime → Backend Suite: hosts · Deploys backend services and infrastructure components
- Disaster Recovery → Kubernetes Runtime: protects · Backups and restore procedures cover the runtime layer
- Testing Suite → SOV Frontend: tests · Covers UI and client behavior
- Testing Suite → Backend Suite: tests · Covers service-level behavior
- Testing Suite → Core Contracts: tests · Covers contract behavior
- Security Scanning → Backend Suite: scans · Applies security scanning to services and dependencies
- Security Scanning → Hardened Contracts: scans · Covers smart-contract security analysis