Solution Architecture · Additional notes
🕑 1 min read
Mid-level6 min read
Rapid overview
Additional notes
Technology Stack Integration
Recommended Stack
| Layer | Technology | Purpose |
|---|
| Web | FastEndpoints | Minimal API endpoints with validation |
| Application | MediatR | CQRS command/query handling |
| Validation | FluentValidation | Request validation |
| Domain | DomainCore (shared) | Base entities, domain events |
| Infrastructure | EF Core | ORM, migrations |
| Database | PostgreSQL | Per-service database |
| Caching | Redis | Distributed cache |
| Auth | Keycloak | OAuth2/OIDC identity provider |
Shared NuGet Packages Pattern
NuGetPackages/
+-- DomainCore/ # Base entities, domain events
+-- MultiTenancy.EFCore/ # Tenant isolation infrastructure
+-- Identity.Keycloak/ # Keycloak integration
+-- Security.Claims/ # Claims extraction helpers
+-- ServiceDefaults/ # Health checks, logging defaults
Choosing the Right Approach
| Scenario | Recommendation |
|---|
| Long-lived backend with integrations | Clean Architecture |
| Complex domain, frequent rule changes | DDD + Clean Architecture |
| Fast-moving feature teams | Vertical Slices |
| High-read workloads | CQRS with read replicas |
| Multi-tenant SaaS | Tenant entity pattern + global filters |
| Desktop/mobile UI | MVVM |