# pollolopez/caninosmercedes architecture

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

- Interactive diagram: https://gitdiagram.com/pollolopez/caninosmercedes
- Repository: https://github.com/pollolopez/caninosmercedes

## Overview

Caninos Mercedes is a React storefront with product and tutorial browsing, cart and checkout, order follow-up, account access, and protected administration. The main customer flow is browsing products, adding them to the cart, submitting an order, then receiving confirmation or registering after purchase. Firebase provides authentication and Firestore access; the excerpts show order creation, product/tutorial reads, and account/order updates. Admin screens and order tracking are present in the tree, but their full behavior and the serverless functions’ role are not established by the sampled source.

Main entry points: [`src/App.jsx`](https://github.com/pollolopez/caninosmercedes/blob/main/src/App.jsx) (Route application), [`src/firebase.js`](https://github.com/pollolopez/caninosmercedes/blob/main/src/firebase.js) (Orders store), [`src/pages/Checkout/Checkout.jsx`](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Checkout/Checkout.jsx) (Checkout), [`src/pages/Tienda/Tienda.jsx`](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Tienda/Tienda.jsx) (Product catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Storefront"]
  node_catalog["Product catalog<br/>[Tienda.jsx]"]
  node_product_fetch["Product reader"]
  node_product_card["Product card<br/>[Tarjeta.jsx]"]
  node_tutorials["Tutorial library<br/>[Tutoriales.jsx]"]
  node_tutorial_fetch["Tutorial reader"]
  node_tutorial_card["Tutorial card"]
end

subgraph group_checkout["Purchase and accounts"]
  node_cart_page["Cart page<br/>[Carrito.jsx]"]
  node_cart_state["Cart state<br/>[CartContext.jsx]"]
  node_checkout_page["Checkout<br/>[Checkout.jsx]"]
  node_orders_store[("Orders store<br/>[firebase.js]")]
  node_confirmation["Order confirmation"]
  node_post_purchase["Post-purchase signup"]
  node_signup["Account signup<br/>[Registro.jsx]"]
  node_tracking["Order tracking"]
end

subgraph group_admin["Administration"]
  node_login["Admin login<br/>[Login.jsx]"]
  node_admin_home["Admin dashboard<br/>[Admin.jsx]"]
  node_admin_products["Product management<br/>[AdminProductos.jsx]"]
  node_product_form["Product editor"]
  node_admin_orders["Order management<br/>[Ordenes.jsx]"]
  node_admin_tutorials["Tutorial management"]
  node_tutorial_create["Tutorial creation<br/>[CrearTutorial.jsx]"]
  node_tutorial_edit["Tutorial editing<br/>[EditarTutorial.jsx]"]
end

subgraph group_platform["Shared platform"]
  node_app["Route application<br/>[App.jsx]"]
  node_layout["Store layout"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_firebase_config["Firebase services<br/>[firebaseConfig.js]"]
end

node_shopper(("Shopper"))

node_shopper -->|"opens"| node_app
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_tutorials
node_app -->|"routes to"| node_cart_page
node_app -->|"routes to"| node_checkout_page
node_app -->|"routes to"| node_confirmation
node_app -->|"routes to"| node_post_purchase
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_tracking
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_admin_home
node_app -->|"routes to"| node_admin_products
node_app -->|"routes to"| node_product_form
node_app -->|"routes to"| node_admin_orders
node_app -->|"routes to"| node_admin_tutorials
node_app -->|"routes to"| node_tutorial_create
node_app -->|"routes to"| node_tutorial_edit
node_catalog -->|"loads"| node_product_fetch
node_catalog -->|"updates"| node_cart_state
node_catalog -->|"renders"| node_product_card
node_product_fetch -->|"reads products"| node_firebase_config
node_tutorials -->|"loads"| node_tutorial_fetch
node_tutorials -->|"renders"| node_tutorial_card
node_tutorial_fetch -->|"reads tutorials"| node_orders_store
node_cart_page -->|"uses"| node_cart_state
node_checkout_page -->|"reads and clears"| node_cart_state
node_checkout_page -->|"creates order"| node_orders_store
node_checkout_page -->|"navigates"| node_post_purchase
node_checkout_page -->|"navigates"| node_confirmation
node_post_purchase -->|"updates order"| node_orders_store
node_post_purchase -->|"navigates"| node_confirmation
node_login -->|"uses"| node_auth
node_admin_orders -->|"uses"| node_orders_store
node_admin_tutorials -->|"uses"| node_orders_store
node_tutorial_create -->|"uses"| node_orders_store
node_tutorial_edit -->|"uses"| node_orders_store

click node_app "https://github.com/pollolopez/caninosmercedes/blob/main/src/App.jsx"
click node_layout "https://github.com/pollolopez/caninosmercedes/blob/main/src/layout/LayoutPrincipal/LayoutPrincipal.jsx"
click node_catalog "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Tienda/Tienda.jsx"
click node_product_fetch "https://github.com/pollolopez/caninosmercedes/blob/main/src/hooks/useFetchProductos.js"
click node_product_card "https://github.com/pollolopez/caninosmercedes/blob/main/src/components/Tarjeta/Tarjeta.jsx"
click node_tutorials "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Tutoriales/Tutoriales.jsx"
click node_tutorial_fetch "https://github.com/pollolopez/caninosmercedes/blob/main/src/hooks/useFetchTutoriales.js"
click node_tutorial_card "https://github.com/pollolopez/caninosmercedes/blob/main/src/components/TarjetaTutorial/TarjetaTutorial.jsx"
click node_cart_page "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Carrito/Carrito.jsx"
click node_cart_state "https://github.com/pollolopez/caninosmercedes/blob/main/src/context/CartContext.jsx"
click node_checkout_page "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Checkout/Checkout.jsx"
click node_orders_store "https://github.com/pollolopez/caninosmercedes/blob/main/src/firebase.js"
click node_confirmation "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Checkout/OrderConfirmation.jsx"
click node_post_purchase "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/RegistroPostCompra.jsx"
click node_signup "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Registro.jsx"
click node_tracking "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/SeguimientoOrden/SeguimientoOrden.jsx"
click node_auth "https://github.com/pollolopez/caninosmercedes/blob/main/src/context/AuthContext.jsx"
click node_login "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/Login/Login.jsx"
click node_admin_home "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/AdminPanel/Admin.jsx"
click node_admin_products "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/AdminProductos.jsx"
click node_product_form "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/FormularioProducto.jsx"
click node_admin_orders "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/Ordenes/Ordenes.jsx"
click node_admin_tutorials "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/AdminTutoriales.jsx"
click node_tutorial_create "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/CrearTutorial.jsx"
click node_tutorial_edit "https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/EditarTutorial.jsx"
click node_firebase_config "https://github.com/pollolopez/caninosmercedes/blob/main/src/config/firebaseConfig.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_catalog,node_product_fetch,node_product_card,node_tutorials,node_tutorial_fetch,node_tutorial_card toneBlue
class node_cart_page,node_cart_state,node_checkout_page,node_orders_store,node_confirmation,node_post_purchase,node_signup,node_tracking toneAmber
class node_login,node_admin_home,node_admin_products,node_product_form,node_admin_orders,node_admin_tutorials,node_tutorial_create,node_tutorial_edit toneMint
class node_app,node_layout,node_auth,node_firebase_config toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Product catalog](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Tienda/Tienda.jsx): `src/pages/Tienda/Tienda.jsx`
- [Product reader](https://github.com/pollolopez/caninosmercedes/blob/main/src/hooks/useFetchProductos.js): `src/hooks/useFetchProductos.js`
- [Product card](https://github.com/pollolopez/caninosmercedes/blob/main/src/components/Tarjeta/Tarjeta.jsx): `src/components/Tarjeta/Tarjeta.jsx`
- [Tutorial library](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Tutoriales/Tutoriales.jsx): `src/pages/Tutoriales/Tutoriales.jsx`
- [Tutorial reader](https://github.com/pollolopez/caninosmercedes/blob/main/src/hooks/useFetchTutoriales.js): `src/hooks/useFetchTutoriales.js`
- [Tutorial card](https://github.com/pollolopez/caninosmercedes/blob/main/src/components/TarjetaTutorial/TarjetaTutorial.jsx): `src/components/TarjetaTutorial/TarjetaTutorial.jsx`

### Purchase and accounts

- [Cart page](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Carrito/Carrito.jsx): `src/pages/Carrito/Carrito.jsx`
- [Cart state](https://github.com/pollolopez/caninosmercedes/blob/main/src/context/CartContext.jsx): `src/context/CartContext.jsx`
- [Checkout](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Checkout/Checkout.jsx): `src/pages/Checkout/Checkout.jsx`
- [Orders store](https://github.com/pollolopez/caninosmercedes/blob/main/src/firebase.js): `src/firebase.js`
- [Order confirmation](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Checkout/OrderConfirmation.jsx): `src/pages/Checkout/OrderConfirmation.jsx`
- [Post-purchase signup](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/RegistroPostCompra.jsx): `src/pages/RegistroPostCompra.jsx`
- [Account signup](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Registro.jsx): `src/pages/Registro.jsx`
- [Order tracking](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/SeguimientoOrden/SeguimientoOrden.jsx): `src/pages/SeguimientoOrden/SeguimientoOrden.jsx`

### Administration

- [Admin login](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/Login/Login.jsx): `src/pages/Admin/Login/Login.jsx`
- [Admin dashboard](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/AdminPanel/Admin.jsx): `src/pages/Admin/AdminPanel/Admin.jsx`
- [Product management](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/AdminProductos.jsx): `src/pages/AdminProductos.jsx`
- [Product editor](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/FormularioProducto.jsx): `src/pages/Admin/FormularioProducto.jsx`
- [Order management](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/Ordenes/Ordenes.jsx): `src/pages/Admin/Ordenes/Ordenes.jsx`
- [Tutorial management](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/AdminTutoriales.jsx): `src/pages/Admin/AdminTutoriales.jsx`
- [Tutorial creation](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/CrearTutorial.jsx): `src/pages/Admin/CrearTutorial.jsx`
- [Tutorial editing](https://github.com/pollolopez/caninosmercedes/blob/main/src/pages/Admin/EditarTutorial.jsx): `src/pages/Admin/EditarTutorial.jsx`

### Shared platform

- [Route application](https://github.com/pollolopez/caninosmercedes/blob/main/src/App.jsx): `src/App.jsx`
- [Store layout](https://github.com/pollolopez/caninosmercedes/blob/main/src/layout/LayoutPrincipal/LayoutPrincipal.jsx): `src/layout/LayoutPrincipal/LayoutPrincipal.jsx`
- [Authentication state](https://github.com/pollolopez/caninosmercedes/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Firebase services](https://github.com/pollolopez/caninosmercedes/blob/main/src/config/firebaseConfig.js): `src/config/firebaseConfig.js`

### Other components

- **Shopper**

## Connections

- Shopper → Route application: opens (evidence: `src/App.jsx`)
- Route application → Store layout: renders (evidence: `src/App.jsx`)
- Route application → Product catalog: routes to (evidence: `src/App.jsx`)
- Route application → Tutorial library: routes to (evidence: `src/App.jsx`)
- Route application → Cart page: routes to (evidence: `src/App.jsx`)
- Route application → Checkout: routes to (evidence: `src/App.jsx`)
- Route application → Order confirmation: routes to (evidence: `src/App.jsx`)
- Route application → Post-purchase signup: routes to (evidence: `src/App.jsx`)
- Route application → Account signup: routes to (evidence: `src/App.jsx`)
- Route application → Order tracking: routes to (evidence: `src/App.jsx`)
- Route application → Admin login: routes to (evidence: `src/App.jsx`)
- Route application → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Route application → Product management: routes to (evidence: `src/App.jsx`)
- Route application → Product editor: routes to (evidence: `src/App.jsx`)
- Route application → Order management: routes to (evidence: `src/App.jsx`)
- Route application → Tutorial management: routes to (evidence: `src/App.jsx`)
- Route application → Tutorial creation: routes to (evidence: `src/App.jsx`)
- Route application → Tutorial editing: routes to (evidence: `src/App.jsx`)
- Product catalog → Product reader: loads (evidence: `src/pages/Tienda/Tienda.jsx`)
- Product catalog → Cart state: updates (evidence: `src/pages/Tienda/Tienda.jsx`)
- Product catalog → Product card: renders (evidence: `src/pages/Tienda/Tienda.jsx`)
- Product reader → Firebase services: reads products (evidence: `src/hooks/useFetchProductos.js`)
- Tutorial library → Tutorial reader: loads (evidence: `src/pages/Tutoriales/Tutoriales.jsx`)
- Tutorial library → Tutorial card: renders (evidence: `src/pages/Tutoriales/Tutoriales.jsx`)
- Tutorial reader → Orders store: reads tutorials (evidence: `src/hooks/useFetchTutoriales.js`)
- Cart page → Cart state: uses (evidence: `src/pages/Carrito/Carrito.jsx`)
- Checkout → Cart state: reads and clears (evidence: `src/pages/Checkout/Checkout.jsx`)
- Checkout → Orders store: creates order (evidence: `src/pages/Checkout/Checkout.jsx`)
- Checkout → Post-purchase signup: navigates (evidence: `src/pages/Checkout/Checkout.jsx`)
- Checkout → Order confirmation: navigates (evidence: `src/pages/Checkout/Checkout.jsx`)
- Post-purchase signup → Orders store: updates order (evidence: `src/pages/RegistroPostCompra.jsx`)
- Post-purchase signup → Order confirmation: navigates (evidence: `src/pages/RegistroPostCompra.jsx`)
- Admin login → Authentication state: uses (evidence: `src/pages/Admin/Login/Login.jsx`)
- Order management → Orders store: uses (evidence: `src/pages/Admin/Ordenes/Ordenes.jsx`)
- Tutorial management → Orders store: uses (evidence: `src/pages/Admin/AdminTutoriales.jsx`)
- Tutorial creation → Orders store: uses (evidence: `src/pages/Admin/CrearTutorial.jsx`)
- Tutorial editing → Orders store: uses (evidence: `src/pages/Admin/EditarTutorial.jsx`)
