How riorinald/taskmanagementsystem works
Main Components
• Presentation/API Layer: Represented by the TaskManagementSystem.API project. This layer contains the controllers (e.g., WorkItemsController.cs) that handle incoming HTTP requests.
• Application Layer: Represented by the TaskManagementSystem.Application project. It includes the application services, DTOs (for creating, updating, and retrieving work items and users), and validators. This layer encapsulates the business use cases and logic.
• Domain Layer: Represented by the TaskManagementSystem.Domain project. It holds the core business entities (such as User and WorkItem), enums (Priority, Status), and interfaces (e.g., IUserRepository, IWorkItemRepository) that define the contracts without depending on external services.
• Infrastructure Layer: Represented by the TaskManagementSystem.Infrastructure project. This implements the repository interfaces and manages data access to the SQLite database, as shown by the database context implementations (SqliteDatabaseContext, JsonDatabaseContext) and the dependency injection configuration.
• Testing Layer: Represented by TaskManagementSystem.Tests. Contains xUnit tests for various API endpoints and system behavior.
Relationships and Data Flow
• The Application Layer processes business logic and uses DTOs to interact with client data. It then calls the Domain Layer’s interfaces to work with business entities.
• The Domain Layer defines core entities and the repository interfaces that abstract data operations.
• The Infrastructure Layer implements the repository interfaces from the Domain, providing the concrete database access (using SQLite for persistence).
• Optionally, illustrate the dependency injection setup (found in files like ServiceCollectionExtensions.cs and DependencyInjection.cs) to show how the components are wired during application startup.
Architectural Patterns
• Clean Architecture: Segregate the code into layers (API, Application, Domain, Infrastructure) ensuring separation of concerns.
• Dependency Injection: Show how the API and Application layers are decoupled from the Infrastructure implementations.
• Repository Pattern: Emphasize that the Domain interfaces for data access are implemented by the Infrastructure layer repositories (UserRepository, WorkItemRepository).
Relevant Technologies and Details
• .NET Core or .NET 5/6 (as indicated by the .csproj files and .NET CLI commands in the README).
• SQLite: Show its connection with the Infrastructure layer (via database context implementations).
• API Endpoints: Note some key endpoints (GET /api/workitems, POST /api/workitems, GET /api/users) in the API layer.
• Testing Framework: xUnit, as indicated by the Test project.