# georgegc-ctrl/final-project-prog.-avanzada- architecture

> Architecture diagram of the GitHub repository georgegc-ctrl/final-project-prog.-avanzada-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/georgegc-ctrl/final-project-prog.-avanzada-
- Repository: https://github.com/georgegc-ctrl/final-project-prog.-avanzada-

## Overview

Northwind is a Windows desktop inventory-management application for maintaining categories, products, and suppliers, with low-stock reporting, supplier reassignment, and category price increases. The principal workflow starts in the WinForms application, opens a task-specific screen, invokes an application use case, and persists domain entities through repository implementations backed by Entity Framework Core and SQL Server. The sampled category screens and product-update use case show parts of this flow; other screen-to-use-case links are omitted where their source was not shown.

Main entry points: [`Northwind.WinForms/FrmPrincipal.cs`](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmPrincipal.cs) (Main window), [`Northwind.Infrastructure/EF Core/NorthwindDbContext.cs`](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Infrastructure/EF%20Core/NorthwindDbContext.cs) (EF Core context), [`Northwind.Application/UseCases/Productos`](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Productos) (Product operations), [`Northwind.Application/UseCases/Suplidores`](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Suplidores) (Supplier operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_startup["Application startup<br/>[Program.cs]"]
  node_main["Main window<br/>[FrmPrincipal.cs]"]
  node_category_ui["Category screens"]
  node_category_form["Category editor"]
  node_product_ui["Product screens<br/>[Northwind.WinForms]"]
  node_supplier_ui["Supplier screens<br/>[Northwind.WinForms]"]
  node_inventory_ui["Inventory report"]
end

subgraph group_application["Application workflows"]
  node_category_cases["Category operations<br/>[Categorias]"]
  node_product_cases["Product operations<br/>[Productos]"]
  node_supplier_cases["Supplier operations<br/>[Suplidores]"]
  node_validators["Request validation<br/>[Validators]"]
  node_dtos["Request and response DTOs<br/>[DTOs]"]
  node_repository_contracts["Repository contracts<br/>[Interfaces]"]
end

subgraph group_domain["Domain model"]
  node_result["Operation results<br/>[Result.cs]"]
  node_categories["Category entity<br/>[Categories.cs]"]
  node_products["Product entity<br/>[Products.cs]"]
  node_suppliers["Supplier entity<br/>[Suppliers.cs]"]
end

subgraph group_persistence["Persistence"]
  node_repo_impl["Repository implementations<br/>[Repositorios]"]
  node_dbcontext["EF Core context"]
  node_database[("SQL Server database")]
end

node_user(("Inventory user"))

node_user -->|"launches"| node_startup
node_startup -->|"resolves and runs"| node_main
node_main -.->|"opens"| node_category_ui
node_category_ui -->|"opens editor"| node_category_form
node_category_form -->|"invokes"| node_category_cases
node_category_ui -->|"invokes"| node_category_cases
node_main -.->|"opens"| node_product_ui
node_main -.->|"opens"| node_supplier_ui
node_main -.->|"opens"| node_inventory_ui
node_category_cases -->|"uses"| node_repository_contracts
node_product_cases -->|"uses"| node_repository_contracts
node_supplier_cases -->|"uses"| node_repository_contracts
node_product_cases -->|"validates"| node_validators
node_supplier_cases -->|"validates"| node_validators
node_product_cases -->|"updates"| node_products
node_supplier_cases -->|"updates"| node_suppliers
node_category_cases -->|"returns"| node_result
node_product_cases -->|"returns"| node_result
node_supplier_cases -->|"returns"| node_result
node_products -->|"references"| node_categories
node_products -->|"references"| node_suppliers
node_repository_contracts -->|"implemented by"| node_repo_impl
node_repo_impl -->|"uses"| node_dbcontext
node_dbcontext -->|"maps entities"| node_categories
node_dbcontext -->|"maps entities"| node_products
node_dbcontext -->|"maps entities"| node_suppliers
node_dbcontext -.->|"queries and persists"| node_database

click node_startup "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/Program.cs"
click node_main "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmPrincipal.cs"
click node_category_ui "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmCategoriaLista.cs"
click node_category_form "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmCategoriaForm.cs"
click node_product_ui "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.WinForms"
click node_supplier_ui "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.WinForms"
click node_inventory_ui "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmReporteInventario.cs"
click node_category_cases "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Categorias"
click node_product_cases "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Productos"
click node_supplier_cases "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Suplidores"
click node_validators "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/Validators"
click node_dtos "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/DTOs"
click node_repository_contracts "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/Interfaces"
click node_result "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Common/Result.cs"
click node_categories "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Categories.cs"
click node_products "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Products.cs"
click node_suppliers "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Suppliers.cs"
click node_repo_impl "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Infrastructure/Persistencia/Repositorios"
click node_dbcontext "https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Infrastructure/EF%20Core/NorthwindDbContext.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_startup,node_main,node_category_ui,node_category_form,node_product_ui,node_supplier_ui,node_inventory_ui,node_user toneBlue
class node_category_cases,node_product_cases,node_supplier_cases,node_validators,node_dtos,node_repository_contracts toneAmber
class node_result,node_categories,node_products,node_suppliers toneMint
class node_repo_impl,node_dbcontext,node_database toneRose
```

## Components

### Desktop UI

- [Application startup](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/Program.cs): `Northwind.WinForms/Program.cs`
- [Main window](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmPrincipal.cs): `Northwind.WinForms/FrmPrincipal.cs`
- [Category screens](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmCategoriaLista.cs): `Northwind.WinForms/FrmCategoriaLista.cs`
- [Category editor](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmCategoriaForm.cs): `Northwind.WinForms/FrmCategoriaForm.cs`
- [Product screens](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.WinForms): `Northwind.WinForms`
- [Supplier screens](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.WinForms): `Northwind.WinForms`
- [Inventory report](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.WinForms/FrmReporteInventario.cs): `Northwind.WinForms/FrmReporteInventario.cs`

### Application workflows

- [Category operations](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Categorias): `Northwind.Application/UseCases/Categorias`
- [Product operations](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Productos): `Northwind.Application/UseCases/Productos`
- [Supplier operations](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/UseCases/Suplidores): `Northwind.Application/UseCases/Suplidores`
- [Request validation](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/Validators): `Northwind.Application/Validators`
- [Request and response DTOs](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/DTOs): `Northwind.Application/DTOs`
- [Repository contracts](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Application/Interfaces): `Northwind.Application/Interfaces`

### Domain model

- [Operation results](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Common/Result.cs): `Northwind.Domain/Common/Result.cs`
- [Category entity](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Categories.cs): `Northwind.Domain/Entidades/Categories.cs`
- [Product entity](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Products.cs): `Northwind.Domain/Entidades/Products.cs`
- [Supplier entity](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Domain/Entidades/Suppliers.cs): `Northwind.Domain/Entidades/Suppliers.cs`

### Persistence

- [Repository implementations](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/tree/master/Northwind.Infrastructure/Persistencia/Repositorios): `Northwind.Infrastructure/Persistencia/Repositorios`
- [EF Core context](https://github.com/georgegc-ctrl/final-project-prog.-avanzada-/blob/master/Northwind.Infrastructure/EF%20Core/NorthwindDbContext.cs): `Northwind.Infrastructure/EF Core/NorthwindDbContext.cs`
- **SQL Server database**

### Other components

- **Inventory user**

## Connections

- Inventory user → Application startup: launches (evidence: `Northwind.WinForms/Program.cs`)
- Application startup → Main window: resolves and runs (evidence: `Northwind.WinForms/Program.cs`)
- Main window → Category screens: opens
- Category screens → Category editor: opens editor (evidence: `Northwind.WinForms/FrmCategoriaLista.cs`)
- Category editor → Category operations: invokes (evidence: `Northwind.WinForms/FrmCategoriaForm.cs`)
- Category screens → Category operations: invokes (evidence: `Northwind.WinForms/FrmCategoriaLista.cs`)
- Main window → Product screens: opens (evidence: `Northwind.WinForms/Program.cs`)
- Main window → Supplier screens: opens (evidence: `Northwind.WinForms/Program.cs`)
- Main window → Inventory report: opens
- Category operations → Repository contracts: uses (evidence: `Northwind.Application/UseCases/Categorias/CreateCategory.cs`)
- Product operations → Repository contracts: uses (evidence: `Northwind.Application/UseCases/Productos/UpdateProduct.cs`)
- Supplier operations → Repository contracts: uses (evidence: `Northwind.Application/UseCases/Suplidores/UpdateSupplier.cs`)
- Product operations → Request validation: validates (evidence: `Northwind.Application/UseCases/Productos/UpdateProduct.cs`)
- Supplier operations → Request validation: validates (evidence: `Northwind.Application/UseCases/Suplidores/UpdateSupplier.cs`)
- Product operations → Product entity: updates (evidence: `Northwind.Application/UseCases/Productos/UpdateProduct.cs`)
- Supplier operations → Supplier entity: updates (evidence: `Northwind.Application/UseCases/Suplidores/UpdateSupplier.cs`)
- Category operations → Operation results: returns (evidence: `Northwind.Application/UseCases/Categorias/CreateCategory.cs`)
- Product operations → Operation results: returns (evidence: `Northwind.Application/UseCases/Productos/UpdateProduct.cs`)
- Supplier operations → Operation results: returns (evidence: `Northwind.Application/UseCases/Suplidores/UpdateSupplier.cs`)
- Product entity → Category entity: references (evidence: `Northwind.Domain/Entidades/Products.cs`)
- Product entity → Supplier entity: references (evidence: `Northwind.Domain/Entidades/Products.cs`)
- Repository contracts → Repository implementations: implemented by (evidence: `Northwind.Infrastructure/DependencyInjections.cs`)
- Repository implementations → EF Core context: uses (evidence: `Northwind.Infrastructure/Persistencia/Repositorios/ProductoRepositorio.cs`)
- EF Core context → Category entity: maps entities (evidence: `Northwind.Infrastructure/EF Core/NorthwindDbContext.cs`)
- EF Core context → Product entity: maps entities (evidence: `Northwind.Infrastructure/EF Core/NorthwindDbContext.cs`)
- EF Core context → Supplier entity: maps entities (evidence: `Northwind.Infrastructure/EF Core/NorthwindDbContext.cs`)
- EF Core context → SQL Server database: queries and persists
