# jjpedrique/plataforma-de-ticketing architecture

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

- Interactive diagram: https://gitdiagram.com/jjpedrique/plataforma-de-ticketing
- Repository: https://github.com/jjpedrique/plataforma-de-ticketing

## Overview

Plataforma web de ticketing: el usuario se registra o inicia sesión, consulta eventos, selecciona asientos y paga para obtener entradas que luego puede revisar en su historial. Organizadores y administradores gestionan eventos, precios por zona, recintos y usuarios; el acceso se limita por autenticación y rol. React enruta estas experiencias hacia una API FastAPI y PostgreSQL. Las conexiones entre subsistemas se apoyan en el README y las referencias del índice; los detalles internos de varios módulos no muestreados se mantienen a nivel de subsistema.

Main entry points: [`client/src/routes/router.jsx`](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/routes/router.jsx) (Rutas y acceso), [`server/src/app.py`](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/app.py) (API FastAPI), [`client/src/shared/api/adminApi.js`](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/shared/api/adminApi.js) (Cliente API admin), [`client/src/Features/Auth/services/authService.js`](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Auth/services/authService.js) (Servicio de identidad)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Experiencia web"]
  node_router["Rutas y acceso<br/>[router.jsx]"]
  node_public["Páginas públicas"]
  node_http["Cliente HTTP<br/>[http.js]"]
end

subgraph group_identity["Identidad y acceso"]
  node_authpages["Acceso y registro"]
  node_authservice["Servicio de identidad<br/>[authService.js]"]
  node_authcontext["Sesión de cliente<br/>[AuthContext.jsx]"]
  node_profile["Perfil de usuario<br/>[Perfil.jsx]"]
end

subgraph group_sales["Compra de entradas"]
  node_eventbrowse["Explorar eventos"]
  node_seatselect["Elegir asiento"]
  node_payment["Pago<br/>[RealizarPago.jsx]"]
  node_ticketresult["Reserva completada"]
  node_history["Historial de entradas"]
  node_ticketcontext["Estado de compra"]
end

subgraph group_admin["Administración"]
  node_eventadmin["Gestión de eventos<br/>[GestionEventos.jsx]"]
  node_venueadmin["Gestión de recintos<br/>[GestionLugares.jsx]"]
  node_pricingadmin["Zonas y precios"]
  node_useradmin["Gestión de usuarios"]
  node_adminapi["Cliente API admin<br/>[adminApi.js]"]
end

subgraph group_backend["API y persistencia"]
  node_api["API FastAPI<br/>[app.py]"]
  node_userroute["Rutas de usuarios<br/>[Users.py]"]
  node_eventroutes["Rutas de eventos y precios<br/>[EventPricings.py]"]
  node_orderroutes["Rutas de órdenes<br/>[Orders.py]"]
  node_other_routes["Rutas de catálogo"]
  node_domainmodels["Modelos de dominio"]
  node_database[("PostgreSQL / ORM<br/>[database.py]")]
end

node_visitor(("Visitante / usuario"))

node_visitor -->|"abre rutas"| node_router
node_router -->|"muestra páginas"| node_public
node_router -->|"dirige acceso"| node_authpages
node_router -->|"protege perfil"| node_profile
node_router -->|"protege compra"| node_eventbrowse
node_router -->|"protege historial"| node_history
node_router -->|"restringe por rol"| node_eventadmin
node_router -->|"restringe por rol"| node_pricingadmin
node_router -->|"restringe por rol"| node_useradmin
node_router -->|"restringe por rol"| node_venueadmin
node_authpages -->|"solicita identidad"| node_authservice
node_authservice -->|"envía solicitudes"| node_http
node_authservice -.->|"actualiza sesión"| node_authcontext
node_profile -->|"actualiza cuenta"| node_authservice
node_eventbrowse -.->|"continúa compra"| node_seatselect
node_seatselect -.->|"continúa compra"| node_payment
node_payment -.->|"completa reserva"| node_ticketresult
node_history -.->|"consulta estado"| node_ticketcontext
node_eventadmin -->|"gestiona catálogo"| node_adminapi
node_venueadmin -->|"gestiona recintos"| node_adminapi
node_pricingadmin -->|"gestiona precios"| node_adminapi
node_useradmin -->|"gestiona usuarios"| node_adminapi
node_adminapi -.->|"solicita operaciones"| node_api
node_http -.->|"solicita identidad"| node_api
node_api -->|"registra rutas"| node_userroute
node_api -->|"registra rutas"| node_eventroutes
node_api -->|"registra rutas"| node_orderroutes
node_api -->|"registra rutas"| node_other_routes
node_userroute -->|"consulta usuarios"| node_database
node_eventroutes -->|"lee y modifica"| node_database
node_orderroutes -->|"lee y modifica"| node_database
node_eventroutes -->|"usa entidades"| node_domainmodels
node_orderroutes -->|"usa entidades"| node_domainmodels
node_userroute -->|"usa entidades"| node_domainmodels

click node_router "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/routes/router.jsx"
click node_public "https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/client/src/Features/Static/Pages"
click node_authpages "https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/client/src/Features/Auth/Pages"
click node_authservice "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Auth/services/authService.js"
click node_authcontext "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Auth/Context/AuthContext.jsx"
click node_profile "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Usuarios/Pages/Perfil.jsx"
click node_eventbrowse "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/SeleccionarEvento.jsx"
click node_seatselect "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/SeleccionarAsiento.jsx"
click node_payment "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/RealizarPago.jsx"
click node_ticketresult "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/ReservaCompletada.jsx"
click node_history "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/HistorialTickets.jsx"
click node_ticketcontext "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/Context/TicketingContext.jsx"
click node_eventadmin "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorEventos/Pages/GestionEventos.jsx"
click node_venueadmin "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorLugares/Pages/GestionLugares.jsx"
click node_pricingadmin "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorZonasPrecios/Pages/GestionZonasPrecios.jsx"
click node_useradmin "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorUsuarios/Pages/GestionUsuarios.jsx"
click node_adminapi "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/shared/api/adminApi.js"
click node_api "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/app.py"
click node_userroute "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/Users.py"
click node_eventroutes "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/EventPricings.py"
click node_orderroutes "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/Orders.py"
click node_other_routes "https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/server/src/routes"
click node_domainmodels "https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/server/src/models"
click node_database "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/database.py"
click node_http "https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/shared/api/http.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,node_public,node_http toneBlue
class node_authpages,node_authservice,node_authcontext,node_profile toneAmber
class node_eventbrowse,node_seatselect,node_payment,node_ticketresult,node_history,node_ticketcontext toneMint
class node_eventadmin,node_venueadmin,node_pricingadmin,node_useradmin,node_adminapi toneRose
class node_api,node_userroute,node_eventroutes,node_orderroutes,node_other_routes,node_domainmodels,node_database,node_visitor toneIndigo
```

## Components

### Experiencia web

- [Rutas y acceso](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/routes/router.jsx): `client/src/routes/router.jsx`
- [Páginas públicas](https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/client/src/Features/Static/Pages): `client/src/Features/Static/Pages`
- [Cliente HTTP](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/shared/api/http.js): `client/src/shared/api/http.js`

### Identidad y acceso

- [Acceso y registro](https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/client/src/Features/Auth/Pages): `client/src/Features/Auth/Pages`
- [Servicio de identidad](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Auth/services/authService.js): `client/src/Features/Auth/services/authService.js`
- [Sesión de cliente](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Auth/Context/AuthContext.jsx): `client/src/Features/Auth/Context/AuthContext.jsx`
- [Perfil de usuario](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Usuarios/Pages/Perfil.jsx): `client/src/Features/Usuarios/Pages/Perfil.jsx`

### Compra de entradas

- [Explorar eventos](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/SeleccionarEvento.jsx): `client/src/Features/Ticketing/pages/SeleccionarEvento.jsx`
- [Elegir asiento](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/SeleccionarAsiento.jsx): `client/src/Features/Ticketing/pages/SeleccionarAsiento.jsx`
- [Pago](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/RealizarPago.jsx): `client/src/Features/Ticketing/pages/RealizarPago.jsx`
- [Reserva completada](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/ReservaCompletada.jsx): `client/src/Features/Ticketing/pages/ReservaCompletada.jsx`
- [Historial de entradas](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/pages/HistorialTickets.jsx): `client/src/Features/Ticketing/pages/HistorialTickets.jsx`
- [Estado de compra](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/Ticketing/Context/TicketingContext.jsx): `client/src/Features/Ticketing/Context/TicketingContext.jsx`

### Administración

- [Gestión de eventos](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorEventos/Pages/GestionEventos.jsx): `client/src/Features/GestorEventos/Pages/GestionEventos.jsx`
- [Gestión de recintos](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorLugares/Pages/GestionLugares.jsx): `client/src/Features/GestorLugares/Pages/GestionLugares.jsx`
- [Zonas y precios](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorZonasPrecios/Pages/GestionZonasPrecios.jsx): `client/src/Features/GestorZonasPrecios/Pages/GestionZonasPrecios.jsx`
- [Gestión de usuarios](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/Features/GestorUsuarios/Pages/GestionUsuarios.jsx): `client/src/Features/GestorUsuarios/Pages/GestionUsuarios.jsx`
- [Cliente API admin](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/client/src/shared/api/adminApi.js): `client/src/shared/api/adminApi.js`

### API y persistencia

- [API FastAPI](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/app.py): `server/src/app.py`
- [Rutas de usuarios](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/Users.py): `server/src/routes/Users.py`
- [Rutas de eventos y precios](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/EventPricings.py): `server/src/routes/EventPricings.py`
- [Rutas de órdenes](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/routes/Orders.py): `server/src/routes/Orders.py`
- [Rutas de catálogo](https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/server/src/routes): `server/src/routes`
- [Modelos de dominio](https://github.com/jjpedrique/plataforma-de-ticketing/tree/main/server/src/models): `server/src/models`
- [PostgreSQL / ORM](https://github.com/jjpedrique/plataforma-de-ticketing/blob/main/server/src/database.py): `server/src/database.py`

### Other components

- **Visitante / usuario**

## Connections

- Visitante / usuario → Rutas y acceso: abre rutas (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Páginas públicas: muestra páginas (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Acceso y registro: dirige acceso (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Perfil de usuario: protege perfil (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Explorar eventos: protege compra (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Historial de entradas: protege historial (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Gestión de eventos: restringe por rol (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Zonas y precios: restringe por rol (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Gestión de usuarios: restringe por rol (evidence: `client/src/routes/router.jsx`)
- Rutas y acceso → Gestión de recintos: restringe por rol (evidence: `client/src/routes/router.jsx`)
- Acceso y registro → Servicio de identidad: solicita identidad (evidence: `client/src/Features/Auth/Pages/IniciarSesion.jsx`)
- Servicio de identidad → Cliente HTTP: envía solicitudes (evidence: `client/src/Features/Auth/services/authService.js`)
- Servicio de identidad → Sesión de cliente: actualiza sesión
- Perfil de usuario → Servicio de identidad: actualiza cuenta (evidence: `client/src/Features/Usuarios/Pages/Perfil.jsx`)
- Explorar eventos → Elegir asiento: continúa compra
- Elegir asiento → Pago: continúa compra
- Pago → Reserva completada: completa reserva
- Historial de entradas → Estado de compra: consulta estado
- Gestión de eventos → Cliente API admin: gestiona catálogo (evidence: `client/src/Features/GestorEventos/Pages/GestionEventos.jsx`)
- Gestión de recintos → Cliente API admin: gestiona recintos (evidence: `client/src/Features/GestorLugares/Pages/GestionLugares.jsx`)
- Zonas y precios → Cliente API admin: gestiona precios (evidence: `client/src/Features/GestorZonasPrecios/Pages/GestionZonasPrecios.jsx`)
- Gestión de usuarios → Cliente API admin: gestiona usuarios (evidence: `client/src/Features/GestorUsuarios/Pages/GestionUsuarios.jsx`)
- Cliente API admin → API FastAPI: solicita operaciones
- Cliente HTTP → API FastAPI: solicita identidad
- API FastAPI → Rutas de usuarios: registra rutas (evidence: `server/src/app.py`)
- API FastAPI → Rutas de eventos y precios: registra rutas (evidence: `server/src/app.py`)
- API FastAPI → Rutas de órdenes: registra rutas (evidence: `server/src/app.py`)
- API FastAPI → Rutas de catálogo: registra rutas (evidence: `server/src/app.py`)
- Rutas de usuarios → PostgreSQL / ORM: consulta usuarios (evidence: `server/src/routes/Users.py`)
- Rutas de eventos y precios → PostgreSQL / ORM: lee y modifica (evidence: `server/src/routes/EventPricings.py`)
- Rutas de órdenes → PostgreSQL / ORM: lee y modifica (evidence: `server/src/routes/Orders.py`)
- Rutas de eventos y precios → Modelos de dominio: usa entidades (evidence: `server/src/routes/EventPricings.py`)
- Rutas de órdenes → Modelos de dominio: usa entidades (evidence: `server/src/routes/Orders.py`)
- Rutas de usuarios → Modelos de dominio: usa entidades (evidence: `server/src/routes/Users.py`)
