# thanhdoan26/datn_wd21_su26 architecture

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

- Interactive diagram: https://gitdiagram.com/thanhdoan26/datn_wd21_su26
- Repository: https://github.com/thanhdoan26/datn_wd21_su26

## Overview

This Laravel application is a cinema ticketing and venue-management platform. Customers discover movies and showtimes, select seats, place bookings, pay, and access tickets; staff can also sell walk-in tickets. BookingService is a central booking layer for seat handling and payment completion. The tree also shows reviews, AI chat, content, and role-specific administration. The README is the generic Laravel framework README, so product capabilities are inferred from the repository tree and source index; unsampled connections are not asserted.

Main entry points: [`app/Services/BookingService.php`](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/BookingService.php) (Booking Service), [`app/Http/Controllers/BookingController.php`](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/BookingController.php) (Online Booking), [`routes/web.php`](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/web.php) (Web Routes), [`app/Http/Controllers/MovieController.php`](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/MovieController.php) (Movie Catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Movie Discovery"]
  node_movies["Movie Catalog"]
  node_search["Movie Search"]
  node_showtimes["Showtime Listings<br/>[Showtime.php]"]
  node_cinemas["Cinema Listings"]
end

subgraph group_ticketing["Booking and Tickets"]
  node_booking["Online Booking"]
  node_seatmap["Seat Mapping<br/>[SeatMapService.php]"]
  node_holds["Seat Holds"]
  node_bookingservice["Booking Service<br/>[BookingService.php]"]
  node_bookings[("Booking Records<br/>[Booking.php]")]
  node_checkout["Checkout"]
  node_payments["Payment Gateways"]
  node_vnpay["VNPay Gateway"]
  node_tickets["Ticket Delivery"]
  node_walkin["Walk-in Sales"]
end

subgraph group_operations["Cinema Operations"]
  node_management["Venue Management<br/>[manager.php]"]
  node_admin["Administration<br/>[admin.php]"]
end

subgraph group_engagement["Customer Features"]
  node_reviews["Reviews"]
  node_chat["AI Chatbot"]
  node_posts["News and Posts<br/>[PostController.php]"]
end

subgraph group_platform["Application Core"]
  node_web["Web Routes<br/>[web.php]"]
  node_users[("User Accounts<br/>[User.php]")]
end

node_customer(("Customer"))
node_staff(("Cinema Staff"))

node_customer -.->|"browses"| node_web
node_staff -.->|"sells tickets"| node_walkin
node_web -.->|"routes requests"| node_movies
node_web -.->|"routes requests"| node_booking
node_web -.->|"routes requests"| node_checkout
node_movies -.->|"searches via"| node_search
node_movies -.->|"lists"| node_showtimes
node_cinemas -.->|"shows"| node_showtimes
node_booking -.->|"loads map"| node_seatmap
node_booking -.->|"requests holds"| node_holds
node_booking -.->|"delegates booking"| node_bookingservice
node_bookingservice -->|"creates booking"| node_bookings
node_checkout -.->|"payment routing"| node_payments
node_checkout -.->|"payment routing"| node_vnpay
node_payments -.->|"completes payment"| node_bookingservice
node_vnpay -.->|"completes payment"| node_bookingservice
node_bookingservice -.->|"ticket confirmation"| node_tickets
node_walkin -->|"creates booking"| node_bookingservice
node_management -.->|"manages listings"| node_showtimes
node_admin -.->|"administers bookings"| node_bookings
node_customer -.->|"writes reviews"| node_reviews
node_reviews -->|"checks eligibility"| node_bookings
node_reviews -.->|"records author"| node_users
node_customer -.->|"asks questions"| node_chat
node_customer -.->|"reads posts"| node_posts
node_customer -.->|"uses account"| node_users

click node_web "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/web.php"
click node_movies "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/MovieController.php"
click node_search "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/MovieSearchService.php"
click node_showtimes "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/Showtime.php"
click node_cinemas "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/CinemaController.php"
click node_booking "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/BookingController.php"
click node_seatmap "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/SeatMapService.php"
click node_holds "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/Api/BookingHoldController.php"
click node_bookingservice "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/BookingService.php"
click node_bookings "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/Booking.php"
click node_checkout "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/CheckoutController.php"
click node_payments "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/StripeController.php"
click node_vnpay "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/VnPayController.php"
click node_tickets "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Mail/TicketConfirmationMail.php"
click node_walkin "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/Staff/WalkInBookingController.php"
click node_management "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/manager.php"
click node_admin "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/admin.php"
click node_reviews "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/ReviewController.php"
click node_chat "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/AI/KnowledgeService.php"
click node_posts "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/PostController.php"
click node_users "https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/User.php"

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_movies,node_search,node_showtimes,node_cinemas toneBlue
class node_booking,node_seatmap,node_holds,node_bookingservice,node_bookings,node_checkout,node_payments,node_vnpay,node_tickets,node_walkin toneAmber
class node_management,node_admin toneMint
class node_reviews,node_chat,node_posts toneRose
class node_web,node_users,node_customer,node_staff toneIndigo
```

## Components

### Movie Discovery

- [Movie Catalog](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/MovieController.php): `app/Http/Controllers/MovieController.php`
- [Movie Search](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/MovieSearchService.php): `app/Services/MovieSearchService.php`
- [Showtime Listings](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/Showtime.php): `app/Models/Showtime.php`
- [Cinema Listings](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/CinemaController.php): `app/Http/Controllers/CinemaController.php`

### Booking and Tickets

- [Online Booking](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/BookingController.php): `app/Http/Controllers/BookingController.php`
- [Seat Mapping](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/SeatMapService.php): `app/Services/SeatMapService.php`
- [Seat Holds](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/Api/BookingHoldController.php): `app/Http/Controllers/Api/BookingHoldController.php`
- [Booking Service](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/BookingService.php): `app/Services/BookingService.php`
- [Booking Records](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/Booking.php): `app/Models/Booking.php`
- [Checkout](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/CheckoutController.php): `app/Http/Controllers/CheckoutController.php`
- [Payment Gateways](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/StripeController.php): `app/Http/Controllers/StripeController.php`
- [VNPay Gateway](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/VnPayController.php): `app/Http/Controllers/VnPayController.php`
- [Ticket Delivery](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Mail/TicketConfirmationMail.php): `app/Mail/TicketConfirmationMail.php`
- [Walk-in Sales](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/Staff/WalkInBookingController.php): `app/Http/Controllers/Staff/WalkInBookingController.php`

### Cinema Operations

- [Venue Management](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/manager.php): `routes/manager.php`
- [Administration](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/admin.php): `routes/admin.php`

### Customer Features

- [Reviews](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/ReviewController.php): `app/Http/Controllers/ReviewController.php`
- [AI Chatbot](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Services/AI/KnowledgeService.php): `app/Services/AI/KnowledgeService.php`
- [News and Posts](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Http/Controllers/PostController.php): `app/Http/Controllers/PostController.php`

### Application Core

- [Web Routes](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/routes/web.php): `routes/web.php`
- [User Accounts](https://github.com/thanhdoan26/datn_wd21_su26/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Customer**
- **Cinema Staff**

## Connections

- Customer → Web Routes: browses
- Cinema Staff → Walk-in Sales: sells tickets (evidence: `app/Http/Controllers/Staff/WalkInBookingController.php`)
- Web Routes → Movie Catalog: routes requests
- Web Routes → Online Booking: routes requests
- Web Routes → Checkout: routes requests
- Movie Catalog → Movie Search: searches via
- Movie Catalog → Showtime Listings: lists
- Cinema Listings → Showtime Listings: shows
- Online Booking → Seat Mapping: loads map
- Online Booking → Seat Holds: requests holds
- Online Booking → Booking Service: delegates booking
- Booking Service → Booking Records: creates booking (evidence: `app/Services/BookingService.php`)
- Checkout → Payment Gateways: payment routing
- Checkout → VNPay Gateway: payment routing
- Payment Gateways → Booking Service: completes payment
- VNPay Gateway → Booking Service: completes payment
- Booking Service → Ticket Delivery: ticket confirmation
- Walk-in Sales → Booking Service: creates booking (evidence: `app/Http/Controllers/Staff/WalkInBookingController.php`)
- Venue Management → Showtime Listings: manages listings (evidence: `routes/manager.php`)
- Administration → Booking Records: administers bookings
- Customer → Reviews: writes reviews
- Reviews → Booking Records: checks eligibility (evidence: `app/Http/Controllers/ReviewController.php`)
- Reviews → User Accounts: records author
- Customer → AI Chatbot: asks questions
- Customer → News and Posts: reads posts
- Customer → User Accounts: uses account
