# constanza05-ctrl/ps-sonido-vivo architecture

> Architecture diagram of the GitHub repository constanza05-ctrl/ps-sonido-vivo, 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/constanza05-ctrl/ps-sonido-vivo
- Repository: https://github.com/constanza05-ctrl/ps-sonido-vivo

## Overview

Sonido Vivo is a React storefront and product-catalog application. The main shopping workflow is browsing and filtering the in-memory product catalog, adding an item to a persisted cart, and proceeding through checkout, which also stores orders locally. A separate admin page manages product records. The graph includes the documented public-facing pages and the sampled product/cart layers; several page implementations and checkout internals were not excerpted, so their internal behavior is not inferred.

Main entry points: [`src/App.jsx`](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/App.jsx) (Route dispatcher), [`src/pages/AdminProductos.jsx`](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/AdminProductos.jsx) (Product administration), [`src/services/productoService.js`](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/services/productoService.js) (Product operations), [`src/pages/Checkout.jsx`](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Checkout.jsx) (Checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Application routing"]
  node_app["Route dispatcher<br/>[App.jsx]"]
end

subgraph group_catalog["Catalog and inventory"]
  node_catalog_page["Catalog page<br/>[Catalogo.jsx]"]
  node_detail_page["Product detail"]
  node_admin_page["Product administration<br/>[AdminProductos.jsx]"]
  node_product_context["Product state"]
  node_product_service["Product operations<br/>[productoService.js]"]
  node_product_data["Initial products<br/>[productos.js]"]
  node_categories["Product categories<br/>[categorias.js]"]
  node_product_validation["Product validation<br/>[validarProducto.js]"]
  node_price["Offer pricing<br/>[precioProducto.js]"]
  node_catalog_template["Catalog layout"]
  node_product_list["Product listing<br/>[ListaProductos.jsx]"]
  node_product_card["Product card<br/>[ProductoCard.jsx]"]
end

subgraph group_shopping["Cart and checkout"]
  node_cart_page["Cart page<br/>[Carrito.jsx]"]
  node_cart_context["Cart state<br/>[CarritoContext.jsx]"]
  node_cart_service["Cart and order storage<br/>[carritoService.js]"]
  node_cart_template["Cart layout"]
  node_cart_list["Cart item list<br/>[ListaCarrito.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_order_result["Purchase result"]
end

subgraph group_presentation["Storefront presentation"]
  node_home["Home page<br/>[Inicio.jsx]"]
  node_public_pages["Public information pages"]
  node_profile["Profile page<br/>[Perfil.jsx]"]
end

node_visitor(("Shopper"))
node_admin_user(("Administrator"))
node_browser_storage[("Browser local storage")]

node_visitor -->|"opens store"| node_app
node_admin_user -->|"opens store"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_catalog_page
node_app -->|"routes to"| node_cart_page
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_admin_page
node_app -->|"routes to"| node_public_pages
node_app -->|"routes to"| node_profile
node_catalog_page -->|"reads products"| node_product_context
node_catalog_page -->|"renders"| node_catalog_template
node_detail_page -->|"reads products"| node_product_context
node_admin_page -->|"manages products"| node_product_context
node_admin_page -->|"uses categories"| node_categories
node_admin_page -->|"calculates preview"| node_price
node_product_context -->|"delegates operations"| node_product_service
node_product_service -->|"loads defaults"| node_product_data
node_product_service -->|"validates records"| node_product_validation
node_product_service -->|"reads and writes"| node_browser_storage
node_product_validation -->|"checks category"| node_categories
node_catalog_template -->|"renders"| node_product_list
node_product_list -->|"renders items"| node_product_card
node_product_card -->|"adds product"| node_cart_context
node_product_card -->|"calculates display price"| node_price
node_cart_page -->|"renders"| node_cart_template
node_cart_template -->|"renders"| node_cart_list
node_cart_context -->|"loads and saves cart"| node_cart_service
node_cart_context -->|"calculates item price"| node_price
node_cart_service -->|"reads and writes"| node_browser_storage
node_checkout -->|"reads cart state"| node_cart_context
node_checkout -->|"stores orders"| node_cart_service
node_checkout -.->|"shows outcome"| node_order_result

click node_app "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/App.jsx"
click node_home "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Inicio.jsx"
click node_public_pages "https://github.com/constanza05-ctrl/ps-sonido-vivo/tree/main/src/pages"
click node_profile "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Perfil.jsx"
click node_catalog_page "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Catalogo.jsx"
click node_detail_page "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/ProductoDetalle.jsx"
click node_admin_page "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/AdminProductos.jsx"
click node_product_context "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/context/ProductoContext.jsx"
click node_product_service "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/services/productoService.js"
click node_product_data "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/data/productos.js"
click node_categories "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/data/categorias.js"
click node_product_validation "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/utils/validarProducto.js"
click node_price "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/utils/precioProducto.js"
click node_catalog_template "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/templates/CatalogoTemplate.jsx"
click node_product_list "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/organisms/ListaProductos.jsx"
click node_product_card "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/molecules/ProductoCard.jsx"
click node_cart_page "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Carrito.jsx"
click node_cart_context "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/context/CarritoContext.jsx"
click node_cart_service "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/services/carritoService.js"
click node_cart_template "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/templates/CarritoTemplate.jsx"
click node_cart_list "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/organisms/ListaCarrito.jsx"
click node_checkout "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Checkout.jsx"
click node_order_result "https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/ResultadoCompra.jsx"

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 toneBlue
class node_catalog_page,node_detail_page,node_admin_page,node_product_context,node_product_service,node_product_data,node_categories,node_product_validation,node_price,node_catalog_template,node_product_list,node_product_card,node_browser_storage toneAmber
class node_cart_page,node_cart_context,node_cart_service,node_cart_template,node_cart_list,node_checkout,node_order_result toneMint
class node_home,node_public_pages,node_profile toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### Application routing

- [Route dispatcher](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/App.jsx): `src/App.jsx`

### Catalog and inventory

- [Catalog page](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Catalogo.jsx): `src/pages/Catalogo.jsx`
- [Product detail](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/ProductoDetalle.jsx): `src/pages/ProductoDetalle.jsx`
- [Product administration](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/AdminProductos.jsx): `src/pages/AdminProductos.jsx`
- [Product state](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/context/ProductoContext.jsx): `src/context/ProductoContext.jsx`
- [Product operations](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/services/productoService.js): `src/services/productoService.js`
- [Initial products](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/data/productos.js): `src/data/productos.js`
- [Product categories](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/data/categorias.js): `src/data/categorias.js`
- [Product validation](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/utils/validarProducto.js): `src/utils/validarProducto.js`
- [Offer pricing](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/utils/precioProducto.js): `src/utils/precioProducto.js`
- [Catalog layout](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/templates/CatalogoTemplate.jsx): `src/components/templates/CatalogoTemplate.jsx`
- [Product listing](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/organisms/ListaProductos.jsx): `src/components/organisms/ListaProductos.jsx`
- [Product card](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/molecules/ProductoCard.jsx): `src/components/molecules/ProductoCard.jsx`

### Cart and checkout

- [Cart page](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Carrito.jsx): `src/pages/Carrito.jsx`
- [Cart state](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/context/CarritoContext.jsx): `src/context/CarritoContext.jsx`
- [Cart and order storage](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/services/carritoService.js): `src/services/carritoService.js`
- [Cart layout](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/templates/CarritoTemplate.jsx): `src/components/templates/CarritoTemplate.jsx`
- [Cart item list](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/components/organisms/ListaCarrito.jsx): `src/components/organisms/ListaCarrito.jsx`
- [Checkout](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Checkout.jsx): `src/pages/Checkout.jsx`
- [Purchase result](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/ResultadoCompra.jsx): `src/pages/ResultadoCompra.jsx`

### Storefront presentation

- [Home page](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Inicio.jsx): `src/pages/Inicio.jsx`
- [Public information pages](https://github.com/constanza05-ctrl/ps-sonido-vivo/tree/main/src/pages): `src/pages`
- [Profile page](https://github.com/constanza05-ctrl/ps-sonido-vivo/blob/main/src/pages/Perfil.jsx): `src/pages/Perfil.jsx`

### Other components

- **Shopper**
- **Administrator**
- **Browser local storage**

## Connections

- Shopper → Route dispatcher: opens store (evidence: `README.md`)
- Administrator → Route dispatcher: opens store (evidence: `README.md`)
- Route dispatcher → Home page: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Catalog page: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Cart page: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Checkout: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product administration: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Public information pages: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Profile page: routes to (evidence: `src/App.jsx`)
- Catalog page → Product state: reads products (evidence: `src/pages/Catalogo.jsx`)
- Catalog page → Catalog layout: renders (evidence: `src/pages/Catalogo.jsx`)
- Product detail → Product state: reads products (evidence: `src/pages/ProductoDetalle.jsx`)
- Product administration → Product state: manages products (evidence: `src/pages/AdminProductos.jsx`)
- Product administration → Product categories: uses categories (evidence: `src/pages/AdminProductos.jsx`)
- Product administration → Offer pricing: calculates preview (evidence: `src/pages/AdminProductos.jsx`)
- Product state → Product operations: delegates operations (evidence: `src/context/ProductoContext.jsx`)
- Product operations → Initial products: loads defaults (evidence: `src/services/productoService.js`)
- Product operations → Product validation: validates records (evidence: `src/services/productoService.js`)
- Product operations → Browser local storage: reads and writes (evidence: `src/services/productoService.js`)
- Product validation → Product categories: checks category (evidence: `src/utils/validarProducto.js`)
- Catalog layout → Product listing: renders (evidence: `src/components/templates/CatalogoTemplate.jsx`)
- Product listing → Product card: renders items (evidence: `src/components/organisms/ListaProductos.jsx`)
- Product card → Cart state: adds product (evidence: `src/components/molecules/ProductoCard.jsx`)
- Product card → Offer pricing: calculates display price (evidence: `src/components/molecules/ProductoCard.jsx`)
- Cart page → Cart layout: renders (evidence: `src/pages/Carrito.jsx`)
- Cart layout → Cart item list: renders (evidence: `src/components/templates/CarritoTemplate.jsx`)
- Cart state → Cart and order storage: loads and saves cart (evidence: `src/context/CarritoContext.jsx`)
- Cart state → Offer pricing: calculates item price (evidence: `src/context/CarritoContext.jsx`)
- Cart and order storage → Browser local storage: reads and writes (evidence: `src/services/carritoService.js`)
- Checkout → Cart state: reads cart state (evidence: `src/pages/Checkout.jsx`)
- Checkout → Cart and order storage: stores orders (evidence: `src/pages/Checkout.jsx`)
- Checkout → Purchase result: shows outcome
