How alondevcreator/clean-architecture works
Project Type and Purpose
• This is a .NET “clean-architecture” template for a backend web API that implements a simple reminder/subscription service.
• It’s a layered monolithic application: presentation (API), application (use-case/business logic), domain (entities/events), infrastructure (persistence, background services, security), and contracts (DTOs).
File Structure Highlights
• src/CleanArchitecture.Api – HTTP entry-point, Controllers, Program.cs, DependencyInjection.
• src/CleanArchitecture.Application – Use-case layer: Commands, Queries, Handlers, Behaviors (validation/authorization), Interfaces.
• src/CleanArchitecture.Domain – Core entities, value objects, domain events, invariants.
• src/CleanArchitecture.Infrastructure – EF Core DbContext, Repositories, Middleware for eventual consistency, background email service, JWT token generator/validator, policy enforcer.
• tests/ – Unit tests (domain, application), subcutaneous tests (application+domain), integration tests (API+database).
Detail-Level Recommendations
• How DI wires up each layer (e.g., “Api → calls Application via MediatR”)
• How Domain Events are queued and processed after HTTP response
• “User Secrets / appsettings.json” configuration pointing to EmailSettings and JwtSettings