This sample demonstrates a simple lookup backend using .NET 8, Clean Architecture, CQRS with MediatR and Keycloak authentication.
- Domain – entity definitions and repository interfaces.
- Application – MediatR queries and DTOs.
- Infrastructure – EF Core context and repository implementations.
- API – ASP.NET Core Web API.
docker-compose up --buildThe API will be available at http://localhost:5000/swagger.
- admin / admin – Admin role
- viewer / viewer – Viewer role
- Open Swagger UI and use the Authorize button.
- Login with one of the users above.
GET /api/countriesGET /api/cities?countryId=1GET /api/colors
All endpoints require a valid JWT token obtained from Keycloak.