How thisisnabi/digitalwallet works
Main components
• API/Endpoint Layer: Represent the various HTTP endpoints that serve as the entry point for operations (e.g., CreateCurrency, IncreaseWalletBalance, CreateWallet, etc.).
• MultiCurrency: Handling currency creation, updating conversion ratios, and retrieving currencies.
• UserWallet: Managing wallet creation, balance retrieval, activation/suspension, change title, and retrieving transactions.
• Transactions: Managing operations like increasing/decreasing wallet balance, wallet funds retrieval, and transaction details.
• Business/Domain Logic: Components like FeatureManagers and domain services (CurrencyService, WalletService, TransactionService) that encapsulate the core business rules.
• Persistence Layer: The WalletDbContext and related migration components, responsible for data persistence using EF Core.
• Cross-Cutting Concerns: Utility/Extension methods, Filters (like the EndpointValidatorFilter), and custom exception handling.
Relationships and interactions
• The API/Endpoint Layer receives HTTP requests and passes them onto their respective feature handlers and FeatureManagers.
• Each vertical slice’s components (endpoints, request validators, and managers) coordinate to perform feature-specific operations.
• Business/Domain Logic components interact with the Persistence Layer to read from and write to the database.
• Application-wide cross-cutting modules (such as extensions and filters) integrate into the pipeline affecting all endpoints.
Important architectural patterns and design principles
• Vertical Slice Architecture: Emphasize that rather than a traditional layered approach, the application is divided by business capability. Each “slice” encapsulates everything it needs (e.g., endpoint, validation, business logic, and persistence interactions).
• Separation of Concerns: Distinct modules handle API routing, business logic, and data persistence.
• Use of Dependency Injection: The IServiceCollectionExtensions and use of filters likely indicate strong DI practices.
• EF Core for Data Persistence: Showcase that a persistence layer with database migrations is used.