# migueldocente/proyectofinal_26238 architecture

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

- Interactive diagram: https://gitdiagram.com/migueldocente/proyectofinal_26238
- Repository: https://github.com/migueldocente/proyectofinal_26238

## Overview

This is a small Spanish-language storefront with home, shop, cart, and contact pages. The principal evidenced workflow is fetching products from FakeStoreAPI, rendering them in the shop, and letting a shopper add an item to browser storage; the cart script reads that storage and renders rows. Product details also have a modal. The cart total updater is present but empty. HTML-to-script wiring and the contact-page behavior are not shown, so those relationships are omitted.

Main entry points: [`script/tienda.js`](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js) (Product cards), [`script/carrito.js`](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/carrito.js) (Cart rendering), [`index.html`](https://github.com/migueldocente/proyectofinal_26238/blob/main/index.html) (Home page), [`pages/tienda.html`](https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/tienda.html) (Shop page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["Storefront pages"]
  node_home["Home page<br/>[index.html]"]
  node_shop["Shop page<br/>[tienda.html]"]
  node_cartpage["Cart page<br/>[carrito.html]"]
  node_contact["Contact page<br/>[contacto.html]"]
end

subgraph group_runtime["Browser behavior"]
  node_navigation["Mobile navigation<br/>[script.js]"]
  node_catalog["Catalog loading<br/>[tienda.js]"]
  node_productcards["Product cards<br/>[tienda.js]"]
  node_cartactions["Cart actions<br/>[tienda.js]"]
  node_detailsmodal["Details modal<br/>[tienda.js]"]
  node_cartview["Cart rendering<br/>[carrito.js]"]
  node_carttotal["Cart total updater<br/>[carrito.js]"]
end

subgraph group_data["Product data"]
  node_api{{"FakeStoreAPI"}}
  node_storage[("Browser storage")]
end

node_shopper(("Shopper"))

node_shopper -->|"opens"| node_home
node_shopper -->|"browses"| node_shop
node_shopper -->|"views"| node_cartpage
node_shopper -->|"visits"| node_contact
node_catalog -->|"fetches products"| node_api
node_catalog -->|"renders products"| node_productcards
node_productcards -->|"attaches handlers"| node_cartactions
node_cartactions -->|"reads and writes"| node_storage
node_productcards -->|"opens details"| node_detailsmodal
node_cartview -->|"reads cart"| node_storage
node_cartview -->|"updates total"| node_carttotal

click node_home "https://github.com/migueldocente/proyectofinal_26238/blob/main/index.html"
click node_shop "https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/tienda.html"
click node_cartpage "https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/carrito.html"
click node_contact "https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/contacto.html"
click node_navigation "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/script.js"
click node_catalog "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js"
click node_productcards "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js"
click node_cartactions "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js"
click node_detailsmodal "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js"
click node_cartview "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/carrito.js"
click node_carttotal "https://github.com/migueldocente/proyectofinal_26238/blob/main/script/carrito.js"

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_shop,node_cartpage,node_contact toneBlue
class node_navigation,node_catalog,node_productcards,node_cartactions,node_detailsmodal,node_cartview,node_carttotal toneAmber
class node_api,node_storage toneMint
class node_shopper toneIndigo
```

## Components

### Storefront pages

- [Home page](https://github.com/migueldocente/proyectofinal_26238/blob/main/index.html): `index.html`
- [Shop page](https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/tienda.html): `pages/tienda.html`
- [Cart page](https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/carrito.html): `pages/carrito.html`
- [Contact page](https://github.com/migueldocente/proyectofinal_26238/blob/main/pages/contacto.html): `pages/contacto.html`

### Browser behavior

- [Mobile navigation](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/script.js): `script/script.js`
- [Catalog loading](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js): `script/tienda.js`
- [Product cards](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js): `script/tienda.js`
- [Cart actions](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js): `script/tienda.js`
- [Details modal](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/tienda.js): `script/tienda.js`
- [Cart rendering](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/carrito.js): `script/carrito.js`
- [Cart total updater](https://github.com/migueldocente/proyectofinal_26238/blob/main/script/carrito.js): `script/carrito.js`

### Product data

- **FakeStoreAPI**
- **Browser storage**

### Other components

- **Shopper**

## Connections

- Shopper → Home page: opens
- Shopper → Shop page: browses
- Shopper → Cart page: views
- Shopper → Contact page: visits
- Catalog loading → FakeStoreAPI: fetches products (evidence: `script/tienda.js`)
- Catalog loading → Product cards: renders products (evidence: `script/tienda.js`)
- Product cards → Cart actions: attaches handlers (evidence: `script/tienda.js`)
- Cart actions → Browser storage: reads and writes (evidence: `script/tienda.js`)
- Product cards → Details modal: opens details (evidence: `script/tienda.js`)
- Cart rendering → Browser storage: reads cart (evidence: `script/carrito.js`)
- Cart rendering → Cart total updater: updates total (evidence: `script/carrito.js`)
