How priyanshu655/hotel-booking-site works
Planora is a hotel-booking and travel-planning application. Users browse hotels, view details, book stays, and pay; hotel sellers can add listings and review analytics. A separate trip-planning workflow generates and saves itineraries. The frontend exposes these flows as pages and the Express backend routes requests to controllers and MongoDB models. The README gives no architectural detail, and several source excerpts are partial, so frontend-to-backend links are shown as unverified rather than asserted.
Main entry points: App.jsx Page router · hotelRoutes.js Hotel routes · server.js Express server · tripController.js Itinerary generation and trips
Components 31
Web experience
- Page router
frontned/src/App.jsx - Hotel discovery
frontned/src/pages/HomePage.jsx - Hotel details
frontned/src/pages/HotelDetail.jsx - My bookings
frontned/src/pages/MyBookings.jsx - Sign in
frontned/src/pages/AuthPage.jsx - Add hotel
frontned/src/pages/AddHotel.jsx - Seller dashboard
frontned/src/pages/SellerDashboard.jsx - Payment demo
frontned/src/pages/PaymentDemo.jsx - Trip planner
frontned/src/pages/TripPlanner.jsx
Backend API
- Express server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Authentication
backend/controllers/authController.js - User records
backend/models/User.js
Stays and payments
- Hotel routes
backend/routes/hotelRoutes.js - Hotel catalog and seller ops
backend/controllers/hotelController.js - Hotel records
backend/models/Hotel.js - Booking routes
backend/routes/bookingRoutes.js - Booking operations
backend/controllers/bookingController.js - Booking records
backend/models/Booking.js - Payment routes
backend/routes/paymentRoutes.js - Payment processing
backend/controllers/paymentController.js - Payment records
backend/models/Payment.js
Trip planning
- Trip routes
backend/routes/tripRoutes.js - Itinerary generation and trips
backend/controllers/tripController.js - Saved trips
backend/models/Trip.js - Place catalog
backend/data/placesDB.js
Other components
- Traveler
- Hotel seller
- Razorpay
- OpenStreetMap
- Bytez AI
Connections 42
- Page router → Hotel discovery: routes to
frontned/src/App.jsx - Page router → Hotel details: routes to
frontned/src/App.jsx - Page router → My bookings: routes to
frontned/src/App.jsx - Page router → Sign in: routes to
frontned/src/App.jsx - Page router → Add hotel: routes to
frontned/src/App.jsx - Page router → Seller dashboard: routes to
frontned/src/App.jsx - Page router → Payment demo: routes to
frontned/src/App.jsx - Page router → Trip planner: routes to
frontned/src/App.jsx - Traveler → Hotel discovery: browses
- Traveler → Sign in: signs in
- Traveler → Trip planner: plans trips
- Hotel seller → Add hotel: manages listings
- Hotel seller → Seller dashboard: reviews metrics
- Hotel discovery → Hotel routes: requests catalog
- Hotel details → Hotel routes: requests details
- My bookings → Booking routes: manages bookings
- Add hotel → Hotel routes: manages hotels
- Seller dashboard → Hotel routes: requests analytics
- Payment demo → Payment routes: requests payment
- Trip planner → Trip routes: requests itineraries
- Express server → Auth routes: mounts
backend/server.js - Express server → Hotel routes: mounts
backend/server.js - Express server → Booking routes: mounts
backend/server.js - Express server → Payment routes: mounts
backend/server.js - Express server → Trip routes: mounts
backend/server.js - Auth routes → Authentication: dispatches
backend/routes/authRoutes.js - Hotel routes → Hotel catalog and seller ops: dispatches
backend/routes/hotelRoutes.js - Booking routes → Booking operations: dispatches
backend/routes/bookingRoutes.js - Payment routes → Payment processing: dispatches
backend/routes/paymentRoutes.js - Trip routes → Itinerary generation and trips: dispatches
backend/routes/tripRoutes.js - Authentication → User records: reads and writes
backend/controllers/authController.js - Hotel catalog and seller ops → Hotel records: reads and writes
backend/controllers/hotelController.js - Hotel catalog and seller ops → Booking records: reads bookings
backend/controllers/hotelController.js - Booking operations → Booking records: reads and writes
backend/controllers/bookingController.js - Booking operations → Hotel records: reads hotels
backend/controllers/bookingController.js - Payment processing → Booking records: updates booking
backend/controllers/paymentController.js - Payment processing → Payment records: reads and writes
backend/controllers/paymentController.js - Payment processing → Razorpay: creates orders and refunds
backend/controllers/paymentController.js - Itinerary generation and trips → Saved trips: reads and writes
backend/controllers/tripController.js - Itinerary generation and trips → Place catalog: looks up places
backend/controllers/tripController.js - Itinerary generation and trips → OpenStreetMap: geocodes and fetches POIs
backend/controllers/tripController.js - Itinerary generation and trips → Bytez AI: enhances itinerary
backend/controllers/tripController.js