How bt2701/bus-ticket-booking-backend works
This is a Spring Boot REST backend for bus-ticket booking, serving customers, staff, and admins. The principal product workflow is interacting with the booking API; the tree also identifies distinct booking, payment, and notification capabilities, plus authentication and role management. The README documents JWT/Spring Security, social login, VNPay, MySQL, and email. Source excerpts were unavailable, so the graph avoids asserting controller-to-service calls or other internal wiring that the documentation does not establish.
Main entry points: VNPayService.java VNPay integration · EmailService.java Email service · Controller REST controllers · OAuth2LoginSuccessHandler.java Social login
Components 19
REST API
- REST controllers
src/main/java/com/example/demo/Controller
Booking Operations
- Bookings
src/main/java/com/example/demo/Controller/BookingCTL.java - Search trips
src/main/java/com/example/demo/Controller/SearchCTL.java - Schedules and routes
src/main/java/com/example/demo/Controller/ScheduleCTL.java - Bus and driver
src/main/java/com/example/demo/Controller/BusCTL.java
Identity and Access
- JWT security
src/main/java/com/example/demo/configurations/SecurityConfig.java - JWT filter
src/main/java/com/example/demo/filter/JwtTokenFilter.java - Social login
src/main/java/com/example/demo/configurations/OAuth2LoginSuccessHandler.java - Role access
src/main/java/com/example/demo/Controller/RoleCTL.java
Payments and Messaging
- Payments
src/main/java/com/example/demo/Controller/PaymentCTL.java - VNPay integration
src/main/java/com/example/demo/configurations/VNPayService.java - Customer notifications
src/main/java/com/example/demo/Controller/NotificationCTL.java - Email service
src/main/java/com/example/demo/Service/EmailService.java
Persistence
- Data repositories
src/main/java/com/example/demo/Repository - MySQL database
database/booking.sql
Other components
- API users
- Google, Facebook, GitHub
- VNPay
- Mail service
Connections 4
- API users → REST controllers: send API requests
- Google, Facebook, GitHub → Social login: social login
- VNPay integration → VNPay: payment integration
- Email service → Mail service: send email