# jeonghun4035/ticket-buy-fe architecture

> Architecture diagram of the GitHub repository jeonghun4035/ticket-buy-fe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeonghun4035/ticket-buy-fe
- Repository: https://github.com/jeonghun4035/ticket-buy-fe

## Overview

Ticket Buy is a React/TypeScript ticket-booking frontend demo backed by a separate REST API. The main journey is event discovery and detail, then authenticated performance selection, queue admission, seat selection and hold, reservation confirmation, and reservation history/cancellation. The graph also preserves authentication, support/content administration, board, and shared presentation capabilities. Edges are limited to README-described flows and relationships visible in sampled source or the source index; unsampled implementations are represented only where documented.

Main entry points: [`src/api/ticket.ts`](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/ticket.ts) (Ticket API services), [`src/pages/Main/Main.tsx`](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Main/Main.tsx) (Event discovery), [`src/components/booking/BookingFlow.tsx`](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/BookingFlow.tsx) (Booking flow), [`src/main.tsx`](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/main.tsx) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["App startup<br/>[main.tsx]"]
  node_router["Route configuration<br/>[AppRouter.tsx]"]
  node_layout["Shared layout<br/>[Layout.tsx]"]
  node_i18n["Localization<br/>[index.ts]"]
  node_theme["Theme provider<br/>[ThemeProvider.tsx]"]
end

subgraph group_discovery["Event discovery"]
  node_eventbrowse["Event discovery<br/>[Main.tsx]"]
  node_eventui["Grid and pagination<br/>[Grid.tsx]"]
end

subgraph group_booking["Booking and reservations"]
  node_bookingflow["Booking flow<br/>[BookingFlow.tsx]"]
  node_waiting["Queue waiting room<br/>[WaitingRoom.tsx]"]
  node_bookingdialog["Seat selection and hold<br/>[BookingDialog.tsx]"]
  node_seatmap["Seat map<br/>[SeatMap.tsx]"]
  node_reservations["My reservations<br/>[Reservations.tsx]"]
  node_payments["Payment status demo<br/>[Payments.tsx]"]
end

subgraph group_services["API and identity"]
  node_auth["Auth session<br/>[client.ts]"]
  node_authprovider["Auth context<br/>[AuthProvider.tsx]"]
  node_query["Query state<br/>[useApiQuery.ts]"]
  node_ticketapi["Ticket API services<br/>[ticket.ts]"]
  node_adapters["Event mapping<br/>[adapters.ts]"]
  node_signin["Sign in and signup<br/>[Sign-in.tsx]"]
  node_adminapi["Admin event services<br/>[adminEvents.ts]"]
end

subgraph group_content["Support and content"]
  node_board["Posts board<br/>[Board.tsx]"]
  node_support["Support and FAQ<br/>[Support.tsx]"]
  node_admin["Content administration<br/>[Admin.tsx]"]
  node_eventcreate["Event management<br/>[EventCreate.tsx]"]
end

node_visitor(("Visitor"))
node_backend["REST API"]

node_visitor -->|"opens"| node_entry
node_entry -->|"renders"| node_router
node_entry -->|"wraps"| node_theme
node_entry -->|"initializes"| node_i18n
node_router -->|"routes through"| node_layout
node_visitor -->|"explores events"| node_eventbrowse
node_eventbrowse -->|"loads listings"| node_query
node_eventbrowse -->|"requests details"| node_ticketapi
node_eventbrowse -->|"maps events"| node_adapters
node_eventbrowse -->|"renders listings"| node_eventui
node_query -->|"loads through"| node_ticketapi
node_ticketapi -->|"sends requests"| node_auth
node_auth -->|"calls REST API"| node_backend
node_visitor -->|"starts booking"| node_bookingflow
node_eventbrowse -->|"opens booking"| node_bookingflow
node_bookingflow -->|"shows queue"| node_waiting
node_bookingflow -->|"shows seats"| node_bookingdialog
node_bookingdialog -->|"renders seats"| node_seatmap
node_bookingflow -->|"dispatches booking"| node_ticketapi
node_bookingdialog -->|"holds and confirms"| node_ticketapi
node_visitor -->|"authenticates"| node_signin
node_authprovider -->|"restores session"| node_auth
node_reservations -->|"loads history"| node_query
node_reservations -->|"reads and cancels"| node_ticketapi
node_payments -.->|"shows demo status"| node_visitor
node_visitor -->|"browses posts"| node_board
node_board -->|"loads content"| node_ticketapi
node_visitor -->|"gets assistance"| node_support
node_support -.->|"loads support data"| node_ticketapi
node_admin -->|"manages events"| node_eventcreate
node_eventcreate -->|"submits event changes"| node_adminapi
node_adminapi -.->|"calls REST API"| node_backend
node_visitor -->|"views bookings"| node_reservations
node_visitor -->|"manages content"| node_admin

click node_entry "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/main.tsx"
click node_router "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/AppRouter.tsx"
click node_layout "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/layouts/Layout/Layout.tsx"
click node_auth "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/client.ts"
click node_authprovider "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/contexts/auth/AuthProvider.tsx"
click node_query "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/hooks/useApiQuery.ts"
click node_ticketapi "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/ticket.ts"
click node_adapters "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/adapters.ts"
click node_eventbrowse "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Main/Main.tsx"
click node_eventui "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/common/Grid/Grid.tsx"
click node_bookingflow "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/BookingFlow.tsx"
click node_waiting "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/WaitingRoom/WaitingRoom.tsx"
click node_bookingdialog "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/BookingDialog/BookingDialog.tsx"
click node_seatmap "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/common/SeatMap/SeatMap.tsx"
click node_reservations "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Reservations/Reservations.tsx"
click node_payments "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Payments/Payments.tsx"
click node_signin "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Sign/Sign-in.tsx"
click node_board "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Board/Board.tsx"
click node_support "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Support/Support.tsx"
click node_admin "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Admin/Admin.tsx"
click node_eventcreate "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Admin/EventCreate.tsx"
click node_adminapi "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/adminEvents.ts"
click node_i18n "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/i18n/index.ts"
click node_theme "https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/contexts/theme/ThemeProvider.tsx"

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_entry,node_router,node_layout,node_i18n,node_theme toneBlue
class node_eventbrowse,node_eventui toneAmber
class node_bookingflow,node_waiting,node_bookingdialog,node_seatmap,node_reservations,node_payments,node_backend toneMint
class node_auth,node_authprovider,node_query,node_ticketapi,node_adapters,node_signin,node_adminapi toneRose
class node_board,node_support,node_admin,node_eventcreate,node_visitor toneIndigo
```

## Components

### Application shell

- [App startup](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/main.tsx): `src/main.tsx`
- [Route configuration](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/AppRouter.tsx): `src/AppRouter.tsx`
- [Shared layout](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/layouts/Layout/Layout.tsx): `src/layouts/Layout/Layout.tsx`
- [Localization](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/i18n/index.ts): `src/i18n/index.ts`
- [Theme provider](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/contexts/theme/ThemeProvider.tsx): `src/contexts/theme/ThemeProvider.tsx`

### Event discovery

- [Event discovery](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Main/Main.tsx): `src/pages/Main/Main.tsx`
- [Grid and pagination](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/common/Grid/Grid.tsx): `src/components/common/Grid/Grid.tsx`

### Booking and reservations

- [Booking flow](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/BookingFlow.tsx): `src/components/booking/BookingFlow.tsx`
- [Queue waiting room](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/WaitingRoom/WaitingRoom.tsx): `src/components/booking/WaitingRoom/WaitingRoom.tsx`
- [Seat selection and hold](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/booking/BookingDialog/BookingDialog.tsx): `src/components/booking/BookingDialog/BookingDialog.tsx`
- [Seat map](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/components/common/SeatMap/SeatMap.tsx): `src/components/common/SeatMap/SeatMap.tsx`
- [My reservations](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Reservations/Reservations.tsx): `src/pages/Reservations/Reservations.tsx`
- [Payment status demo](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Payments/Payments.tsx): `src/pages/Payments/Payments.tsx`

### API and identity

- [Auth session](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/client.ts): `src/api/client.ts`
- [Auth context](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/contexts/auth/AuthProvider.tsx): `src/contexts/auth/AuthProvider.tsx`
- [Query state](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/hooks/useApiQuery.ts): `src/hooks/useApiQuery.ts`
- [Ticket API services](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/ticket.ts): `src/api/ticket.ts`
- [Event mapping](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/adapters.ts): `src/api/adapters.ts`
- [Sign in and signup](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Sign/Sign-in.tsx): `src/pages/Sign/Sign-in.tsx`
- [Admin event services](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/api/adminEvents.ts): `src/api/adminEvents.ts`

### Support and content

- [Posts board](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Board/Board.tsx): `src/pages/Board/Board.tsx`
- [Support and FAQ](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Support/Support.tsx): `src/pages/Support/Support.tsx`
- [Content administration](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Admin/Admin.tsx): `src/pages/Admin/Admin.tsx`
- [Event management](https://github.com/jeonghun4035/ticket-buy-fe/blob/master/src/pages/Admin/EventCreate.tsx): `src/pages/Admin/EventCreate.tsx`

### Other components

- **Visitor**
- **REST API**

## Connections

- Visitor → App startup: opens (evidence: `README.md`)
- App startup → Route configuration: renders (evidence: `src/main.tsx`)
- App startup → Theme provider: wraps (evidence: `src/main.tsx`)
- App startup → Localization: initializes (evidence: `src/main.tsx`)
- Route configuration → Shared layout: routes through (evidence: `src/AppRouter.tsx`)
- Visitor → Event discovery: explores events (evidence: `README.md`)
- Event discovery → Query state: loads listings (evidence: `src/pages/Main/Main.tsx`)
- Event discovery → Ticket API services: requests details (evidence: `src/pages/Main/Main.tsx`)
- Event discovery → Event mapping: maps events (evidence: `src/pages/Main/Main.tsx`)
- Event discovery → Grid and pagination: renders listings (evidence: `src/pages/Main/Main.tsx`)
- Query state → Ticket API services: loads through (evidence: `src/hooks/useApiQuery.ts`)
- Ticket API services → Auth session: sends requests (evidence: `src/api/ticket.ts`)
- Auth session → REST API: calls REST API (evidence: `README.md`)
- Visitor → Booking flow: starts booking (evidence: `README.md`)
- Event discovery → Booking flow: opens booking (evidence: `src/pages/Main/Main.tsx`)
- Booking flow → Queue waiting room: shows queue (evidence: `src/components/booking/BookingFlow.tsx`)
- Booking flow → Seat selection and hold: shows seats (evidence: `src/components/booking/BookingFlow.tsx`)
- Seat selection and hold → Seat map: renders seats (evidence: `src/components/booking/BookingDialog/BookingDialog.tsx`)
- Booking flow → Ticket API services: dispatches booking (evidence: `src/components/booking/BookingFlow.tsx`)
- Seat selection and hold → Ticket API services: holds and confirms (evidence: `src/components/booking/BookingDialog/BookingDialog.tsx`)
- Visitor → Sign in and signup: authenticates (evidence: `README.md`)
- Auth context → Auth session: restores session (evidence: `src/contexts/auth/AuthProvider.tsx`)
- My reservations → Query state: loads history (evidence: `src/pages/Reservations/Reservations.tsx`)
- My reservations → Ticket API services: reads and cancels (evidence: `src/pages/Reservations/Reservations.tsx`)
- Payment status demo → Visitor: shows demo status (evidence: `README.md`)
- Visitor → Posts board: browses posts (evidence: `README.md`)
- Posts board → Ticket API services: loads content (evidence: `src/pages/Board/Board.tsx`)
- Visitor → Support and FAQ: gets assistance (evidence: `README.md`)
- Support and FAQ → Ticket API services: loads support data (evidence: `README.md`)
- Content administration → Event management: manages events (evidence: `src/AppRouter.tsx`)
- Event management → Admin event services: submits event changes (evidence: `src/pages/Admin/EventCreate.tsx`)
- Admin event services → REST API: calls REST API (evidence: `README.md`)
- Visitor → My reservations: views bookings (evidence: `README.md`)
- Visitor → Content administration: manages content (evidence: `README.md`)
