How kickfury/api-lacteos works
Main components
• Backend API (API-LACTEOS): Contains .NET project files, controllers (handling requests for clients, purchases, reports, etc.), models (data entities and the EF DbContext – LacteosBdContext), services (business logic and database interactions), and report definitions (RDLC files).
• Frontend Presentation (Views-Lacteos): Uses Razor pages and standard .NET view components, coupled with a rich set of static resources (CSS, JavaScript, images) for UI/UX.
• Data Layer: The database interactions are managed via Entity Framework represented by the DbContext in the Models folder.
• External Dependencies/Utilities: The project includes build configurations, GitHub workflows, and configuration files (appsettings.json) which support deployment and testing.
Relationships and interactions
• Request Flow: The client (via a web browser) accesses the frontend (Views-Lacteos). The UI is built on Razor pages and calls the backend API endpoints exposed by the controllers.
• API Components: Controllers in API-LACTEOS receive HTTP requests. They use services (in the Servicios folder) to interact with models (domain entities) and execute business logic.
• Database Communication: The models include the DbContext (LacteosBdContext) that abstracts away direct database calls.
• Reporting Module: The Reportes folder contains RDLC files that are likely used by certain controllers to generate and render reports.
Architectural patterns and design principles
• Separation of concerns: The backend has a clear division between controllers (handling API requests), services (business logic), and models (data definition and persistence).
• MVC/MVVM-like structure: There is a clear separation between the Presentation layer (Razor pages in Views-Lacteos) and the API/business layer (within API-LACTEOS).
• Use of dependency injection is typical in .NET projects for loosely-coupled services, even though it’s not explicitly shown by file names.
• Reporting integration: A dedicated reports folder suggests modular design where reporting is handled separately.
Specific technologies and frameworks
• .NET and C#: The core language and framework.
• ASP.NET Core (or ASP.NET MVC/Razor Pages): For both the API endpoints in API-LACTEOS and the views in Views-Lacteos.
• Entity Framework: As suggested by the LacteosBdContext for database operations.
• RDLC Reporting: For generating reports as seen in API-LACTEOS/Reportes.
• Frontend Libraries: Bootstrap and jQuery are used alongside custom JavaScript and CSS files.