How roydhirj19/project works
Hotel Booking App serves guests browsing properties and making date-based reservations, while owners manage listings and confirm bookings. The main flow runs from listing routes and controllers through listing data and views, then into booking validation, availability checks, persistence, and reservation views. Reviews and account access are separate user-facing branches; listing maps provide a location view. The README documents OAuth, contact details, and other capabilities not fully represented in the sampled source, so those subsystem links are shown only where supported.
Main entry points: app.js Express application · booking.js Booking controller · listing.js Listing controller · reviews.js Review controller
Components 20
Web entry and views
- Express application
app.js - Listing routes
routes/listing.js - Listing pages
views/listing - Booking routes
routes/booking.js - Booking pages
views/booking - Account routes
routes/user.js - Account pages
views/users
Property listings
- Listing controller
controller/listing.js - Listing model
models/listing.js - Map client
public/js/map.js
Reservations
- Booking controller
controller/booking.js - Booking model
models/booking.js
Accounts and reviews
- Review routes
routes/review.js - Review controller
controller/reviews.js - Review model
models/review.js - User model
models/user.js
Persistence and location
- Session store
app.js - MongoDB
- MapTiler
Other components
- Guest or owner
Connections 23
- Guest or owner → Express application: sends requests
- Express application → Listing routes: mounts routes
- Express application → Booking routes: mounts routes
- Express application → Account routes: mounts routes
- Express application → Review routes: mounts routes
- Listing routes → Listing controller: dispatches
- Listing controller → Listing model: reads and writes
- Listing controller → Listing pages: renders
- Listing pages → Map client: initializes map
- Map client → MapTiler: renders with
- Booking routes → Booking controller: dispatches
- Booking controller → Listing model: reads listing
- Booking controller → Booking model: checks and saves
- Booking controller → Booking pages: renders
- Review routes → Review controller: dispatches
- Review controller → Listing model: updates listing
- Review controller → Review model: saves and deletes
- Account routes → Account pages: serves account pages
- Express application → User model: authenticates users
- Express application → Session store: stores sessions
- Express application → MongoDB: connects
- Session store → MongoDB: persists sessions
- Booking controller → User model: populates customer