# uoahns23/spring-cgv-24th architecture

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

- Interactive diagram: https://gitdiagram.com/uoahns23/spring-cgv-24th
- Repository: https://github.com/uoahns23/spring-cgv-24th

## Overview

This is a Spring Boot CGV-clone backend for accounts, movie and theater discovery, reservations, concession orders, payments, and favorites. The documented user journey is to browse movies and screenings, reserve seats, and place a theater-specific store order; users can also maintain movie likes and theater favorites. The README describes the domain relationships, while sampled services show reservation seat/pricing work, inventory-backed orders, and payment-related lifecycle handling. Several controller and payment flows are represented at subsystem level because their implementation was not sampled.

Main entry points: [`src/main/java/com/ceos24/springboot/shop/service/ShopService.java`](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/service/ShopService.java) (Store ordering), [`src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java`](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java) (Seat reservations), [`src/main/java/com/ceos24/springboot/theater/domain/Theater.java`](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/theater/domain/Theater.java) (Theaters), [`src/main/java/com/ceos24/springboot/user/domain/User.java`](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/user/domain/User.java) (User accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_user[("User accounts<br/>[User.java]")]
  node_auth["Signup and login<br/>[SignupService.java]"]
  node_security["JWT security"]
end

subgraph group_catalog["Movie and theater catalog"]
  node_movie[("Movies<br/>[Movie.java]")]
  node_theater[("Theaters<br/>[Theater.java]")]
  node_screening["Screenings and seats"]
end

subgraph group_booking["Reservations and payments"]
  node_reservation["Seat reservations"]
  node_reservation_store[("Reservation records")]
  node_reservation_expiry["Reservation expiry"]
  node_payment["Payment operations"]
  node_payment_store[("Payment records")]
  node_toss["Toss gateway"]
end

subgraph group_concessions["Store orders"]
  node_shop["Store ordering<br/>[ShopService.java]"]
  node_inventory[("Store inventory")]
  node_order[("Store orders<br/>[StoreOrder.java]")]
  node_order_lifecycle["Order lifecycle"]
end

subgraph group_engagement["Favorites"]
  node_likes["Movie likes"]
  node_favorites["Theater favorites"]
end

node_customer(("Customer"))

node_customer -.->|"signs up or logs in"| node_auth
node_auth -->|"creates account"| node_user
node_customer -.->|"browses"| node_movie
node_customer -.->|"browses"| node_theater
node_movie -->|"has screenings"| node_screening
node_theater -->|"hosts screens"| node_screening
node_customer -.->|"selects seats"| node_reservation
node_reservation -->|"reserves seats for"| node_screening
node_reservation -->|"loads customer"| node_user
node_reservation -->|"persists booking"| node_reservation_store
node_reservation_expiry -->|"releases expired holds"| node_reservation_store
node_customer -.->|"pays"| node_payment
node_payment -.->|"stores payment"| node_payment_store
node_payment -.->|"requests gateway operation"| node_toss
node_customer -.->|"orders concessions"| node_shop
node_shop -->|"loads customer"| node_user
node_shop -->|"loads theater"| node_theater
node_shop -->|"checks stock"| node_inventory
node_shop -->|"creates order"| node_order
node_shop -->|"delegates cancellation"| node_order_lifecycle
node_order_lifecycle -->|"restores stock"| node_inventory
node_order_lifecycle -->|"closes pending payment"| node_payment_store
node_customer -.->|"likes movies"| node_likes
node_likes -->|"targets movie"| node_movie
node_customer -.->|"favorites theater"| node_favorites
node_favorites -->|"targets theater"| node_theater
node_favorites -->|"loads customer"| node_user

click node_user "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/user/domain/User.java"
click node_auth "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/auth/service/SignupService.java"
click node_security "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/global/config/SecurityConfig.java"
click node_movie "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/movie/domain/Movie.java"
click node_theater "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/theater/domain/Theater.java"
click node_screening "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/theater/service/ScreeningService.java"
click node_reservation "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java"
click node_reservation_store "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/repository/ReservationRepository.java"
click node_reservation_expiry "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/service/ReservationExpirationService.java"
click node_payment "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/service/PaymentService.java"
click node_payment_store "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/repository/PaymentRepository.java"
click node_toss "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/toss/TossPaymentClient.java"
click node_shop "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/service/ShopService.java"
click node_inventory "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/domain/StoreInventory.java"
click node_order "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/domain/StoreOrder.java"
click node_order_lifecycle "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/service/StoreOrderLifecycleService.java"
click node_likes "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/favorite/service/MovieLikeService.java"
click node_favorites "https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/favorite/service/TheaterFavoriteService.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_user,node_auth,node_security toneBlue
class node_movie,node_theater,node_screening toneAmber
class node_reservation,node_reservation_store,node_reservation_expiry,node_payment,node_payment_store,node_toss toneMint
class node_shop,node_inventory,node_order,node_order_lifecycle toneRose
class node_likes,node_favorites,node_customer toneIndigo
```

## Components

### Identity and access

- [User accounts](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/user/domain/User.java): `src/main/java/com/ceos24/springboot/user/domain/User.java`
- [Signup and login](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/auth/service/SignupService.java): `src/main/java/com/ceos24/springboot/auth/service/SignupService.java`
- [JWT security](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/global/config/SecurityConfig.java): `src/main/java/com/ceos24/springboot/global/config/SecurityConfig.java`

### Movie and theater catalog

- [Movies](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/movie/domain/Movie.java): `src/main/java/com/ceos24/springboot/movie/domain/Movie.java`
- [Theaters](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/theater/domain/Theater.java): `src/main/java/com/ceos24/springboot/theater/domain/Theater.java`
- [Screenings and seats](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/theater/service/ScreeningService.java): `src/main/java/com/ceos24/springboot/theater/service/ScreeningService.java`

### Reservations and payments

- [Seat reservations](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java): `src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java`
- [Reservation records](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/repository/ReservationRepository.java): `src/main/java/com/ceos24/springboot/reservation/repository/ReservationRepository.java`
- [Reservation expiry](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/reservation/service/ReservationExpirationService.java): `src/main/java/com/ceos24/springboot/reservation/service/ReservationExpirationService.java`
- [Payment operations](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/service/PaymentService.java): `src/main/java/com/ceos24/springboot/payment/service/PaymentService.java`
- [Payment records](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/repository/PaymentRepository.java): `src/main/java/com/ceos24/springboot/payment/repository/PaymentRepository.java`
- [Toss gateway](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/payment/toss/TossPaymentClient.java): `src/main/java/com/ceos24/springboot/payment/toss/TossPaymentClient.java`

### Store orders

- [Store ordering](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/service/ShopService.java): `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`
- [Store inventory](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/domain/StoreInventory.java): `src/main/java/com/ceos24/springboot/shop/domain/StoreInventory.java`
- [Store orders](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/domain/StoreOrder.java): `src/main/java/com/ceos24/springboot/shop/domain/StoreOrder.java`
- [Order lifecycle](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/shop/service/StoreOrderLifecycleService.java): `src/main/java/com/ceos24/springboot/shop/service/StoreOrderLifecycleService.java`

### Favorites

- [Movie likes](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/favorite/service/MovieLikeService.java): `src/main/java/com/ceos24/springboot/favorite/service/MovieLikeService.java`
- [Theater favorites](https://github.com/uoahns23/spring-cgv-24th/blob/master/src/main/java/com/ceos24/springboot/favorite/service/TheaterFavoriteService.java): `src/main/java/com/ceos24/springboot/favorite/service/TheaterFavoriteService.java`

### Other components

- **Customer**

## Connections

- Customer → Signup and login: signs up or logs in
- Signup and login → User accounts: creates account (evidence: `src/main/java/com/ceos24/springboot/auth/service/SignupService.java`)
- Customer → Movies: browses
- Customer → Theaters: browses
- Movies → Screenings and seats: has screenings (evidence: `README.md`)
- Theaters → Screenings and seats: hosts screens (evidence: `README.md`)
- Customer → Seat reservations: selects seats
- Seat reservations → Screenings and seats: reserves seats for (evidence: `src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java`)
- Seat reservations → User accounts: loads customer (evidence: `src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java`)
- Seat reservations → Reservation records: persists booking (evidence: `src/main/java/com/ceos24/springboot/reservation/service/ReservationService.java`)
- Reservation expiry → Reservation records: releases expired holds (evidence: `src/main/java/com/ceos24/springboot/reservation/service/ReservationExpirationService.java`)
- Customer → Payment operations: pays
- Payment operations → Payment records: stores payment
- Payment operations → Toss gateway: requests gateway operation
- Customer → Store ordering: orders concessions
- Store ordering → User accounts: loads customer (evidence: `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`)
- Store ordering → Theaters: loads theater (evidence: `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`)
- Store ordering → Store inventory: checks stock (evidence: `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`)
- Store ordering → Store orders: creates order (evidence: `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`)
- Store ordering → Order lifecycle: delegates cancellation (evidence: `src/main/java/com/ceos24/springboot/shop/service/ShopService.java`)
- Order lifecycle → Store inventory: restores stock (evidence: `src/main/java/com/ceos24/springboot/shop/service/StoreOrderLifecycleService.java`)
- Order lifecycle → Payment records: closes pending payment (evidence: `src/main/java/com/ceos24/springboot/shop/service/StoreOrderLifecycleService.java`)
- Customer → Movie likes: likes movies
- Movie likes → Movies: targets movie (evidence: `README.md`)
- Customer → Theater favorites: favorites theater
- Theater favorites → Theaters: targets theater (evidence: `src/main/java/com/ceos24/springboot/favorite/service/TheaterFavoriteService.java`)
- Theater favorites → User accounts: loads customer (evidence: `src/main/java/com/ceos24/springboot/favorite/service/TheaterFavoriteService.java`)
