How pandugaluh/mini-project works
Main Components
• API Layer: For each service (Project.Service.Course.Api and Project.Service.User.Api), show components such as Controllers and the Program entry point. Label these clearly, as they expose endpoints for handling HTTP requests.
• Domain Layer: Represent the core domain entities and common elements (BaseEntity, Entities like EntityUser, EntityCourse, etc.). This layer encapsulates the domain logic and definitions.
• Infrastructure and Persistence Layers: Include the components managing external concerns—data storage (SQL Server), Kafka consumers and producers, EF Core migrations in the Course Project, and Dapper based database operations in the User Project. Separate these into Infrastructure (for event messaging or other integrations) and Persistence (for data context, repositories, and migrations).
Interactions and Relationships
• That Application components interact with Domain entities (to apply business rules) and with Persistence interfaces to handle database operations.
• Connections to SQL Server for both projects, noting that the Course project uses Entity Framework migrations and the User project uses Dapper with a database-first approach.
Architectural Patterns and Design Principles
• Microservices: Since there are two distinct services (User and Course), represent them as two separate modules/microservices that communicate indirectly via Kafka. This separation helps in understanding service boundaries and responsibilities.
Relevant Technologies and Frameworks
• API layer with .NET 6 and mention that Swagger documentation is auto-generated.
• In the Application layer, note the use of MediatR for the CQRS pattern in the User service.
• Point out the use of either Entity Framework (Course service for migrations) or Dapper (User service for Database-First operations) in the Persistence layer.
• Kafka components: a Producer (in the User project) and a Consumer (in the Course project) that handle event-driven integration.