graph LR
Command_Handlers["Command Handlers"]
Query_Handlers["Query Handlers"]
Aggregates_Entities["Aggregates/Entities"]
Repositories["Repositories"]
Unclassified["Unclassified"]
Command_Handlers -- "modifies" --> Aggregates_Entities
Query_Handlers -- "retrieves data from" --> Repositories
The Identity Microservice is a central component responsible for managing user identities, authentication, and authorization within the system. External requests are routed through an API Gateway to the Identity Microservice. Internally, the microservice employs a Command Query Responsibility Segregation (CQRS) pattern, where Command Handlers process state-changing operations on Aggregates/Entities, and Query Handlers retrieve data through Repositories. Data persistence is handled by a dedicated Data Store, accessed by Repositories. For authentication and authorization, the Identity Microservice integrates with external Authentication/Authorization Providers. Asynchronous communication and event propagation are managed via a Message Broker, allowing the Identity Microservice to publish events like user registrations to other interested services.
Process commands (e.g., RegisterUserCommand, LoginUserCommand, AssignRoleCommand) using MediatR within the Application Layer of the Identity Microservice. They orchestrate changes to the domain model.
Related Classes/Methods:
Process queries (e.g., GetUserByIdQuery, GetRolesQuery) using MediatR within the Application Layer of the Identity Microservice. They retrieve data from the domain model or read models.
Related Classes/Methods:
Encapsulate business logic and invariants for User and Role within the Domain Layer of the Identity Microservice. These are the core building blocks of the domain model.
Related Classes/Methods:
Implement data access logic for User and Role aggregates, interacting with the dedicated Data Store within the Infrastructure Layer of the Identity Microservice. They abstract data persistence details from the domain.
Related Classes/Methods:
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
Related Classes/Methods: None