# jairos94/puravidastore architecture

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

- Interactive diagram: https://gitdiagram.com/jairos94/puravidastore
- Repository: https://github.com/jairos94/puravidastore

## Overview

PuraVidaStore is a store-management and point-of-sale application: its Angular client exposes sales, inventory movements, products, customers, warehouses, users, and reporting, while an ASP.NET Core API provides business operations backed by SQL Server. The principal workflow is a user entering the client, using a business feature, and having the API read or persist store data; invoice and movement records support reporting. The sampled code confirms movement and sales persistence and report assembly. Other feature paths are represented from the repository tree, but their runtime wiring was not sampled.

Main entry points: [`FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`](https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts) (Feature navigation), [`Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs`](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs) (Sales queries), [`Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs`](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs) (EF Core context), [`Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs`](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs) (Reporting endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular client"]
  node_app["Angular app<br/>[app.module.ts]"]
  node_login["Sign in<br/>[login.component.ts]"]
  node_navigation["Feature navigation"]
  node_sales_ui["Sales screens"]
  node_inventory_ui["Inventory screens"]
  node_catalog_ui["Products and warehouses"]
  node_customer_ui["Customer screens"]
  node_admin_ui["Users and settings"]
  node_report_ui["Report screens"]
end

subgraph group_api["Store API"]
  node_api_host["ASP.NET API<br/>[Program.cs]"]
  node_sales_api["Sales endpoints"]
  node_movement_api["Movement endpoints"]
  node_report_api["Reporting endpoints"]
  node_user_api["User endpoints"]
  node_other_api["Other store endpoints"]
end

subgraph group_queries["Data access"]
  node_sales_data["Sales queries<br/>[VentasQuery.cs]"]
  node_movement_data["Movement queries"]
  node_report_data["Report queries<br/>[ReportesQuery.cs]"]
end

subgraph group_storage["SQL data model"]
  node_db_context["EF Core context"]
  node_store_db[("Store database")]
  node_invoice_model["Invoices and details<br/>[Factura.cs]"]
  node_movement_model["Inventory movements<br/>[Movimiento.cs]"]
  node_user_model["Users and people<br/>[Usuario.cs]"]
end

node_operator(("Store operator"))

node_operator -.->|"uses"| node_app
node_app -->|"declares"| node_login
node_app -->|"imports routing"| node_navigation
node_navigation -->|"routes to"| node_sales_ui
node_navigation -->|"routes to"| node_inventory_ui
node_navigation -->|"routes to"| node_catalog_ui
node_navigation -->|"routes to"| node_customer_ui
node_navigation -->|"routes to"| node_admin_ui
node_operator -.->|"requests operations"| node_api_host
node_report_api -->|"queries reports"| node_report_data
node_report_api -->|"queries sales"| node_sales_data
node_report_api -->|"assembles report"| node_movement_model
node_movement_api -->|"delegates movements"| node_movement_data
node_sales_api -.->|"delegates sales"| node_sales_data
node_user_api -->|"manages accounts"| node_user_model
node_sales_data -->|"persists invoices"| node_db_context
node_movement_data -->|"updates inventory"| node_db_context
node_report_data -.->|"reads reports"| node_db_context
node_db_context -->|"maps entities"| node_store_db
node_sales_data -->|"writes invoices"| node_invoice_model
node_movement_data -->|"writes movements"| node_movement_model

click node_app "https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/app.module.ts"
click node_login "https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/login/login.component.ts"
click node_navigation "https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts"
click node_sales_ui "https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas"
click node_inventory_ui "https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/movimientos"
click node_catalog_ui "https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/productos"
click node_customer_ui "https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/clientes"
click node_admin_ui "https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/usuarios"
click node_report_ui "https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas/reportes/reportes.component.ts"
click node_api_host "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Program.cs"
click node_sales_api "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/VentasController.cs"
click node_movement_api "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/MovimientosController.cs"
click node_report_api "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs"
click node_user_api "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/UsuarioController.cs"
click node_other_api "https://github.com/jairos94/puravidastore/tree/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers"
click node_sales_data "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs"
click node_movement_data "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/MovimientosQuery.cs"
click node_report_data "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/ReportesQuery.cs"
click node_db_context "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs"
click node_store_db "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs"
click node_invoice_model "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Factura.cs"
click node_movement_model "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Movimiento.cs"
click node_user_model "https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Usuario.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_app,node_login,node_navigation,node_sales_ui,node_inventory_ui,node_catalog_ui,node_customer_ui,node_admin_ui,node_report_ui toneBlue
class node_api_host,node_sales_api,node_movement_api,node_report_api,node_user_api,node_other_api toneAmber
class node_sales_data,node_movement_data,node_report_data toneMint
class node_db_context,node_store_db,node_invoice_model,node_movement_model,node_user_model toneRose
class node_operator toneIndigo
```

## Components

### Angular client

- [Angular app](https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/app.module.ts): `FrontEnd/FrontEndPuraVidaStore/src/app/app.module.ts`
- [Sign in](https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/login/login.component.ts): `FrontEnd/FrontEndPuraVidaStore/src/app/login/login.component.ts`
- [Feature navigation](https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`
- [Sales screens](https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas`
- [Inventory screens](https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/movimientos): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/movimientos`
- [Products and warehouses](https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/productos): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/productos`
- [Customer screens](https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/clientes): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/clientes`
- [Users and settings](https://github.com/jairos94/puravidastore/tree/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/usuarios): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/usuarios`
- [Report screens](https://github.com/jairos94/puravidastore/blob/master/FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas/reportes/reportes.component.ts): `FrontEnd/FrontEndPuraVidaStore/src/app/principal/ventas/reportes/reportes.component.ts`

### Store API

- [ASP.NET API](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Program.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Program.cs`
- [Sales endpoints](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/VentasController.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/VentasController.cs`
- [Movement endpoints](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/MovimientosController.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/MovimientosController.cs`
- [Reporting endpoints](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs`
- [User endpoints](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/UsuarioController.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/UsuarioController.cs`
- [Other store endpoints](https://github.com/jairos94/puravidastore/tree/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers`

### Data access

- [Sales queries](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs`
- [Movement queries](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/MovimientosQuery.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/MovimientosQuery.cs`
- [Report queries](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/ReportesQuery.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/ReportesQuery.cs`

### SQL data model

- [EF Core context](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs`
- [Store database](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs`
- [Invoices and details](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Factura.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Factura.cs`
- [Inventory movements](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Movimiento.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Movimiento.cs`
- [Users and people](https://github.com/jairos94/puravidastore/blob/master/Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Usuario.cs): `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/Usuario.cs`

### Other components

- **Store operator**

## Connections

- Store operator → Angular app: uses
- Angular app → Sign in: declares (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/app.module.ts`)
- Angular app → Feature navigation: imports routing (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/app.module.ts`)
- Feature navigation → Sales screens: routes to (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`)
- Feature navigation → Inventory screens: routes to (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`)
- Feature navigation → Products and warehouses: routes to (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`)
- Feature navigation → Customer screens: routes to (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`)
- Feature navigation → Users and settings: routes to (evidence: `FrontEnd/FrontEndPuraVidaStore/src/app/principal/principal-routing.module.ts`)
- Store operator → ASP.NET API: requests operations
- Reporting endpoints → Report queries: queries reports (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs`)
- Reporting endpoints → Sales queries: queries sales (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs`)
- Reporting endpoints → Inventory movements: assembles report (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/ReportesController.cs`)
- Movement endpoints → Movement queries: delegates movements (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/MovimientosController.cs`)
- Sales endpoints → Sales queries: delegates sales
- User endpoints → Users and people: manages accounts (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Controllers/UsuarioController.cs`)
- Sales queries → EF Core context: persists invoices (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs`)
- Movement queries → EF Core context: updates inventory (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/MovimientosQuery.cs`)
- Report queries → EF Core context: reads reports
- EF Core context → Store database: maps entities (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/Models/DbContex/PuraVidaStoreContext.cs`)
- Sales queries → Invoices and details: writes invoices (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/VentasQuery.cs`)
- Movement queries → Inventory movements: writes movements (evidence: `Backend/PuraVidaStoreBK/PuraVidaStoreBK/ExecQuerys/MovimientosQuery.cs`)
