User Service Overview - daddeJ/user-auth-microservices GitHub Wiki
🧩 User Service Overview
Purpose:
Handles all user-related data (name, email, roles, registration info) in a clean, centralized DDD structure.
Project Path:
user-auth-microservices/user-service
Architecture Pattern:
- Domain-Driven Design (DDD)
- Onion Architecture
- Clean Architecture principles
🧱 Core DDD Components
-
Entity:
User.cs
Represents a system user with identity and state. -
Value Objects:
Could includeEmailAddress
,PhoneNumber
, etc. -
Use Cases (Application Layer):
CreateUserHandler.cs
GetUserHandler.cs
- Each use case has a command/query + handler pair.
-
DTOs:
Used for input/output in theApi/Controllers
.
🔐 Authentication Relationship
This service connects with auth-service
to handle registration and login flows.
Data is synced, but responsibilities are separated:
Concern | Handled by |
---|---|
User data storage | user-service |
Token management | auth-service |
🔍 Testing Strategy
- Unit Tests: Domain models, application logic (use cases)
- Integration Tests: Repository, controller, and API-level tests using EF Core In-Memory or SQL Docker
- Follows Arrange–Act–Assert (AAA) pattern
🛠️ Tools & Technologies
- .NET 8 / ASP.NET Core Web API
- Entity Framework Core
- xUnit for testing
- Docker
- Azure Pipelines for CI/CD