# vargasesc17/eventhub architecture

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

- Interactive diagram: https://gitdiagram.com/vargasesc17/eventhub
- Repository: https://github.com/vargasesc17/eventhub

## Overview

EventHub combines a React application for organizers, buyers, and staff with three Spring services. Users manage and discover events, purchase tickets and receive QR codes, then staff validate entry; event changes and ticket alerts reach buyers asynchronously, while scheduled reminders provide another notification path. The README documents these capabilities and the service topology. Sampled controllers and repository code support several internal links; unsampled use-case and messaging wiring is shown only where explicitly documented, so some internal edges are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/vargasesc17/eventhub/blob/main/frontend/src/App.jsx) (Role-based app), [`services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java`](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java) (Ticket endpoints), [`frontend/src/pages/comprador`](https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/comprador) (Buyer workflows), [`services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java`](https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java) (Event endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Role-based app<br/>[App.jsx]"]
  node_session["Simulated session<br/>[Sesion.jsx]"]
  node_eventui["Event workflows"]
  node_buyerui["Buyer workflows"]
  node_staffui["Staff check-in"]
  node_eventapi["Events API client<br/>[eventos.js]"]
  node_ticketapi["Ticket API client<br/>[boleteria.js]"]
end

subgraph group_events["Event management"]
  node_eventhttp["Event endpoints"]
  node_eventuse["Event management"]
  node_eventdomain["Event rules<br/>[Evento.java]"]
  node_eventstore[("Event persistence")]
end

subgraph group_tickets["Ticketing"]
  node_tickethttp["Ticket endpoints"]
  node_ticketbuy["Ticket purchasing"]
  node_ticketdomain["Ticket and inventory<br/>[Boleta.java]"]
  node_ticketstore[("Ticket persistence")]
  node_checkin["QR check-in"]
end

subgraph group_notify["Notifications"]
  node_notification["Event notifications"]
  node_reminders["Scheduled reminders"]
  node_reminderstore[("Reminder data")]
end

node_users(("User roles"))
node_rabbit["RabbitMQ"]
node_mail["Mailpit inbox"]

node_users -->|"use"| node_webapp
node_webapp -->|"provides session"| node_session
node_webapp -->|"routes to"| node_eventui
node_webapp -->|"routes to"| node_buyerui
node_webapp -->|"routes to"| node_staffui
node_eventui -.->|"requests events"| node_eventapi
node_buyerui -.->|"requests catalog"| node_eventapi
node_buyerui -.->|"requests tickets"| node_ticketapi
node_staffui -.->|"submits check-in"| node_ticketapi
node_eventapi -->|"calls API"| node_eventhttp
node_ticketapi -->|"calls API"| node_tickethttp
node_eventhttp -->|"invokes"| node_eventuse
node_eventuse -.->|"applies rules"| node_eventdomain
node_eventuse -.->|"stores events"| node_eventstore
node_tickethttp -->|"invokes purchase"| node_ticketbuy
node_ticketbuy -.->|"creates tickets"| node_ticketdomain
node_ticketbuy -.->|"stores tickets"| node_ticketstore
node_tickethttp -.->|"validates entry"| node_checkin
node_eventhttp -.->|"publishes changes"| node_rabbit
node_tickethttp -.->|"publishes ticket alerts"| node_rabbit
node_rabbit -->|"delivers events"| node_notification
node_notification -->|"sends email"| node_mail
node_reminders -.->|"loads pending"| node_reminderstore
node_reminders -.->|"sends reminders"| node_mail

click node_webapp "https://github.com/vargasesc17/eventhub/blob/main/frontend/src/App.jsx"
click node_session "https://github.com/vargasesc17/eventhub/blob/main/frontend/src/sesion/Sesion.jsx"
click node_eventui "https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/organizador"
click node_buyerui "https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/comprador"
click node_staffui "https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/staff"
click node_eventapi "https://github.com/vargasesc17/eventhub/blob/main/frontend/src/api/eventos.js"
click node_ticketapi "https://github.com/vargasesc17/eventhub/blob/main/frontend/src/api/boleteria.js"
click node_eventhttp "https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java"
click node_eventuse "https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/application/GestionarEventoUseCase.java"
click node_eventdomain "https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/domain/Evento.java"
click node_eventstore "https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/infrastructure/JpaEventoRepository.java"
click node_tickethttp "https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java"
click node_ticketbuy "https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/application/ComprarBoletaUseCase.java"
click node_ticketdomain "https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/domain/Boleta.java"
click node_ticketstore "https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/infrastructure/persistencia/JpaBoletaRepository.java"
click node_checkin "https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/application/CheckInService.java"
click node_notification "https://github.com/vargasesc17/eventhub/tree/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/application"
click node_reminders "https://github.com/vargasesc17/eventhub/blob/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/application/EnviarRecordatoriosUseCase.java"
click node_reminderstore "https://github.com/vargasesc17/eventhub/blob/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/infrastructure/persistencia/JpaRecordatorioRepository.java"

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_webapp,node_session,node_eventui,node_buyerui,node_staffui,node_eventapi,node_ticketapi,node_users toneBlue
class node_eventhttp,node_eventuse,node_eventdomain,node_eventstore toneAmber
class node_tickethttp,node_ticketbuy,node_ticketdomain,node_ticketstore,node_checkin toneMint
class node_notification,node_reminders,node_reminderstore toneRose
class node_rabbit,node_mail toneIndigo
```

## Components

### Web application

- [Role-based app](https://github.com/vargasesc17/eventhub/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Simulated session](https://github.com/vargasesc17/eventhub/blob/main/frontend/src/sesion/Sesion.jsx): `frontend/src/sesion/Sesion.jsx`
- [Event workflows](https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/organizador): `frontend/src/pages/organizador`
- [Buyer workflows](https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/comprador): `frontend/src/pages/comprador`
- [Staff check-in](https://github.com/vargasesc17/eventhub/tree/main/frontend/src/pages/staff): `frontend/src/pages/staff`
- [Events API client](https://github.com/vargasesc17/eventhub/blob/main/frontend/src/api/eventos.js): `frontend/src/api/eventos.js`
- [Ticket API client](https://github.com/vargasesc17/eventhub/blob/main/frontend/src/api/boleteria.js): `frontend/src/api/boleteria.js`

### Event management

- [Event endpoints](https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java): `services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java`
- [Event management](https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/application/GestionarEventoUseCase.java): `services/eventos/src/main/java/com/eventhub/eventos/application/GestionarEventoUseCase.java`
- [Event rules](https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/domain/Evento.java): `services/eventos/src/main/java/com/eventhub/eventos/domain/Evento.java`
- [Event persistence](https://github.com/vargasesc17/eventhub/blob/main/services/eventos/src/main/java/com/eventhub/eventos/infrastructure/JpaEventoRepository.java): `services/eventos/src/main/java/com/eventhub/eventos/infrastructure/JpaEventoRepository.java`

### Ticketing

- [Ticket endpoints](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java): `services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java`
- [Ticket purchasing](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/application/ComprarBoletaUseCase.java): `services/boleteria/src/main/java/com/eventhub/boleteria/application/ComprarBoletaUseCase.java`
- [Ticket and inventory](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/domain/Boleta.java): `services/boleteria/src/main/java/com/eventhub/boleteria/domain/Boleta.java`
- [Ticket persistence](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/infrastructure/persistencia/JpaBoletaRepository.java): `services/boleteria/src/main/java/com/eventhub/boleteria/infrastructure/persistencia/JpaBoletaRepository.java`
- [QR check-in](https://github.com/vargasesc17/eventhub/blob/main/services/boleteria/src/main/java/com/eventhub/boleteria/application/CheckInService.java): `services/boleteria/src/main/java/com/eventhub/boleteria/application/CheckInService.java`

### Notifications

- [Event notifications](https://github.com/vargasesc17/eventhub/tree/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/application): `services/notificaciones/src/main/java/com/eventhub/notificaciones/application`
- [Scheduled reminders](https://github.com/vargasesc17/eventhub/blob/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/application/EnviarRecordatoriosUseCase.java): `services/notificaciones/src/main/java/com/eventhub/notificaciones/application/EnviarRecordatoriosUseCase.java`
- [Reminder data](https://github.com/vargasesc17/eventhub/blob/main/services/notificaciones/src/main/java/com/eventhub/notificaciones/infrastructure/persistencia/JpaRecordatorioRepository.java): `services/notificaciones/src/main/java/com/eventhub/notificaciones/infrastructure/persistencia/JpaRecordatorioRepository.java`

### Other components

- **User roles**
- **RabbitMQ**
- **Mailpit inbox**

## Connections

- User roles → Role-based app: use
- Role-based app → Simulated session: provides session (evidence: `frontend/src/App.jsx`)
- Role-based app → Event workflows: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app → Buyer workflows: routes to (evidence: `frontend/src/App.jsx`)
- Role-based app → Staff check-in: routes to (evidence: `frontend/src/App.jsx`)
- Event workflows → Events API client: requests events (evidence: `frontend/src/pages/organizador/AforoEvento.jsx`)
- Buyer workflows → Events API client: requests catalog (evidence: `frontend/src/pages/comprador/ComprarBoleta.jsx`)
- Buyer workflows → Ticket API client: requests tickets (evidence: `frontend/src/pages/comprador/ComprarBoleta.jsx`)
- Staff check-in → Ticket API client: submits check-in (evidence: `frontend/src/pages/staff/CheckinDetalle.jsx`)
- Events API client → Event endpoints: calls API
- Ticket API client → Ticket endpoints: calls API
- Event endpoints → Event management: invokes (evidence: `services/eventos/src/main/java/com/eventhub/eventos/interfaces/EventoController.java`)
- Event management → Event rules: applies rules
- Event management → Event persistence: stores events
- Ticket endpoints → Ticket purchasing: invokes purchase (evidence: `services/boleteria/src/main/java/com/eventhub/boleteria/interfaces/BoletaController.java`)
- Ticket purchasing → Ticket and inventory: creates tickets
- Ticket purchasing → Ticket persistence: stores tickets
- Ticket endpoints → QR check-in: validates entry
- Event endpoints → RabbitMQ: publishes changes
- Ticket endpoints → RabbitMQ: publishes ticket alerts
- RabbitMQ → Event notifications: delivers events
- Event notifications → Mailpit inbox: sends email
- Scheduled reminders → Reminder data: loads pending
- Scheduled reminders → Mailpit inbox: sends reminders
