How josesepulvedavelez/eureka_back works
Project type and purpose
• This is an ASP.NET Core Web API project (“EurekaBack”) designed to manage “Artículos”, “Clientes” and “Facturas” (invoices), backed by a relational database (Tablas.sql).
• It exposes RESTful endpoints via Controllers and uses Entity Framework Core (EurekaContext) for data access.
Main components
a. API Host / Container
• Program.cs & Startup (built‑in DI container, Kestrel server)
• appsettings.json (configuration, connection strings)
b. Controllers Layer
• ArticulosController
• ClientesController
• FacturasController
• (WeatherForecastController – sample or health endpoint)
c. DTOs / Mapping Layer
d. Data Access Layer
• EurekaContext (DbContext)
• Models (Articulo, Cliente, Factura, FacturaDetalle)
e. Database
• SQL Server / other RDBMS (tables defined in Tablas.sql)
f. External/Infrastructure
• Logging, Configuration Provider, Migrations (if any)
Relationships & Data Flow
• HTTP Request → Kestrel → Controller
• Controller injects EurekaContext via DI → Queries/Updates Models
• Models ↔ Database via EF Core (SQL queries executed)
• Query results mapped to DTOs → Controller → HTTP Response
• Configuration (appsettings.json) feeds connection strings into the DI container at startup
Architectural Patterns & Design Principles
• Layered Architecture:
• Presentation/API layer (Controllers)
• Application/Mapping layer (DTOs)
• Data Access layer (DbContext + Models)
• Dependency Injection (built‑in ASP.NET Core)
• Separation of Concerns: controllers do not directly manipulate database schemas—they use EF Core abstractions.
• RESTful routing conventions for resources.
Relevant Technologies/Frameworks
• ASP.NET Core Web API (Controllers, Middleware, DI container)
• Entity Framework Core (DbContext, Migrations)
• C# 10 / .NET 6+
• SQL Server (or any provider configured in appsettings.json)
• JSON serialization (System.Text.Json by default)
Step‑by‑step Creation
– Top: Controllers (list each Controller)
– Middle: DTOs & Mapping
– Bottom: EF Core / EurekaContext + Models
5. Optionally, show any external logs/monitoring or health-check endpoints.