How reown-com/reown-kotlin works
Main Components
a. Core Layer:
• Core Android Module (foundation of the SDK)
• Crypto Services
• Network Communication
• Storage Systems (SQLDelight)
• Common Utilities
b. Protocol Layer:
• Sign Protocol
• Notify Protocol
• Authentication Services
c. Product Layer:
• WalletKit (wallet functionality)
• AppKit (UI components and app integration)
d. Foundation Layer:
• Base networking
• Relay services
• Crypto foundations
Key Relationships
a. Dependency Flow:
Product Layer (WalletKit, AppKit)
• ↓
Protocol Layer (Sign, Notify)
• ↓
Core Layer (Android Core)
• ↓
Foundation Layer
b. Data Flow:
• Communication between wallet apps and dApps
• Authentication flow
• Demonstrate message relay system
Architectural Patterns to Highlight
• Clean Architecture pattern (visible in module structure)
• Repository Pattern (for data management)
• MVVM Pattern (in UI components)
• Dependency Injection (using Koin)
Technical Components
a. Database:
• SQLDelight implementation
• Storage repositories
• Migration system
b. Network:
• Relay client
• API services
• WebSocket connections
c. Security:
• Crypto services
• Key management
• Authentication systems
Integration Points
• External service connections
• Blockchain interaction points
• Wallet integration interfaces
┌─────────────────────────────────────────────────────┐
• Application Layer │
• ┌─────────────┐ ┌──────────────┐ │
• AppKit │ │ WalletKit │ │
• ┘ └──────────────┘ │
• ┤
• Protocol Layer │
• ┌─────────────┐ ┌──────────────┐ │
• Sign │ │ Notify │ │
• ┘ └──────────────┘ │
• ┤
• Core Layer │
• ┌─────────────────────────────────────────┐ │
• Android Core │ │
• ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
• Crypto │ │ Network │ │ Storage │ │ │
• ┘ └─────────┘ └─────────┘ │ │
• ┘ │
• ┤
• Foundation Layer │
• ┌─────────────────────────────────────────┐ │
• Base Network & Crypto Services │ │
• ┘ │
• ┘
• Blue: Core components
• Green: Protocol implementations
• Orange: Product modules
• Gray: Foundation services
• Database operations
• Network communications
• Security features
• External integrations