How maressay/proyecto-ecommerce-deportivo-net works
• User Interface (Frontend) Layer:
– Represented by the Views folder (with subdirectories for Admin, Carrito, Cliente, Contacto, Estadistica, Home, MisPedidos, NoCliente, Pago, Pedido, TipoCambio, and Shared).
– The wwwroot folder holds static assets (CSS, JavaScript, images, and libraries) that support the UI.
• Controller Layer:
– Two main subcategories:
○ UI Controllers (found in Controllers/UI) for serving rendered HTML pages.
○ REST Controllers (found in Controllers/Rest) for exposing APIs (e.g., for product and contact operations).
• Authentication & Identity Module:
– Located in the Areas/Identity folder, which contains pages and code-behind for login, registration, password management, and external login functionalities (including Google authentication).
• Business Logic & Service Layer:
– Found in the Models folder (classes such as CarritoService, EmailSender, and service classes under Models/Service) and DTOs, which encapsulate the core business rules (product management, order processing, shopping cart management, etc.).
• Data Access Layer:
– The Data folder contains ApplicationDbContext and all the EF Core migration files, demonstrating the use of an ORM (Entity Framework Core) to interact with the database.
• External Integrations:
– The Integrations folder shows connectors to external APIs (e.g., CurrencyExchangeApi, SendGridAPI for emails, WeatherAPI), which add extra functionality to the e-commerce operations.
• Infrastructure & Deployment:
– The Dockerfile and appsettings configuration files indicate containerization and environment-specific settings.
– The README also specifies commands for migrations and running the app.
– Database connectivity details are provided (hinting at a Postgres deployment on Render).
Relationships and data flows between components
• UI Controllers to the Views to represent response rendering and static assets served from wwwroot.
• API Controllers (REST) as endpoints accessed either through AJAX from the UI or through external systems.
• Path from both UI & API Controllers to the Business Logic Layer (Models and Services) where core processing takes place.
• Data flows from the Business Logic Layer down into the Data Access Layer (ApplicationDbContext with EF Core Migrations) and then to the Database (app.db or the external Postgres instance).
• External integrations by drawing connections from the Business Logic Layer to external services (currency exchange, email, weather), highlighting that these classes call external APIs.
Architectural patterns and design principles
• This project follows the MVC pattern, which should be clearly indicated by grouping the Views, Controllers, and Models separately.
• Separation of concerns is evident (authentication via Areas/Identity, business logic in Models/Service, API endpoints in a dedicated REST folder).
• The use of DTOs (in both the DTO folder and within Models/DTO) facilitates data transfer between layers.
• Integration with Entity Framework Core (via Migrations and ApplicationDbContext) shows a commitment to ORM-based data access.
• Containerization (using Dockerfile) signals deployment best practices and supports environment isolation.
Relevant technologies and frameworks
• ASP.NET Core MVC (for the overall web framework).
• Entity Framework Core (for database operations via ApplicationDbContext and migrations).
• . NET Identity (for user authentication and authorization, with dedicated Identity pages).
• External services: SendGrid (for email), CurrencyExchange API, Weather API.
• Client-side libraries and frameworks: Bootstrap and jQuery (located under wwwroot/lib).