How shanmugamsanthu/airbnb-clone works
This is a full-stack Airbnb-style listing and booking application. Users browse listings, view details, authenticate, create or manage listings and reviews, and book available date ranges; customers and listing owners can review and cancel bookings. The Vue router connects the main screens, while Express routes dispatch API-style requests to controllers, which validate and operate on MongoDB models. The README documents image uploads, authorization, and cancellation rules. Some view-to-backend wiring is dynamic or not shown, so only documented frontend/API communication is included; unsampled subsystem links are omitted where their callers are not evidenced.
Main entry points: router.js Screen router · server.js HTTP server · listingControl.js Listing operations · bookingControl.js Booking operations
Components 27
Vue application
- Screen router
router.js - Listing screens
views/listings.vue - Listing detail
views/displayById.vue - Listing forms
views/createForm.vue - Edit listing
views/editPage.vue - Review form
views/reviewForm.vue - Account screens
views/loginpage.vue - Booking screens
views/myBookings.vue - Manage bookings
views/manageBookings.vue - UX validation
ClientSchema/uxValidation.js
Express API
- HTTP server
server.js - Listing routes
routes/listingRoutes.js - Review routes
routes/reviewRoutes.js - Booking routes
routes/bookingRoute.js - Account routes
routes/userAccountRoute.js - Auth and validation
customMiddlewares.js
Listing domain
- Listing operations
controller/listingControl.js - Review operations
controller/reviewControl.js - Account operations
controller/userControl.js
Booking domain
- Booking operations
controller/bookingControl.js - Date calculations
utils/calculateDays.js
MongoDB and media
- Listing records
config_DB/models/listingsSchema.js - Review records
config_DB/models/listingReviewSchema.js - Booking records
config_DB/models/bookingSchema.js - User accounts
config_DB/models/userAccountSchema.js - Cloudinary images
config_DB/cloudinary.js
Other components
- User
Connections 32
- User → Screen router: navigates
router.js - Screen router → Listing screens: routes to
router.js - Screen router → Listing detail: routes to
router.js - Screen router → Listing forms: routes to
router.js - Screen router → Edit listing: routes to
router.js - Screen router → Review form: routes to
router.js - Screen router → Account screens: routes to
router.js - Screen router → Booking screens: routes to
router.js - Screen router → Manage bookings: routes to
router.js - Listing forms → UX validation: validates with
views/createForm.vue - Edit listing → UX validation: validates with
views/editPage.vue - Review form → UX validation: validates with
views/reviewForm.vue - Account screens → UX validation: validates with
views/loginpage.vue - Screen router → HTTP server: fetches API
- HTTP server → Listing routes: mounts
server.js - HTTP server → Review routes: mounts
server.js - HTTP server → Booking routes: mounts
server.js - HTTP server → Account routes: mounts
server.js - Listing routes → Auth and validation: guards and validates
routes/listingRoutes.js - Review routes → Auth and validation: guards and validates
routes/reviewRoutes.js - Listing routes → Listing operations: dispatches to
routes/listingRoutes.js - Review routes → Review operations: dispatches to
routes/reviewRoutes.js - Booking routes → Booking operations: dispatches to
routes/bookingRoute.js - Account routes → Account operations: dispatches to
routes/userAccountRoute.js - Listing operations → Listing records: reads and writes
controller/listingControl.js - Listing operations → Review records: cleans up reviews
controller/listingControl.js - Listing operations → Cloudinary images: manages images
controller/listingControl.js - Review operations → Review records: reads and writes
controller/reviewControl.js - Account operations → User accounts: reads and writes
controller/userControl.js - Booking operations → Booking records: reads and writes
controller/bookingControl.js - Booking operations → Listing records: checks listing
controller/bookingControl.js - Booking operations → Date calculations: calculates duration
controller/bookingControl.js