# liryoz/eva3-fullstack architecture

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

- Interactive diagram: https://gitdiagram.com/liryoz/eva3-fullstack
- Repository: https://github.com/liryoz/eva3-fullstack

## Overview

Veterinaria Liry is a React SPA for veterinary services and online sales. Customers browse products, manage a cart, initiate Webpay checkout, and book appointments; staff sign in to manage products, users, and appointments. The main router dispatches URLs to these page workflows. Data is cached in browser localStorage, while sampled service code also calls a backend API and redirects to Webpay. Some relationships for unsampled pages and service modules rely on the README and SOURCE INDEX references rather than inspected implementations.

Main entry points: [`src/main.jsx`](https://github.com/liryoz/eva3-fullstack/blob/main/src/main.jsx) (Route dispatcher), [`src/services/api.js`](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/api.js) (API and auth), [`src/services/productos.js`](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/productos.js) (Product catalog), [`src/pages/carrito.jsx`](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/carrito.jsx) (Cart and checkout)

## Diagram (Mermaid)

```mermaid
flowchart TD

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

subgraph group_customer["Customer workflows"]
  node_home["Home page<br/>[inicio.jsx]"]
  node_storefront["Product shop<br/>[tienda.jsx]"]
  node_product_card["Product card"]
  node_cart_page["Cart and checkout<br/>[carrito.jsx]"]
  node_purchase_result["Purchase result"]
  node_appointments["Appointment booking<br/>[agendarHora.jsx]"]
  node_login["Sign-in page<br/>[iniciarSesion.jsx]"]
end

subgraph group_staff["Staff workflows"]
  node_admin_home["Admin overview<br/>[admin.jsx]"]
  node_user_admin["User management<br/>[usuarios.jsx]"]
  node_appointment_admin["Appointment management<br/>[gestionarCitas.jsx]"]
  node_product_admin["Product management<br/>[vendedor.jsx]"]
end

subgraph group_data["Data and integrations"]
  node_cart_service["Cart operations<br/>[carrito.js]"]
  node_product_service["Product catalog<br/>[productos.js]"]
  node_purchase_service["Purchase service<br/>[compras.js]"]
  node_appointment_service["Appointment service<br/>[horaAgendada.js]"]
  node_user_service["User service<br/>[usuarios.js]"]
  node_auth_api["API and auth<br/>[api.js]"]
  node_browser_store[("Browser storage")]
  node_backend["Backend API"]
  node_webpay["Webpay"]
end

node_customer_actor(("Customer"))
node_admin_actor(("Administrator"))
node_seller_actor(("Seller"))

node_customer_actor -->|"opens pages"| node_router
node_admin_actor -->|"opens pages"| node_router
node_seller_actor -->|"opens pages"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_storefront
node_router -->|"routes to"| node_cart_page
node_router -->|"routes to"| node_purchase_result
node_router -->|"routes to"| node_appointments
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_admin_home
node_router -->|"routes to"| node_user_admin
node_router -->|"routes to"| node_appointment_admin
node_router -->|"routes to"| node_product_admin
node_home -->|"loads products"| node_product_service
node_home -->|"renders"| node_product_card
node_storefront -->|"loads products"| node_product_service
node_storefront -->|"renders"| node_product_card
node_product_card -->|"adds products"| node_cart_service
node_cart_page -->|"reads and updates"| node_cart_service
node_cart_page -->|"requests payment"| node_purchase_service
node_purchase_result -->|"checks purchase"| node_purchase_service
node_purchase_result -->|"clears cart"| node_cart_service
node_cart_page -->|"redirects to"| node_webpay
node_appointments -->|"saves appointment"| node_appointment_service
node_admin_home -->|"loads user totals"| node_user_service
node_admin_home -->|"loads appointment totals"| node_appointment_service
node_user_admin -->|"loads users"| node_user_service
node_appointment_admin -->|"manages appointments"| node_appointment_service
node_product_admin -->|"manages products"| node_product_service
node_login -->|"authenticates"| node_auth_api
node_router -->|"gets UI token"| node_auth_api
node_router -->|"loads catalog"| node_product_service
node_product_service -->|"uses API helpers"| node_auth_api
node_purchase_service -->|"uses API helpers"| node_auth_api
node_appointment_service -->|"uses API helpers"| node_auth_api
node_user_service -->|"uses API helpers"| node_auth_api
node_auth_api -->|"sends API requests"| node_backend
node_cart_service -->|"reads and writes"| node_browser_store
node_product_service -->|"caches products"| node_browser_store
node_auth_api -->|"stores session"| node_browser_store

click node_router "https://github.com/liryoz/eva3-fullstack/blob/main/src/main.jsx"
click node_home "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/inicio.jsx"
click node_storefront "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/tienda.jsx"
click node_product_card "https://github.com/liryoz/eva3-fullstack/blob/main/src/components/tarjetaProducto.jsx"
click node_cart_page "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/carrito.jsx"
click node_purchase_result "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/compraRealizada.jsx"
click node_appointments "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/agendarHora.jsx"
click node_login "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/iniciarSesion.jsx"
click node_admin_home "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/admin.jsx"
click node_user_admin "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/usuarios.jsx"
click node_appointment_admin "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/gestionarCitas.jsx"
click node_product_admin "https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/Vendedor/vendedor.jsx"
click node_cart_service "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/carrito.js"
click node_product_service "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/productos.js"
click node_purchase_service "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/compras.js"
click node_appointment_service "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/horaAgendada.js"
click node_user_service "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/usuarios.js"
click node_auth_api "https://github.com/liryoz/eva3-fullstack/blob/main/src/services/api.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_router toneBlue
class node_home,node_storefront,node_product_card,node_cart_page,node_purchase_result,node_appointments,node_login toneAmber
class node_admin_home,node_user_admin,node_appointment_admin,node_product_admin toneMint
class node_cart_service,node_product_service,node_purchase_service,node_appointment_service,node_user_service,node_auth_api,node_browser_store,node_backend,node_webpay toneRose
class node_customer_actor,node_admin_actor,node_seller_actor toneIndigo
```

## Components

### App routing

- [Route dispatcher](https://github.com/liryoz/eva3-fullstack/blob/main/src/main.jsx): `src/main.jsx`

### Customer workflows

- [Home page](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/inicio.jsx): `src/pages/inicio.jsx`
- [Product shop](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/tienda.jsx): `src/pages/tienda.jsx`
- [Product card](https://github.com/liryoz/eva3-fullstack/blob/main/src/components/tarjetaProducto.jsx): `src/components/tarjetaProducto.jsx`
- [Cart and checkout](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/carrito.jsx): `src/pages/carrito.jsx`
- [Purchase result](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/compraRealizada.jsx): `src/pages/compraRealizada.jsx`
- [Appointment booking](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/agendarHora.jsx): `src/pages/agendarHora.jsx`
- [Sign-in page](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/iniciarSesion.jsx): `src/pages/iniciarSesion.jsx`

### Staff workflows

- [Admin overview](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/admin.jsx): `src/pages/Admin/admin.jsx`
- [User management](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/usuarios.jsx): `src/pages/Admin/usuarios.jsx`
- [Appointment management](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/gestionarCitas.jsx): `src/pages/Admin/gestionarCitas.jsx`
- [Product management](https://github.com/liryoz/eva3-fullstack/blob/main/src/pages/Admin/Vendedor/vendedor.jsx): `src/pages/Admin/Vendedor/vendedor.jsx`

### Data and integrations

- [Cart operations](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/carrito.js): `src/services/carrito.js`
- [Product catalog](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/productos.js): `src/services/productos.js`
- [Purchase service](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/compras.js): `src/services/compras.js`
- [Appointment service](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/horaAgendada.js): `src/services/horaAgendada.js`
- [User service](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/usuarios.js): `src/services/usuarios.js`
- [API and auth](https://github.com/liryoz/eva3-fullstack/blob/main/src/services/api.js): `src/services/api.js`
- **Browser storage**
- **Backend API**
- **Webpay**

### Other components

- **Customer**
- **Administrator**
- **Seller**

## Connections

- Customer → Route dispatcher: opens pages (evidence: `README.md`)
- Administrator → Route dispatcher: opens pages (evidence: `README.md`)
- Seller → Route dispatcher: opens pages (evidence: `README.md`)
- Route dispatcher → Home page: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Product shop: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Cart and checkout: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Purchase result: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Appointment booking: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Sign-in page: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Admin overview: routes to (evidence: `src/main.jsx`)
- Route dispatcher → User management: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Appointment management: routes to (evidence: `src/main.jsx`)
- Route dispatcher → Product management: routes to (evidence: `src/main.jsx`)
- Home page → Product catalog: loads products (evidence: `src/pages/inicio.jsx`)
- Home page → Product card: renders (evidence: `src/pages/inicio.jsx`)
- Product shop → Product catalog: loads products (evidence: `src/pages/tienda.jsx`)
- Product shop → Product card: renders (evidence: `src/pages/tienda.jsx`)
- Product card → Cart operations: adds products (evidence: `src/components/tarjetaProducto.jsx`)
- Cart and checkout → Cart operations: reads and updates (evidence: `src/pages/carrito.jsx`)
- Cart and checkout → Purchase service: requests payment (evidence: `src/pages/carrito.jsx`)
- Purchase result → Purchase service: checks purchase (evidence: `src/pages/compraRealizada.jsx`)
- Purchase result → Cart operations: clears cart (evidence: `src/pages/compraRealizada.jsx`)
- Cart and checkout → Webpay: redirects to (evidence: `src/pages/carrito.jsx`)
- Appointment booking → Appointment service: saves appointment (evidence: `README.md`)
- Admin overview → User service: loads user totals (evidence: `src/pages/Admin/admin.jsx`)
- Admin overview → Appointment service: loads appointment totals (evidence: `src/pages/Admin/admin.jsx`)
- User management → User service: loads users (evidence: `src/pages/Admin/usuarios.jsx`)
- Appointment management → Appointment service: manages appointments (evidence: `src/pages/Admin/gestionarCitas.jsx`)
- Product management → Product catalog: manages products (evidence: `src/pages/Admin/Vendedor/vendedor.jsx`)
- Sign-in page → API and auth: authenticates (evidence: `src/pages/iniciarSesion.jsx`)
- Route dispatcher → API and auth: gets UI token (evidence: `src/main.jsx`)
- Route dispatcher → Product catalog: loads catalog (evidence: `src/main.jsx`)
- Product catalog → API and auth: uses API helpers (evidence: `src/services/productos.js`)
- Purchase service → API and auth: uses API helpers (evidence: `src/services/compras.js`)
- Appointment service → API and auth: uses API helpers (evidence: `src/services/horaAgendada.js`)
- User service → API and auth: uses API helpers (evidence: `src/services/usuarios.js`)
- API and auth → Backend API: sends API requests (evidence: `src/services/api.js`)
- Cart operations → Browser storage: reads and writes (evidence: `src/services/carrito.js`)
- Product catalog → Browser storage: caches products (evidence: `src/services/productos.js`)
- API and auth → Browser storage: stores session (evidence: `src/services/api.js`)
