# tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana architecture

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

- Interactive diagram: https://gitdiagram.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana
- Repository: https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana

## Overview

MiWebApp is an ASP.NET Core MVC storefront-style application for maintaining products and customer budgets (presupuestos). Users reach controller actions through the default route; product and budget actions retrieve or mutate records through repositories, then return MVC views. Budget records can include product details, and the repositories use the SQLite database at `MiWebApp/db/Tienda.db`. The sampled code supports the CRUD and persistence relationships shown; the view files and database contents were not sampled, so their internal behavior is not inferred.

Main entry points: [`MiWebApp/Repositorios/PresupuestosRepository.cs`](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/PresupuestosRepository.cs) (Budget repository), [`MiWebApp/Program.cs`](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Program.cs) (MVC startup and routing), [`MiWebApp/Controllers/ProductosController.cs`](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/ProductosController.cs) (Product actions), [`MiWebApp/Repositorios/ProductoRepository.cs`](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/ProductoRepository.cs) (Product repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_program["MVC startup and routing<br/>[Program.cs]"]
  node_home["Home and error actions<br/>[HomeController.cs]"]
  node_error["Error view model<br/>[ErrorViewModel.cs]"]
  node_views["MVC views"]
end

subgraph group_catalog["Product catalog"]
  node_product_controller["Product actions"]
  node_product_repo["Product repository"]
end

subgraph group_budgets["Budget management"]
  node_budget_controller["Budget actions"]
  node_budget_repo["Budget repository"]
end

subgraph group_data["Domain and persistence"]
  node_product_model["Product model<br/>[Productos.cs]"]
  node_budget_model["Budget model<br/>[Presupuestos.cs]"]
  node_detail_model["Budget line model"]
  node_sqlite[("SQLite database<br/>[Tienda.db]")]
end

node_user(("User"))

node_user -->|"sends requests"| node_program
node_program -->|"routes requests"| node_home
node_program -->|"routes requests"| node_product_controller
node_program -->|"routes requests"| node_budget_controller
node_home -->|"creates model"| node_error
node_home -->|"returns views"| node_views
node_product_controller -->|"calls repository"| node_product_repo
node_product_controller -->|"binds products"| node_product_model
node_product_controller -->|"returns views"| node_views
node_product_repo -->|"reads and writes"| node_product_model
node_product_repo -->|"queries products"| node_sqlite
node_product_repo -->|"deletes product lines"| node_sqlite
node_budget_controller -->|"calls repository"| node_budget_repo
node_budget_controller -->|"binds budgets"| node_budget_model
node_budget_controller -->|"returns views"| node_views
node_budget_repo -->|"reads and writes"| node_budget_model
node_budget_repo -->|"builds line items"| node_detail_model
node_budget_repo -->|"builds product details"| node_product_model
node_budget_repo -->|"queries budget tables"| node_sqlite
node_budget_model -->|"calculates from lines"| node_detail_model
node_detail_model -->|"contains product"| node_product_model

click node_program "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Program.cs"
click node_home "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/HomeController.cs"
click node_error "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/ErrorViewModel.cs"
click node_views "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/tree/main/MiWebApp/Views"
click node_product_controller "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/ProductosController.cs"
click node_product_repo "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/ProductoRepository.cs"
click node_product_model "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/Productos.cs"
click node_budget_controller "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/PresupuestosController.cs"
click node_budget_repo "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/PresupuestosRepository.cs"
click node_budget_model "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/Presupuestos.cs"
click node_detail_model "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/PresupuestosDetalle.cs"
click node_sqlite "https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/db/Tienda.db"

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_program,node_home,node_error,node_views,node_user toneBlue
class node_product_controller,node_product_repo toneAmber
class node_budget_controller,node_budget_repo toneMint
class node_product_model,node_budget_model,node_detail_model,node_sqlite toneRose
```

## Components

### Web application

- [MVC startup and routing](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Program.cs): `MiWebApp/Program.cs`
- [Home and error actions](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/HomeController.cs): `MiWebApp/Controllers/HomeController.cs`
- [Error view model](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/ErrorViewModel.cs): `MiWebApp/Models/ErrorViewModel.cs`
- [MVC views](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/tree/main/MiWebApp/Views): `MiWebApp/Views`

### Product catalog

- [Product actions](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/ProductosController.cs): `MiWebApp/Controllers/ProductosController.cs`
- [Product repository](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/ProductoRepository.cs): `MiWebApp/Repositorios/ProductoRepository.cs`

### Budget management

- [Budget actions](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Controllers/PresupuestosController.cs): `MiWebApp/Controllers/PresupuestosController.cs`
- [Budget repository](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Repositorios/PresupuestosRepository.cs): `MiWebApp/Repositorios/PresupuestosRepository.cs`

### Domain and persistence

- [Product model](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/Productos.cs): `MiWebApp/Models/Productos.cs`
- [Budget model](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/Presupuestos.cs): `MiWebApp/Models/Presupuestos.cs`
- [Budget line model](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/Models/PresupuestosDetalle.cs): `MiWebApp/Models/PresupuestosDetalle.cs`
- [SQLite database](https://github.com/tallerdelenguajes2/tl2-tp8-2025-cesar24-orellana/blob/main/MiWebApp/db/Tienda.db): `MiWebApp/db/Tienda.db`

### Other components

- **User**

## Connections

- User → MVC startup and routing: sends requests (evidence: `MiWebApp/Program.cs`)
- MVC startup and routing → Home and error actions: routes requests (evidence: `MiWebApp/Program.cs`)
- MVC startup and routing → Product actions: routes requests (evidence: `MiWebApp/Program.cs`)
- MVC startup and routing → Budget actions: routes requests (evidence: `MiWebApp/Program.cs`)
- Home and error actions → Error view model: creates model (evidence: `MiWebApp/Controllers/HomeController.cs`)
- Home and error actions → MVC views: returns views (evidence: `MiWebApp/Controllers/HomeController.cs`)
- Product actions → Product repository: calls repository (evidence: `MiWebApp/Controllers/ProductosController.cs`)
- Product actions → Product model: binds products (evidence: `MiWebApp/Controllers/ProductosController.cs`)
- Product actions → MVC views: returns views (evidence: `MiWebApp/Controllers/ProductosController.cs`)
- Product repository → Product model: reads and writes (evidence: `MiWebApp/Repositorios/ProductoRepository.cs`)
- Product repository → SQLite database: queries products (evidence: `MiWebApp/Repositorios/ProductoRepository.cs`)
- Product repository → SQLite database: deletes product lines (evidence: `MiWebApp/Repositorios/ProductoRepository.cs`)
- Budget actions → Budget repository: calls repository (evidence: `MiWebApp/Controllers/PresupuestosController.cs`)
- Budget actions → Budget model: binds budgets (evidence: `MiWebApp/Controllers/PresupuestosController.cs`)
- Budget actions → MVC views: returns views (evidence: `MiWebApp/Controllers/PresupuestosController.cs`)
- Budget repository → Budget model: reads and writes (evidence: `MiWebApp/Repositorios/PresupuestosRepository.cs`)
- Budget repository → Budget line model: builds line items (evidence: `MiWebApp/Repositorios/PresupuestosRepository.cs`)
- Budget repository → Product model: builds product details (evidence: `MiWebApp/Repositorios/PresupuestosRepository.cs`)
- Budget repository → SQLite database: queries budget tables (evidence: `MiWebApp/Repositorios/PresupuestosRepository.cs`)
- Budget model → Budget line model: calculates from lines (evidence: `MiWebApp/Models/Presupuestos.cs`)
- Budget line model → Product model: contains product (evidence: `MiWebApp/Models/PresupuestosDetalle.cs`)
