How trancaotrong456/web-specialization-web-project-for-airline-ticket-booking-service- works
This is an airline ticket-booking web application: passengers discover flights and manage accounts, while administrators manage users, roles, and flight inventory. The central booking lifecycle is exposed through the API and spans flight search, seat-holding bookings, payment processing, and ticket/email handling; the frontend tree chiefly documents authentication, flight discovery, profiles, and administration. The README only documents a Docker demo and CI/CD, not additional runtime product features. Several subsystems are represented from the tree or SOURCE INDEX without source excerpts, so those links are omitted where their call relationships cannot be verified.
Main entry points: AppRouter.jsx App routes · booking.service.js Booking and holds · models/index.js Sequelize models · routes/index.js API route mounts
Components 33
Web client
- App routes
frontend/src/app/AppRouter.jsx - Session provider
frontend/src/app/AuthProvider.jsx - Sign-in and signup
frontend/src/features/auth/LoginPage.jsx - Flight discovery
frontend/src/features/flights/HomePage.jsx - Flight API client
frontend/src/features/flights/flightDiscoveryApi.js - Profile and security
frontend/src/features/profile - User and role admin
frontend/src/features/users - HTTP client
frontend/src/lib/apiClient.js - Frontend auth API
frontend/src/features/auth/authApi.js
API and access
- API application
app.js - API route mounts
routes/index.js - Authentication routes
routes/auth.route.js - Authentication controller
controllers/auth.controller.js - Identity and sessions
services/auth.service.js
Booking lifecycle
- Booking routes
routes/booking.route.js - Booking controller
controllers/booking.controller.js - Booking and holds
services/booking.service.js - Payment controller
controllers/payment.controller.js - Payment processing
services/payment.service.js - Ticket delivery
services/ticket.service.js - Email service
services/email.service.js - Booking expiry job
jobs/expireBookings.job.js
Flight catalog
- Flight inventory and search
services/flight.service.js - Catalog routes
routes/flight.route.js - Catalog controllers
controllers/flight.controller.js
Data and events
- Sequelize models
models/index.js - Live flight events
sockets/index.js
Other components
- Passenger
- Administrator
- Browser client
- Payment provider
- Relational database
- Email delivery
Connections 39
- Passenger → Browser client: uses
- Administrator → Browser client: uses
- Browser client → App routes: opens
frontend/src/app/AppRouter.jsx - App routes → Sign-in and signup: routes to
frontend/src/app/AppRouter.jsx - App routes → Flight discovery: routes to
frontend/src/app/AppRouter.jsx - App routes → Profile and security: routes to
frontend/src/app/AppRouter.jsx - App routes → User and role admin: routes to
frontend/src/app/AppRouter.jsx - Sign-in and signup → Session provider: uses session
frontend/src/features/auth/LoginPage.jsx - Flight discovery → Flight API client: requests discovery
frontend/src/features/flights/HomePage.jsx - Flight discovery → HTTP client: uses
- Session provider → HTTP client: creates
frontend/src/app/AuthProvider.jsx - Session provider → Frontend auth API: calls
frontend/src/app/AuthProvider.jsx - Frontend auth API → Authentication routes: sends requests
- HTTP client → API application: sends requests
- API application → API route mounts: mounts
app.js - API route mounts → Authentication routes: registers
routes/index.js - Authentication routes → Authentication controller: routes to
routes/auth.route.js - Authentication controller → Identity and sessions: calls
controllers/auth.controller.js - Identity and sessions → Sequelize models: reads and writes
services/auth.service.js - API route mounts → Booking routes: registers
routes/index.js - Booking routes → Booking controller: routes to
- Booking controller → Booking and holds: calls
controllers/booking.controller.js - Booking and holds → Sequelize models: reads and writes
services/booking.service.js - Booking and holds → Flight inventory and search: checks seat warnings
services/booking.service.js - Booking and holds → Live flight events: emits seat updates
services/booking.service.js - Payment controller → Payment processing: calls
controllers/payment.controller.js - Payment processing → Sequelize models: reads and writes
services/payment.service.js - Payment processing → Payment provider: creates and verifies payments
- Payment processing → Email service: requests confirmation
services/payment.service.js - Email service → Ticket delivery: uses
services/email.service.js - Email service → Email delivery: sends email
- API route mounts → Catalog routes: registers
routes/index.js - Catalog routes → Catalog controllers: routes to
- Catalog controllers → Flight inventory and search: calls
controllers/flight.controller.js - Flight inventory and search → Sequelize models: reads and writes
services/flight.service.js - Flight inventory and search → Live flight events: broadcasts updates
services/flight.service.js - Booking expiry job → Booking and holds: expires holds
jobs/expireBookings.job.js - Sequelize models → Relational database: persists records
- Live flight events → Browser client: streams events