How phuc1810/ota-tour-booking-system works
This is an API-first travel OTA with customer B2C booking and B2B bespoke-tour requests, plus staff operations and administrator oversight. The customer path runs from tour discovery through booking, payment confirmation, order management and review; staff manage tours, orders, calendars, promotions, content and business requests. Laravel controllers delegate to services and persist domain records; React provides the customer and management portals. The README documents concurrency-safe seat holds, SePay webhook reconciliation and scheduled cleanup/recurring-tour generation. Some subsystem links rely on README documentation because their implementation excerpts were not provided.
Main entry points: api.php REST API routes · DonDatTour.php MySQL domain records · AppRoutes.jsx Portal routing · BookingService.php Booking and orders
Components 21
React portals
- Portal routing
Frontend/src/routes/AppRoutes.jsx - Customer portal
Frontend/src/pages/customer - Tour discovery
Frontend/src/pages/public - Staff and admin portal
Frontend/src/pages/staff - API clients
Frontend/src/api
Laravel API
- REST API routes
Backend/routes/api.php - Authentication
Backend/app/Http/Controllers/Api/AuthController.php
Tour commerce
- Booking and orders
Backend/app/Services/BookingService.php - Tour catalog
Backend/app/Services/TourService.php - Payments and refunds
Backend/app/Services/PaymentService.php - B2B requests
Backend/app/Services/BusinessRequestService.php - Customer reviews
Backend/app/Services/ReviewService.php
Operations and governance
- Staff operations
Backend/app/Services/StaffOrderService.php - Promotions and news
Backend/app/Services/StaffPromotionService.php - Reports and dashboards
Backend/app/Services/StaffDashboardService.php - Administration
Backend/app/Services/AdminAccountService.php - Scheduled order and tour jobs
Backend/app/Console/Commands/CancelUnpaidOrdersCommand.php
Persistence and integrations
- MySQL domain records
Backend/app/Models/DonDatTour.php
Other components
- Traveler
- Staff and admin
- SePay
Connections 34
- Traveler → Portal routing: opens portal
Frontend/src/routes/AppRoutes.jsx - Staff and admin → Portal routing: opens portal
Frontend/src/routes/AppRoutes.jsx - Portal routing → Tour discovery: routes to
Frontend/src/routes/AppRoutes.jsx - Portal routing → Customer portal: routes to
Frontend/src/routes/AppRoutes.jsx - Portal routing → Staff and admin portal: routes to
Frontend/src/routes/AppRoutes.jsx - Customer portal → API clients: requests data
Frontend/src/pages/customer/ReviewBusinessRequestPage.jsx - Tour discovery → API clients: requests data
- Staff and admin portal → API clients: requests data
- API clients → REST API routes: calls REST API
- REST API routes → Authentication: routes auth
Backend/routes/api.php - REST API routes → Booking and orders: routes booking
Backend/routes/api.php - REST API routes → Tour catalog: routes tours
Backend/routes/api.php - REST API routes → Payments and refunds: routes payments
Backend/routes/api.php - REST API routes → B2B requests: routes requests
Backend/routes/api.php - REST API routes → Customer reviews: routes reviews
Backend/routes/api.php - REST API routes → Staff operations: routes operations
Backend/routes/api.php - REST API routes → Promotions and news: routes content
Backend/routes/api.php - REST API routes → Reports and dashboards: routes reports
Backend/routes/api.php - REST API routes → Administration: routes administration
Backend/routes/api.php - Traveler → Tour catalog: browses tours
- Tour catalog → Booking and orders: selects tour
- Booking and orders → Payments and refunds: initiates payment
- SePay → Payments and refunds: sends webhook
- Booking and orders → MySQL domain records: writes orders
- Payments and refunds → MySQL domain records: updates payment state
- B2B requests → MySQL domain records: stores requests
- Customer reviews → MySQL domain records: stores reviews
Backend/app/Services/ReviewService.php - Customer reviews → MySQL domain records: reads completed orders
Backend/app/Services/ReviewService.php - Staff operations → MySQL domain records: manages orders
- Promotions and news → MySQL domain records: manages content
- Reports and dashboards → MySQL domain records: aggregates operations
- Administration → MySQL domain records: manages accounts
- Scheduled order and tour jobs → MySQL domain records: releases expired seats
- Scheduled order and tour jobs → Tour catalog: clones recurring tours