# vanhhoang2810/fpt-eventseller architecture

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

- Interactive diagram: https://gitdiagram.com/vanhhoang2810/fpt-eventseller
- Repository: https://github.com/vanhhoang2810/fpt-eventseller

## Overview

Ticket Rush is an online event-ticketing platform. Customers discover events, join a virtual queue when enabled, select and hold seats, apply promotions, pay, and receive tickets; administrators manage events, venues, users, bookings, reporting, and live chat. The graph captures the documented capabilities and sampled controller/service boundaries. Several subsystems are represented at their existing module directories because their implementation was not sampled; their internal wiring is therefore not inferred.

Main entry points: [`frontend/src/app/router.tsx`](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/frontend/src/app/router.tsx) (Web app), [`frontend/src/features/booking`](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/booking) (Checkout and payment), [`backend/src/modules/booking/booking.controller.ts`](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/booking/booking.controller.ts) (Booking services), [`backend/src/modules/notifications/notifications.controller.ts`](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/notifications/notifications.controller.ts) (Notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer frontend"]
  node_webapp["Web app<br/>[router.tsx]"]
  node_eventbrowse["Event discovery"]
  node_seatselect["Seat selection"]
  node_queueui["Queue waiting room"]
  node_checkoutui["Checkout and payment"]
  node_ticketui["Tickets"]
end

subgraph group_commerce["Ticketing backend"]
  node_eventapi["Event services"]
  node_queueapi["Queue services"]
  node_bookingapi["Booking services"]
  node_paymentapi["Payment services"]
  node_ticketapi["Ticket services"]
end

subgraph group_engagement["Account and engagement"]
  node_accounts["Authentication and profiles<br/>[auth.service.ts]"]
  node_promos["Promotions<br/>[promo.routes.ts]"]
  node_favorites["Favorites"]
  node_notify["Notifications"]
  node_chat["Live chat<br/>[chat.routes.ts]"]
end

subgraph group_operations["Administration"]
  node_adminui["Admin workspace"]
  node_adminapi["Admin services"]
end

node_customer(("Customer"))
node_mysql[("MySQL data")]
node_redis[("Redis queue state")]
node_paymentproviders{{"VNPay and MoMo"}}
node_realtime["Socket.IO<br/>[socket.ts]"]
node_email["Email delivery"]

node_customer -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_eventbrowse
node_webapp -->|"routes to"| node_seatselect
node_webapp -->|"routes to"| node_queueui
node_webapp -->|"routes to"| node_checkoutui
node_webapp -->|"routes to"| node_ticketui
node_eventbrowse -->|"requests events"| node_eventapi
node_seatselect -->|"loads seat map"| node_eventapi
node_seatselect -->|"requests seat hold"| node_bookingapi
node_queueui -->|"checks queue"| node_queueapi
node_checkoutui -->|"checks out"| node_bookingapi
node_checkoutui -->|"validates promo"| node_promos
node_checkoutui -->|"starts payment"| node_paymentapi
node_paymentapi -.->|"creates payment"| node_paymentproviders
node_ticketui -->|"requests tickets"| node_ticketapi
node_bookingapi -->|"consumes token"| node_queueapi
node_bookingapi -->|"reads and writes"| node_mysql
node_eventapi -->|"reads events"| node_mysql
node_paymentapi -->|"reads bookings"| node_mysql
node_ticketapi -->|"reads tickets"| node_mysql
node_queueapi -->|"uses queue state"| node_redis
node_customer -->|"admin access"| node_adminui
node_adminui -->|"requests administration"| node_adminapi
node_adminapi -->|"reads and writes"| node_mysql
node_accounts -->|"reads and writes users"| node_mysql
node_accounts -.->|"verifies Google identity"| node_paymentproviders
node_promos -->|"reads and writes promos"| node_mysql
node_favorites -->|"reads and writes favorites"| node_mysql
node_notify -->|"reads notifications"| node_mysql
node_chat -->|"reads and writes chat"| node_mysql
node_chat -.->|"emits chat events"| node_realtime
node_notify -.->|"delivers live updates"| node_realtime
node_notify -.->|"sends email"| node_email

click node_webapp "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/frontend/src/app/router.tsx"
click node_eventbrowse "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/events"
click node_seatselect "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/booking"
click node_queueui "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/queue"
click node_checkoutui "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/booking"
click node_ticketui "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/tickets"
click node_eventapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/events/events.controller.ts"
click node_queueapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/queue/queue.controller.ts"
click node_bookingapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/booking/booking.controller.ts"
click node_paymentapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/payments/payments.controller.ts"
click node_ticketapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/tickets/tickets.controller.ts"
click node_accounts "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/auth/auth.service.ts"
click node_promos "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/promo/promo.routes.ts"
click node_favorites "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/events/events.controller.ts"
click node_notify "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/notifications/notifications.controller.ts"
click node_chat "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/chat/chat.routes.ts"
click node_adminui "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/admin"
click node_adminapi "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/admin/admin.controller.ts"
click node_realtime "https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/config/socket.ts"
click node_email "https://github.com/vanhhoang2810/fpt-eventseller/tree/main/backend/src/modules/email"

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_eventbrowse,node_seatselect,node_queueui,node_checkoutui,node_ticketui toneBlue
class node_eventapi,node_queueapi,node_bookingapi,node_paymentapi,node_ticketapi,node_mysql,node_redis toneAmber
class node_accounts,node_promos,node_favorites,node_notify,node_chat toneMint
class node_adminui,node_adminapi toneRose
class node_customer,node_paymentproviders toneIndigo
class node_realtime,node_email toneTeal
```

## Components

### Customer frontend

- [Web app](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/frontend/src/app/router.tsx): `frontend/src/app/router.tsx`
- [Event discovery](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/events): `frontend/src/features/events`
- [Seat selection](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/booking): `frontend/src/features/booking`
- [Queue waiting room](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/queue): `frontend/src/features/queue`
- [Checkout and payment](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/booking): `frontend/src/features/booking`
- [Tickets](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/tickets): `frontend/src/features/tickets`

### Ticketing backend

- [Event services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/events/events.controller.ts): `backend/src/modules/events/events.controller.ts`
- [Queue services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/queue/queue.controller.ts): `backend/src/modules/queue/queue.controller.ts`
- [Booking services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/booking/booking.controller.ts): `backend/src/modules/booking/booking.controller.ts`
- [Payment services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/payments/payments.controller.ts): `backend/src/modules/payments/payments.controller.ts`
- [Ticket services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/tickets/tickets.controller.ts): `backend/src/modules/tickets/tickets.controller.ts`

### Account and engagement

- [Authentication and profiles](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/auth/auth.service.ts): `backend/src/modules/auth/auth.service.ts`
- [Promotions](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/promo/promo.routes.ts): `backend/src/modules/promo/promo.routes.ts`
- [Favorites](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/events/events.controller.ts): `backend/src/modules/events/events.controller.ts`
- [Notifications](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/notifications/notifications.controller.ts): `backend/src/modules/notifications/notifications.controller.ts`
- [Live chat](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/chat/chat.routes.ts): `backend/src/modules/chat/chat.routes.ts`

### Administration

- [Admin workspace](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/frontend/src/features/admin): `frontend/src/features/admin`
- [Admin services](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/modules/admin/admin.controller.ts): `backend/src/modules/admin/admin.controller.ts`

### Other components

- **Customer**
- **MySQL data**
- **Redis queue state**
- **VNPay and MoMo**
- [Socket.IO](https://github.com/vanhhoang2810/fpt-eventseller/blob/main/backend/src/config/socket.ts): `backend/src/config/socket.ts`
- [Email delivery](https://github.com/vanhhoang2810/fpt-eventseller/tree/main/backend/src/modules/email): `backend/src/modules/email`

## Connections

- Customer → Web app: uses
- Web app → Event discovery: routes to
- Web app → Seat selection: routes to
- Web app → Queue waiting room: routes to
- Web app → Checkout and payment: routes to
- Web app → Tickets: routes to
- Event discovery → Event services: requests events
- Seat selection → Event services: loads seat map
- Seat selection → Booking services: requests seat hold
- Queue waiting room → Queue services: checks queue
- Checkout and payment → Booking services: checks out
- Checkout and payment → Promotions: validates promo
- Checkout and payment → Payment services: starts payment
- Payment services → VNPay and MoMo: creates payment
- Tickets → Ticket services: requests tickets
- Booking services → Queue services: consumes token
- Booking services → MySQL data: reads and writes
- Event services → MySQL data: reads events
- Payment services → MySQL data: reads bookings
- Ticket services → MySQL data: reads tickets
- Queue services → Redis queue state: uses queue state
- Customer → Admin workspace: admin access
- Admin workspace → Admin services: requests administration
- Admin services → MySQL data: reads and writes
- Authentication and profiles → MySQL data: reads and writes users
- Authentication and profiles → VNPay and MoMo: verifies Google identity
- Promotions → MySQL data: reads and writes promos
- Favorites → MySQL data: reads and writes favorites
- Notifications → MySQL data: reads notifications
- Live chat → MySQL data: reads and writes chat
- Live chat → Socket.IO: emits chat events
- Notifications → Socket.IO: delivers live updates
- Notifications → Email delivery: sends email
