# liavhv/simpleinventarionet8 architecture

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

- Interactive diagram: https://gitdiagram.com/liavhv/simpleinventarionet8
- Repository: https://github.com/liavhv/simpleinventarionet8

## Overview

SimpleInventarioNet8 is an ASP.NET Core MVC inventory application. Users manage product, supplier, and unit catalogs; record stock receipts and dispatches; then review stock alerts and inventory/Kardex reports. Movement services apply stock changes and persist transaction history through the EF Core context. The README documents the major screens and service responsibilities; several controller and service implementations are not excerpted, so their internal calls are omitted unless documented.

Main entry points: [`Data/ApplicationDbContext.cs`](https://github.com/liavhv/simpleinventarionet8/blob/master/Data/ApplicationDbContext.cs) (EF Core context), [`Services/ReportesService.cs`](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/ReportesService.cs) (Kardex queries), [`Services/InventarioService.cs`](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/InventarioService.cs) (Stock rules), [`Controllers/ProductosController.cs`](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ProductosController.cs) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_home["Dashboard<br/>[HomeController.cs]"]
  node_products["Product catalog"]
  node_suppliers["Supplier catalog"]
  node_units["Unit catalog"]
  node_productviews["Product screens"]
  node_catalogviews["Catalog screens"]
  node_unitviews["Unit screens"]
end

subgraph group_inventory["Inventory operations"]
  node_receipt["Receipt workflow"]
  node_dispatch["Dispatch workflow"]
  node_inventoryservice["Stock rules"]
  node_inventorycontract["Stock service contract"]
  node_movementviews["Movement screens"]
  node_dispatchviews["Dispatch screen"]
end

subgraph group_reporting["Reporting"]
  node_reports["Report workflows"]
  node_reportservice["Kardex queries<br/>[ReportesService.cs]"]
  node_reportcontract["Report contract"]
  node_reportviews["Report screens"]
end

subgraph group_data["Domain and persistence"]
  node_stockdata["Inventory entities<br/>[Productos.cs]"]
  node_movementdata["Movement entities<br/>[Entradas.cs]"]
  node_supplierdata["Supplier entity<br/>[Proveedores.cs]"]
  node_unitdata["Unit entity<br/>[Unidades.cs]"]
  node_movementtypes["Movement types<br/>[TipoMovimiento.cs]"]
  node_pagination["Pagination helper<br/>[Paginar.cs]"]
  node_dbcontext["EF Core context"]
end

node_user(("Inventory user"))
node_database[("Relational database")]

node_user -->|"opens"| node_home
node_user -->|"manages"| node_products
node_user -->|"manages"| node_suppliers
node_user -->|"manages"| node_units
node_user -->|"records receipt"| node_receipt
node_user -->|"records dispatch"| node_dispatch
node_user -->|"reviews reports"| node_reports
node_products -->|"renders"| node_productviews
node_suppliers -->|"renders"| node_catalogviews
node_units -->|"renders"| node_unitviews
node_receipt -->|"renders"| node_movementviews
node_dispatch -->|"renders"| node_dispatchviews
node_reports -->|"renders"| node_reportviews
node_receipt -->|"uses"| node_inventorycontract
node_dispatch -->|"uses"| node_inventorycontract
node_inventoryservice -->|"implements"| node_inventorycontract
node_inventoryservice -->|"updates stock"| node_dbcontext
node_inventoryservice -->|"persists movements"| node_movementdata
node_reports -->|"uses"| node_reportcontract
node_reportservice -->|"implements"| node_reportcontract
node_reportservice -->|"queries history"| node_dbcontext
node_reportservice -->|"labels movements"| node_movementtypes
node_reportservice -->|"paginates results"| node_pagination
node_products -->|"queries catalog"| node_dbcontext
node_dbcontext -->|"maps"| node_stockdata
node_dbcontext -->|"maps"| node_movementdata
node_dbcontext -->|"maps"| node_supplierdata
node_dbcontext -->|"maps"| node_unitdata
node_dbcontext -.->|"persists entities"| node_database

click node_home "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/HomeController.cs"
click node_products "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ProductosController.cs"
click node_suppliers "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ProveedoresController.cs"
click node_units "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/UnidadesController.cs"
click node_productviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Productos"
click node_catalogviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Proveedores"
click node_unitviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Unidades"
click node_receipt "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/EntradasController.cs"
click node_dispatch "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/SalidasController.cs"
click node_inventoryservice "https://github.com/liavhv/simpleinventarionet8/blob/master/Services/InventarioService.cs"
click node_inventorycontract "https://github.com/liavhv/simpleinventarionet8/blob/master/Services/IInventarioService.cs"
click node_movementviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Entradas"
click node_dispatchviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Salidas"
click node_reports "https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ReportesController.cs"
click node_reportservice "https://github.com/liavhv/simpleinventarionet8/blob/master/Services/ReportesService.cs"
click node_reportcontract "https://github.com/liavhv/simpleinventarionet8/blob/master/Services/IReportesService.cs"
click node_reportviews "https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Reportes"
click node_stockdata "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Productos.cs"
click node_movementdata "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Entradas.cs"
click node_supplierdata "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Proveedores.cs"
click node_unitdata "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Unidades.cs"
click node_movementtypes "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/TipoMovimiento.cs"
click node_pagination "https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Paginar.cs"
click node_dbcontext "https://github.com/liavhv/simpleinventarionet8/blob/master/Data/ApplicationDbContext.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_home,node_products,node_suppliers,node_units,node_productviews,node_catalogviews,node_unitviews,node_user toneBlue
class node_receipt,node_dispatch,node_inventoryservice,node_inventorycontract,node_movementviews,node_dispatchviews,node_database toneAmber
class node_reports,node_reportservice,node_reportcontract,node_reportviews toneMint
class node_stockdata,node_movementdata,node_supplierdata,node_unitdata,node_movementtypes,node_pagination,node_dbcontext toneRose
```

## Components

### Web workflows

- [Dashboard](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Product catalog](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ProductosController.cs): `Controllers/ProductosController.cs`
- [Supplier catalog](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ProveedoresController.cs): `Controllers/ProveedoresController.cs`
- [Unit catalog](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/UnidadesController.cs): `Controllers/UnidadesController.cs`
- [Product screens](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Productos): `Views/Productos`
- [Catalog screens](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Proveedores): `Views/Proveedores`
- [Unit screens](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Unidades): `Views/Unidades`

### Inventory operations

- [Receipt workflow](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/EntradasController.cs): `Controllers/EntradasController.cs`
- [Dispatch workflow](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/SalidasController.cs): `Controllers/SalidasController.cs`
- [Stock rules](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/InventarioService.cs): `Services/InventarioService.cs`
- [Stock service contract](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/IInventarioService.cs): `Services/IInventarioService.cs`
- [Movement screens](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Entradas): `Views/Entradas`
- [Dispatch screen](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Salidas): `Views/Salidas`

### Reporting

- [Report workflows](https://github.com/liavhv/simpleinventarionet8/blob/master/Controllers/ReportesController.cs): `Controllers/ReportesController.cs`
- [Kardex queries](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/ReportesService.cs): `Services/ReportesService.cs`
- [Report contract](https://github.com/liavhv/simpleinventarionet8/blob/master/Services/IReportesService.cs): `Services/IReportesService.cs`
- [Report screens](https://github.com/liavhv/simpleinventarionet8/tree/master/Views/Reportes): `Views/Reportes`

### Domain and persistence

- [Inventory entities](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Productos.cs): `Models/Productos.cs`
- [Movement entities](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Entradas.cs): `Models/Entradas.cs`
- [Supplier entity](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Proveedores.cs): `Models/Proveedores.cs`
- [Unit entity](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Unidades.cs): `Models/Unidades.cs`
- [Movement types](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/TipoMovimiento.cs): `Models/TipoMovimiento.cs`
- [Pagination helper](https://github.com/liavhv/simpleinventarionet8/blob/master/Models/Paginar.cs): `Models/Paginar.cs`
- [EF Core context](https://github.com/liavhv/simpleinventarionet8/blob/master/Data/ApplicationDbContext.cs): `Data/ApplicationDbContext.cs`

### Other components

- **Inventory user**
- **Relational database**

## Connections

- Inventory user → Dashboard: opens (evidence: `README.md`)
- Inventory user → Product catalog: manages (evidence: `README.md`)
- Inventory user → Supplier catalog: manages (evidence: `README.md`)
- Inventory user → Unit catalog: manages (evidence: `README.md`)
- Inventory user → Receipt workflow: records receipt (evidence: `README.md`)
- Inventory user → Dispatch workflow: records dispatch (evidence: `README.md`)
- Inventory user → Report workflows: reviews reports (evidence: `README.md`)
- Product catalog → Product screens: renders (evidence: `README.md`)
- Supplier catalog → Catalog screens: renders (evidence: `README.md`)
- Unit catalog → Unit screens: renders (evidence: `README.md`)
- Receipt workflow → Movement screens: renders (evidence: `README.md`)
- Dispatch workflow → Dispatch screen: renders (evidence: `README.md`)
- Report workflows → Report screens: renders (evidence: `README.md`)
- Receipt workflow → Stock service contract: uses (evidence: `Controllers/EntradasController.cs`)
- Dispatch workflow → Stock service contract: uses (evidence: `Controllers/SalidasController.cs`)
- Stock rules → Stock service contract: implements (evidence: `Services/InventarioService.cs`)
- Stock rules → EF Core context: updates stock (evidence: `Services/InventarioService.cs`)
- Stock rules → Movement entities: persists movements (evidence: `Services/InventarioService.cs`)
- Report workflows → Report contract: uses (evidence: `Controllers/ReportesController.cs`)
- Kardex queries → Report contract: implements (evidence: `Services/ReportesService.cs`)
- Kardex queries → EF Core context: queries history (evidence: `Services/ReportesService.cs`)
- Kardex queries → Movement types: labels movements (evidence: `Services/ReportesService.cs`)
- Kardex queries → Pagination helper: paginates results (evidence: `Services/ReportesService.cs`)
- Product catalog → EF Core context: queries catalog (evidence: `Controllers/ProductosController.cs`)
- EF Core context → Inventory entities: maps (evidence: `Data/ApplicationDbContext.cs`)
- EF Core context → Movement entities: maps (evidence: `Data/ApplicationDbContext.cs`)
- EF Core context → Supplier entity: maps (evidence: `Data/ApplicationDbContext.cs`)
- EF Core context → Unit entity: maps (evidence: `Data/ApplicationDbContext.cs`)
- EF Core context → Relational database: persists entities
