How yendisgomes/cashflow works
Main Components
a. API Layer (Presentation)
• API Controllers (ExpensesController and ReportController)
• Middleware (CultureMiddleware) and Filters (ExceptionFilter)
• Swagger documentation integration
b. Application Layer
• Use Cases organized by feature (Expenses)
• AutoMapper configuration
• Report Generation components (PDF and Excel)
c. Domain Layer
• Core Expense entity
• Repository interfaces
• Domain enums and extensions
d. Infrastructure Layer
• MySQL database
• Entity Framework Context (CashflowDbContext)
• Repository implementations
• Unit of Work pattern implementation
Component Relationships
[Client Applications] ↔ HTTP/REST
• ↓
[API Layer (Controllers)]
• ↓
[Application Layer (Use Cases)]
• ↓
[Domain Layer (Entities, Interfaces)]
• ↓
[Infrastructure Layer] ↔ MySQL Database
Detailed Component Breakdown
API Layer:
• REST Endpoints
• Request/Response DTOs (from Communication project)
• Middleware Components
• Exception Filters
Application Layer:
• Expense Use Cases:
• * Register
• * Update
• * Delete
• * GetAll
• * GetById
• Report Generation:
• * PDF Generation
• * Excel Generation
• Validators
Domain Layer:
• Expense Entity
• Repository Interfaces
• Domain Enums
• Value Objects
Infrastructure Layer:
• DbContext
• Repository Implementations
• Unit of Work
• Database Configurations
Additional Elements
• Notes for important architectural decisions
• DDD layers separation clearly
• Flow of data through the system
Key Architectural Patterns to Highlight
• DDD layered architecture
• Repository Pattern
• Unit of Work Pattern
• CQRS-like separation (Read/Write repositories)
• Mediator pattern (if implemented in the Use Cases)
Technical Stack Indicators
• .NET 8 Runtime
• Entity Framework Core
• MySQL Database
• AutoMapper
• FluentValidation
• Swagger/OpenAPI