# hyo213/tnh architecture

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

- Interactive diagram: https://gitdiagram.com/hyo213/tnh
- Repository: https://github.com/hyo213/tnh

## Overview

GO TRAVEL is an airline-ticket booking site. Its central user journey is searching one-way or round-trip flights, selecting a flight, making a reservation, and managing bookings and payment/refund details. The tree and README also identify account and social-login flows, notices, administrative flight management, email verification, and customer consultation. The available source excerpts show flight-search dispatch and reservation-detail assembly; several other connections are inferred only from documented capabilities or remain unverified, so those links are dashed.

Main entry points: [`src/main/java/go/travel/dnh/controller/MemberInfoController.java`](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/MemberInfoController.java) (Account management), [`src/main/java/go/travel/dnh/service/CustomOAuth2Service.java`](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/CustomOAuth2Service.java) (Login and OAuth), [`src/main/java/go/travel/dnh/service/AirProductService.java`](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/AirProductService.java) (Flight catalog), [`src/main/java/go/travel/dnh/service/ReservationService.java`](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/ReservationService.java) (Reservations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_accounts["Accounts and access"]
  node_member["Account management"]
  node_login["Login and OAuth"]
end

subgraph group_flights["Flights and bookings"]
  node_flightui["Flight search<br/>[AirController.java]"]
  node_flightservice["Flight catalog"]
  node_flightrepo["Flight data access"]
  node_reservation["Reservations"]
  node_bookingui["Booking views"]
end

subgraph group_payments["Payment lifecycle"]
  node_paymentui["Payment flow<br/>[PayController.java]"]
  node_payment["Payment service"]
  node_refundui["Refund flow"]
  node_refund["Refund service<br/>[RefundService.java]"]
end

subgraph group_operations["Site operations"]
  node_admin["Flight administration"]
  node_notices["Notice board"]
  node_mail["Email verification<br/>[EmailConfig.java]"]
end

subgraph group_data["Persistence"]
  node_mysql[("MySQL database")]
  node_flightmapper["Flight mappers"]
  node_usermapper["User mapper<br/>[UserMapper.java]"]
end

node_traveler(("Traveler"))
node_oauth{{"OAuth providers"}}
node_paymentprovider{{"I'mport payments"}}
node_consult{{"Kakao consultation"}}

node_traveler -->|"searches flights"| node_flightui
node_flightui -->|"requests results"| node_flightservice
node_flightservice -.->|"delegates queries"| node_flightrepo
node_flightrepo -->|"queries flights"| node_flightmapper
node_flightmapper -.->|"reads flight data"| node_mysql
node_traveler -.->|"books flight"| node_reservation
node_reservation -.->|"supplies bookings"| node_bookingui
node_traveler -->|"manages account"| node_member
node_member -->|"loads bookings"| node_reservation
node_member -->|"loads payment"| node_payment
node_member -->|"loads refund"| node_refund
node_traveler -.->|"authenticates"| node_login
node_login -->|"requests identity"| node_oauth
node_login -->|"stores social user"| node_usermapper
node_usermapper -.->|"reads and writes users"| node_mysql
node_traveler -.->|"pays for booking"| node_paymentui
node_paymentui -->|"requests payment"| node_payment
node_payment -.->|"charges payment"| node_paymentprovider
node_traveler -.->|"requests refund"| node_refundui
node_refundui -.->|"requests refund"| node_refund
node_refund -.->|"issues refund"| node_paymentprovider
node_traveler -.->|"administers flights"| node_admin
node_admin -->|"manages catalog"| node_flightservice
node_traveler -.->|"views notices"| node_notices
node_traveler -.->|"verifies email"| node_mail
node_traveler -.->|"seeks assistance"| node_consult

click node_member "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/MemberInfoController.java"
click node_login "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/CustomOAuth2Service.java"
click node_flightui "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/AirController.java"
click node_flightservice "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/AirProductService.java"
click node_flightrepo "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/repository/AirProductRepositoryImpl.java"
click node_reservation "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/ReservationService.java"
click node_bookingui "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/MemberInfoController.java"
click node_paymentui "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/PayController.java"
click node_payment "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/PaymentService.java"
click node_refundui "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/RefundController.java"
click node_refund "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/RefundService.java"
click node_admin "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/AdminController.java"
click node_notices "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/NoticeController.java"
click node_mail "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/config/EmailConfig.java"
click node_flightmapper "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/mapper/AirProductMapper.java"
click node_usermapper "https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/mapper/UserMapper.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_member,node_login toneBlue
class node_flightui,node_flightservice,node_flightrepo,node_reservation,node_bookingui toneAmber
class node_paymentui,node_payment,node_refundui,node_refund toneMint
class node_admin,node_notices,node_mail toneRose
class node_mysql,node_flightmapper,node_usermapper,node_traveler,node_oauth,node_paymentprovider,node_consult toneIndigo
```

## Components

### Accounts and access

- [Account management](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/MemberInfoController.java): `src/main/java/go/travel/dnh/controller/MemberInfoController.java`
- [Login and OAuth](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/CustomOAuth2Service.java): `src/main/java/go/travel/dnh/service/CustomOAuth2Service.java`

### Flights and bookings

- [Flight search](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/AirController.java): `src/main/java/go/travel/dnh/controller/AirController.java`
- [Flight catalog](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/AirProductService.java): `src/main/java/go/travel/dnh/service/AirProductService.java`
- [Flight data access](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/repository/AirProductRepositoryImpl.java): `src/main/java/go/travel/dnh/repository/AirProductRepositoryImpl.java`
- [Reservations](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/ReservationService.java): `src/main/java/go/travel/dnh/service/ReservationService.java`
- [Booking views](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/MemberInfoController.java): `src/main/java/go/travel/dnh/controller/MemberInfoController.java`

### Payment lifecycle

- [Payment flow](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/PayController.java): `src/main/java/go/travel/dnh/controller/PayController.java`
- [Payment service](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/PaymentService.java): `src/main/java/go/travel/dnh/service/PaymentService.java`
- [Refund flow](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/RefundController.java): `src/main/java/go/travel/dnh/controller/RefundController.java`
- [Refund service](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/service/RefundService.java): `src/main/java/go/travel/dnh/service/RefundService.java`

### Site operations

- [Flight administration](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/AdminController.java): `src/main/java/go/travel/dnh/controller/AdminController.java`
- [Notice board](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/controller/NoticeController.java): `src/main/java/go/travel/dnh/controller/NoticeController.java`
- [Email verification](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/config/EmailConfig.java): `src/main/java/go/travel/dnh/config/EmailConfig.java`

### Persistence

- **MySQL database**
- [Flight mappers](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/mapper/AirProductMapper.java): `src/main/java/go/travel/dnh/mapper/AirProductMapper.java`
- [User mapper](https://github.com/hyo213/tnh/blob/main/src/main/java/go/travel/dnh/mapper/UserMapper.java): `src/main/java/go/travel/dnh/mapper/UserMapper.java`

### Other components

- **Traveler**
- **OAuth providers**
- **I'mport payments**
- **Kakao consultation**

## Connections

- Traveler → Flight search: searches flights (evidence: `src/main/java/go/travel/dnh/controller/AirController.java`)
- Flight search → Flight catalog: requests results (evidence: `src/main/java/go/travel/dnh/controller/AirController.java`)
- Flight catalog → Flight data access: delegates queries
- Flight data access → Flight mappers: queries flights (evidence: `src/main/java/go/travel/dnh/repository/AirProductRepositoryImpl.java`)
- Flight mappers → MySQL database: reads flight data
- Traveler → Reservations: books flight
- Reservations → Booking views: supplies bookings (evidence: `src/main/java/go/travel/dnh/controller/MemberInfoController.java`)
- Traveler → Account management: manages account (evidence: `src/main/java/go/travel/dnh/controller/MemberInfoController.java`)
- Account management → Reservations: loads bookings (evidence: `src/main/java/go/travel/dnh/controller/MemberInfoController.java`)
- Account management → Payment service: loads payment (evidence: `src/main/java/go/travel/dnh/controller/MemberInfoController.java`)
- Account management → Refund service: loads refund (evidence: `src/main/java/go/travel/dnh/controller/MemberInfoController.java`)
- Traveler → Login and OAuth: authenticates
- Login and OAuth → OAuth providers: requests identity (evidence: `README.md`)
- Login and OAuth → User mapper: stores social user (evidence: `src/main/java/go/travel/dnh/service/CustomOAuth2Service.java`)
- User mapper → MySQL database: reads and writes users
- Traveler → Payment flow: pays for booking
- Payment flow → Payment service: requests payment (evidence: `src/main/java/go/travel/dnh/controller/PayController.java`)
- Payment service → I'mport payments: charges payment (evidence: `README.md`)
- Traveler → Refund flow: requests refund
- Refund flow → Refund service: requests refund
- Refund service → I'mport payments: issues refund (evidence: `README.md`)
- Traveler → Flight administration: administers flights
- Flight administration → Flight catalog: manages catalog (evidence: `src/main/java/go/travel/dnh/controller/AdminController.java`)
- Traveler → Notice board: views notices
- Traveler → Email verification: verifies email (evidence: `README.md`)
- Traveler → Kakao consultation: seeks assistance (evidence: `README.md`)
