id: flowcharts
SophiChain FinanceHub - Architecture Flowcharts
This document contains comprehensive flowcharts for understanding the FinanceHub module architecture and key workflows.
id: flowcharts
Table of Contents
- 1. Module Architecture Overview
- 1. Module Architecture Overview
- 2. Payment Flow (Complete)
- 3. Invoice Creation & Payment
- 4. Wallet Operations
- 5. Currency Conversion Flow
- 6. Exchange Rate Update Flow
- 7. Event-Driven Architecture
- 8. Pluggable Provider Architecture
- 9. DeFi Treasury Auto-Conversion
- 10. Gamification Reward Flow
- Additional Diagrams
- Summary
id: flowcharts
1. Module Architecture Overview
id: flowcharts
2. Payment Flow (Complete)
id: flowcharts
3. Invoice Creation & Payment
id: flowcharts
4. Wallet Operations
id: flowcharts
5. Currency Conversion Flow
Multi-Hop Conversion Example:
- Converting 100 USD to EUR
- Path: USD → BTC → EUR
- Step 1: 100 USD = 0.0025 BTC
- Step 2: 0.0025 BTC = 85 EUR
- Effective Rate: 1 USD = 0.85 EUR
id: flowcharts
6. Exchange Rate Update Flow
id: flowcharts
7. Event-Driven Architecture
Event Processing Guarantees:
- ✓ Events never lost (stored in outbox table)
- ✓ At-least-once delivery (automatic retries)
- ✓ Eventual consistency (handled asynchronously)
- ✓ Automatic retries on failure
- ✓ Idempotency (same event processed once)
id: flowcharts
8. Pluggable Provider Architecture
Key Benefits:
- ✓ Zero source code changes needed to add providers
- ✓ Add providers via NuGet packages
- ✓ Auto-discovery through ABP DI
- ✓ Easy testing with mock providers
- ✓ Third-party extensibility for developers
id: flowcharts
9. DeFi Treasury Auto-Conversion
id: flowcharts
10. Gamification Reward Flow
Rule Engine Features:
- ✓ Conditional evaluation (check multiple conditions)
- ✓ Multiple rewards per event
- ✓ Multipliers for VIP users
- ✓ Caps per rule and per user
- ✓ Time-based rules (daily, weekly, monthly)
- ✓ Complete audit trail
id: flowcharts
Additional Diagrams
Entity Relationship Overview
id: flowcharts
Permission Hierarchy
id: flowcharts
Summary
These flowcharts illustrate:
- Layered Architecture - Clear separation between UI, Application, Domain, and Infrastructure
- Event-Driven Design - Outbox pattern ensures reliable event processing
- Pluggable Providers - NuGet packages extend functionality without source changes
- Complex Workflows - Payment, conversion, and treasury operations
- Domain Services - Orchestration of business logic across aggregates
- ABP Integration - Leveraging ABP's built-in features for UnitOfWork, events, DI
All flows follow ABP Framework best practices and implement Domain-Driven Design principles.
id: flowcharts