How yofreca/base works
Project Type & Purpose
• This is a backend‐only RESTful API built with ASP.NET Core 3.1, organized according to Clean Architecture.
• Its purpose is to expose user‐ and token‐related endpoints, encapsulate business logic in a “Core” layer, handle persistence via Entity Framework Core in an “Infrastructure” layer, and support JWT authentication, validation, paging, and automapping.
File Structure
• Top-level layers:
– Api/ (presentation): Controllers, Program.cs, Startup.cs, appsettings.json, API responses.
– Core/ (domain & application): Entities, DTOs, QueryFilters, Interfaces (IServices & IRepositories), Services (implementation), CustomEntities (pagination), Exceptions.
– Infrastruture/ (persistence & cross-cutting): EF Core DbContext & Configurations, Repositories, Automapper mappings, FluentValidation validators, global filters.
– Base.UnitTest/ (test project): Unit tests for Core services or controllers.
• Build scripts & solution: Base.sln ties all projects; each layer is its own csproj.
• Dependencies: EF Core (SQL Server + Tools), AutoMapper, FluentValidation, JWT Bearer, Newtonsoft.Json.
README for Insights
• Confirms Clean Architecture and required NuGet dependencies.
Detail
– Capture all critical components: controllers, services, repositories, DbContext, filters, validators, mappings.
– Show how exceptions bubble up via GlobalExceptionFilter.
– Indicate paging/filtering flow through CustomEntities and QueryFilters.