How aimenux/ibancli works
Main Components
A. CLI Interface Layer
• Main Command Handler
• Sub-commands (Generate & Validate)
• Console Service Interface
B. Core Services Layer
• IBAN Service (Generation & Validation Logic)
• Configuration Services
• Logging Services
C. External Dependencies
• Spectre.Console (for CLI UI)
• IBAN.NET Library (for IBAN operations)
┌─────────────────────────────────────────────────────────┐
• CLI Interface Layer │
• ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ │
• MainCommand │ │ Generate │ │ Validate │ │
• (Entry Point)├─►│ Command │ │ Command │ │
• ┘ └──────┬──────┘ └──────┬───────┘ │
• ▼ ▼ │
• ┌─────────────────────────────┐ │
• Console Service │ │
• ┬────────────────┘ │
• ┘
┌────────────────────────────────|────────────────────────┐
• Core Services Layer │
• ▼ │
• ┌─────────────────────────────┐ │
• IBAN Service │ │
• (Generation & Validation) │ │
• ┘ │
• ┘
┌─────────────────────────────────────────────────────────┐
• External Dependencies │
• ┌───────────────┐ ┌──────────────┐ │
• Spectre.Console│ │ IBAN.NET │ │
• ┘ └──────────────┘ │
• ┘
Important Elements to Highlight
A. Command Pattern Implementation:
• Hierarchy from MainCommand to sub-commands
• AbstractCommand base class relationship
B. Service Layer:
• Separation between IIbanService interface and implementation
• Relationship with the Console Service
C. Configuration and Extensions:
• Configuration flow from appsettings.json
• How logging is integrated
Key Relationships
• Command flow from CLI to Services
• Dependency injection paths
• Service interface implementations
• External library integration points