How lokesh701449/hotelbooking_site works
AuraStay is a hotel-reservation application with a React frontend and Spring Boot REST backend. Customers browse hotels and room availability, apply promotions, submit a reservation with a simulated payment method, and can later review or cancel bookings; administrators manage hotels, rooms, promotions, and reservations. The graph groups frontend pages and API clients with backend domain services, security, and persistence. Backend implementation details were not sampled, so backend relationships beyond documented API and architecture statements are omitted or marked unverified.
Main entry points: App.jsx App routing · controller REST controllers · api.js HTTP API client · hotelService.js Hotel and room clients
Components 25
Web experience
- App routing
frontend/src/App.jsx - Authentication UI
frontend/src/pages/Register.jsx - Hotel browsing
frontend/src/pages/Hotels.jsx - Hotel details
frontend/src/pages/HotelDetails.jsx - Reservation checkout
frontend/src/pages/Checkout.jsx - Booking history
frontend/src/pages/BookingsHistory.jsx - Promotions view
frontend/src/pages/Promotions.jsx - Admin dashboard
frontend/src/pages/AdminDashboard.jsx - Auth context
frontend/src/context/AuthContext.jsx - HTTP API client
frontend/src/services/api.js - Hotel and room clients
frontend/src/services/hotelService.js - Booking client
frontend/src/services/bookingService.js - Promotion client
frontend/src/services/promotionService.js - Auth client
frontend/src/services/authService.js
API and domain
- REST controllers
src/main/java/com/example/DemoHotelBooking/controller - Booking and payment
src/main/java/com/example/DemoHotelBooking/service/BookingService.java - Hotel and room services
src/main/java/com/example/DemoHotelBooking/service/HotelService.java - Promotion service
src/main/java/com/example/DemoHotelBooking/service/PromotionService.java
Identity and security
- Auth service
src/main/java/com/example/DemoHotelBooking/service/AuthService.java - JWT security
src/main/java/com/example/DemoHotelBooking/security/WebSecurityConfig.java
Persistence and integrations
- H2 database
- Booking domain records
src/main/java/com/example/DemoHotelBooking/entity/Booking.java - Confirmation email
src/main/java/com/example/DemoHotelBooking/service/EmailService.java
Other components
- Customer
- Administrator
Connections 35
- Customer → App routing: uses
frontend/src/App.jsx - Administrator → App routing: uses
frontend/src/App.jsx - App routing → Authentication UI: routes
frontend/src/App.jsx - App routing → Hotel browsing: routes
frontend/src/App.jsx - App routing → Hotel details: routes
frontend/src/App.jsx - App routing → Reservation checkout: routes
frontend/src/App.jsx - App routing → Booking history: routes
frontend/src/App.jsx - App routing → Promotions view: routes
frontend/src/App.jsx - App routing → Admin dashboard: routes
frontend/src/App.jsx - App routing → Auth context: provides auth
frontend/src/App.jsx - Auth context → Auth client: calls
frontend/src/context/AuthContext.jsx - Auth client → HTTP API client: sends requests
frontend/src/services/authService.js - Hotel browsing → Hotel and room clients: loads hotels
frontend/src/pages/Hotels.jsx - Hotel details → Hotel and room clients: loads details
frontend/src/pages/HotelDetails.jsx - Reservation checkout → Booking client: submits booking
frontend/src/pages/Checkout.jsx - Reservation checkout → Promotion client: checks coupon
frontend/src/pages/Checkout.jsx - Reservation checkout → Hotel and room clients: loads room
frontend/src/pages/Checkout.jsx - Booking history → Booking client: loads bookings
frontend/src/pages/BookingsHistory.jsx - Admin dashboard → Booking client: loads records
frontend/src/pages/AdminDashboard.jsx - Admin dashboard → Hotel and room clients: manages inventory
frontend/src/pages/AdminDashboard.jsx - Admin dashboard → Promotion client: creates offers
frontend/src/pages/AdminDashboard.jsx - Hotel and room clients → HTTP API client: sends requests
frontend/src/services/hotelService.js - Booking client → HTTP API client: sends requests
frontend/src/services/bookingService.js - Promotion client → HTTP API client: sends requests
frontend/src/services/promotionService.js - HTTP API client → REST controllers: calls REST API
README.md - REST controllers → Booking and payment: delegates
- REST controllers → Hotel and room services: delegates
- REST controllers → Promotion service: delegates
- REST controllers → Auth service: delegates
- Auth service → JWT security: uses JWT
- Booking and payment → Booking domain records: manages
- Hotel and room services → H2 database: persists inventory
- Booking and payment → H2 database: persists bookings
- Promotion service → H2 database: persists offers
- Booking and payment → Confirmation email: dispatches confirmation