# abelsobrino/restaurante-web architecture

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

- Interactive diagram: https://gitdiagram.com/abelsobrino/restaurante-web
- Repository: https://github.com/abelsobrino/restaurante-web

## Overview

La Fonda is a React SPA for restaurant customers and administrators, backed by Supabase. Users navigate to a route, use its page’s adapted controller to perform tasks such as account access, browsing, reservations, ordering, payment, and administration, and see the resulting screen or operation status. The graph shows the documented route-loading and compatibility-runtime structure, plus major product domains and integrations. Some domain links are documented only at capability level; unsampled controllers are not treated as inspected, so uncertain call paths are omitted.

Main entry points: [`src/routes.js`](https://github.com/abelsobrino/restaurante-web/blob/main/src/routes.js) (Route registry), [`src/runtime/PageView.jsx`](https://github.com/abelsobrino/restaurante-web/blob/main/src/runtime/PageView.jsx) (Page mount and cleanup), [`src/controllers/paginas__administrador__admin.js`](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__admin.js) (Admin workspace), [`src/App.jsx`](https://github.com/abelsobrino/restaurante-web/blob/main/src/App.jsx) (SPA shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["SPA navigation"]
  node_app["SPA shell<br/>[App.jsx]"]
  node_routes["Route registry<br/>[routes.js]"]
  node_navbar["Persistent navigation<br/>[Navbar.jsx]"]
  node_footer["Persistent footer<br/>[Footer.jsx]"]
end

subgraph group_customer["Customer experience"]
  node_access["Account access"]
  node_menu["Menu and gallery"]
  node_reservations["Reservations"]
  node_cart["Cart and orders"]
  node_payment["Payment and receipt"]
  node_profile["Profile and reviews"]
end

subgraph group_operations["Restaurant operations"]
  node_admin["Admin workspace"]
  node_adminmenu["Menu management"]
  node_admincontent["Content management"]
  node_adminpromos["Promotions"]
  node_adminconfig["Admin configuration"]
end

subgraph group_runtime["Compatibility runtime"]
  node_pageview["Page mount and cleanup<br/>[PageView.jsx]"]
  node_scope["Scoped page lifecycle<br/>[scope.js]"]
end

subgraph group_backend["Services and backend"]
  node_auth["Authentication service<br/>[auth.js]"]
  node_email["Email verification<br/>[auth-email.js]"]
  node_stock["Stock service<br/>[stock.js]"]
  node_messages["Messaging service<br/>[mensajes.js]"]
  node_supabase[("Supabase")]
end

node_visitor(("Customer or admin"))

node_visitor -->|"opens SPA"| node_app
node_app -->|"finds route"| node_routes
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_routes -->|"loads access pages"| node_access
node_routes -->|"loads menu pages"| node_menu
node_routes -.->|"loads reservation pages"| node_reservations
node_routes -.->|"loads order pages"| node_cart
node_routes -.->|"loads payment pages"| node_payment
node_routes -->|"loads admin pages"| node_admin
node_access -->|"mounts in"| node_pageview
node_menu -.->|"mounts in"| node_pageview
node_reservations -.->|"mounts in"| node_pageview
node_cart -->|"mounts in"| node_pageview
node_payment -->|"mounts in"| node_pageview
node_admin -->|"mounts in"| node_pageview
node_pageview -->|"creates scope"| node_scope
node_access -.->|"uses auth"| node_auth
node_auth -->|"calls RPC"| node_supabase
node_email -->|"verifies email"| node_supabase
node_stock -->|"reads stock tables"| node_supabase
node_admin -.->|"delegates menu work"| node_adminmenu
node_admin -.->|"delegates content work"| node_admincontent
node_admin -.->|"delegates promotion work"| node_adminpromos
node_admin -.->|"delegates configuration"| node_adminconfig
node_navbar -->|"counts notifications"| node_messages
node_messages -->|"calls RPC"| node_supabase

click node_app "https://github.com/abelsobrino/restaurante-web/blob/main/src/App.jsx"
click node_routes "https://github.com/abelsobrino/restaurante-web/blob/main/src/routes.js"
click node_navbar "https://github.com/abelsobrino/restaurante-web/blob/main/src/components/Navbar.jsx"
click node_footer "https://github.com/abelsobrino/restaurante-web/blob/main/src/components/Footer.jsx"
click node_access "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__acceso__registrarse__registrarse.js"
click node_menu "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__menu__carta__carta.js"
click node_reservations "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__reservas__nueva-reserva__nueva-reserva.js"
click node_cart "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__pedidos__carrito__carrito.js"
click node_payment "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__pagos__pasarela__pasarela.js"
click node_profile "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__perfil__perfil.js"
click node_admin "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__admin.js"
click node_adminmenu "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__menu__menu.js"
click node_admincontent "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__contenido__contenido.js"
click node_adminpromos "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__promociones__promociones.js"
click node_adminconfig "https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__configuracion__configuracion.js"
click node_pageview "https://github.com/abelsobrino/restaurante-web/blob/main/src/runtime/PageView.jsx"
click node_scope "https://github.com/abelsobrino/restaurante-web/blob/main/src/runtime/scope.js"
click node_auth "https://github.com/abelsobrino/restaurante-web/blob/main/src/services/auth.js"
click node_email "https://github.com/abelsobrino/restaurante-web/blob/main/src/services/auth-email.js"
click node_stock "https://github.com/abelsobrino/restaurante-web/blob/main/src/services/stock.js"
click node_messages "https://github.com/abelsobrino/restaurante-web/blob/main/src/services/mensajes.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_app,node_routes,node_navbar,node_footer toneBlue
class node_access,node_menu,node_reservations,node_cart,node_payment,node_profile toneAmber
class node_admin,node_adminmenu,node_admincontent,node_adminpromos,node_adminconfig toneMint
class node_pageview,node_scope toneRose
class node_auth,node_email,node_stock,node_messages,node_supabase,node_visitor toneIndigo
```

## Components

### SPA navigation

- [SPA shell](https://github.com/abelsobrino/restaurante-web/blob/main/src/App.jsx): `src/App.jsx`
- [Route registry](https://github.com/abelsobrino/restaurante-web/blob/main/src/routes.js): `src/routes.js`
- [Persistent navigation](https://github.com/abelsobrino/restaurante-web/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Persistent footer](https://github.com/abelsobrino/restaurante-web/blob/main/src/components/Footer.jsx): `src/components/Footer.jsx`

### Customer experience

- [Account access](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__acceso__registrarse__registrarse.js): `src/controllers/paginas__acceso__registrarse__registrarse.js`
- [Menu and gallery](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__menu__carta__carta.js): `src/controllers/paginas__menu__carta__carta.js`
- [Reservations](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__reservas__nueva-reserva__nueva-reserva.js): `src/controllers/paginas__reservas__nueva-reserva__nueva-reserva.js`
- [Cart and orders](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__pedidos__carrito__carrito.js): `src/controllers/paginas__pedidos__carrito__carrito.js`
- [Payment and receipt](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__pagos__pasarela__pasarela.js): `src/controllers/paginas__pagos__pasarela__pasarela.js`
- [Profile and reviews](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__perfil__perfil.js): `src/controllers/paginas__perfil__perfil.js`

### Restaurant operations

- [Admin workspace](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__admin.js): `src/controllers/paginas__administrador__admin.js`
- [Menu management](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__menu__menu.js): `src/controllers/paginas__administrador__menu__menu.js`
- [Content management](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__contenido__contenido.js): `src/controllers/paginas__administrador__contenido__contenido.js`
- [Promotions](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__promociones__promociones.js): `src/controllers/paginas__administrador__promociones__promociones.js`
- [Admin configuration](https://github.com/abelsobrino/restaurante-web/blob/main/src/controllers/paginas__administrador__configuracion__configuracion.js): `src/controllers/paginas__administrador__configuracion__configuracion.js`

### Compatibility runtime

- [Page mount and cleanup](https://github.com/abelsobrino/restaurante-web/blob/main/src/runtime/PageView.jsx): `src/runtime/PageView.jsx`
- [Scoped page lifecycle](https://github.com/abelsobrino/restaurante-web/blob/main/src/runtime/scope.js): `src/runtime/scope.js`

### Services and backend

- [Authentication service](https://github.com/abelsobrino/restaurante-web/blob/main/src/services/auth.js): `src/services/auth.js`
- [Email verification](https://github.com/abelsobrino/restaurante-web/blob/main/src/services/auth-email.js): `src/services/auth-email.js`
- [Stock service](https://github.com/abelsobrino/restaurante-web/blob/main/src/services/stock.js): `src/services/stock.js`
- [Messaging service](https://github.com/abelsobrino/restaurante-web/blob/main/src/services/mensajes.js): `src/services/mensajes.js`
- **Supabase**

### Other components

- **Customer or admin**

## Connections

- Customer or admin → SPA shell: opens SPA
- SPA shell → Route registry: finds route (evidence: `src/App.jsx`)
- SPA shell → Persistent navigation: renders (evidence: `src/App.jsx`)
- SPA shell → Persistent footer: renders (evidence: `src/App.jsx`)
- Route registry → Account access: loads access pages (evidence: `src/routes.js`)
- Route registry → Menu and gallery: loads menu pages (evidence: `src/routes.js`)
- Route registry → Reservations: loads reservation pages
- Route registry → Cart and orders: loads order pages
- Route registry → Payment and receipt: loads payment pages
- Route registry → Admin workspace: loads admin pages (evidence: `src/routes.js`)
- Account access → Page mount and cleanup: mounts in (evidence: `src/pages/AccesoRegistrarse.jsx`)
- Menu and gallery → Page mount and cleanup: mounts in
- Reservations → Page mount and cleanup: mounts in
- Cart and orders → Page mount and cleanup: mounts in (evidence: `src/pages/PedidosCarrito.jsx`)
- Payment and receipt → Page mount and cleanup: mounts in (evidence: `src/pages/PagosPasarela.jsx`)
- Admin workspace → Page mount and cleanup: mounts in (evidence: `src/pages/AdministradorMenu.jsx`)
- Page mount and cleanup → Scoped page lifecycle: creates scope (evidence: `src/runtime/PageView.jsx`)
- Account access → Authentication service: uses auth
- Authentication service → Supabase: calls RPC (evidence: `src/services/auth.js`)
- Email verification → Supabase: verifies email (evidence: `src/services/auth-email.js`)
- Stock service → Supabase: reads stock tables
- Admin workspace → Menu management: delegates menu work
- Admin workspace → Content management: delegates content work
- Admin workspace → Promotions: delegates promotion work
- Admin workspace → Admin configuration: delegates configuration
- Persistent navigation → Messaging service: counts notifications (evidence: `src/components/Navbar.jsx`)
- Messaging service → Supabase: calls RPC
