How bhuvan0611/airbnb-clone-full-stack- works
This server-rendered rental marketplace lets visitors browse and search listings, inspect listing details and maps, and—after authentication—create or manage listings and reviews. Express routes own request dispatch and middleware authorization; controllers perform domain actions against Mongoose models and render EJS pages. Sessions persist in MongoDB, while listing creation uses image storage and geocoding integrations. The README also documents tax calculation, but the sampled source does not establish its implementation path. Edges reflect excerpts or README statements; unsampled template and integration wiring is left unconnected where evidence is unavailable.
Main entry points: app.js Express entry and rendering · listings.js Listing workflows · reviews.js Review workflows · middlewear.js Validation and access
Components 24
Web application
- Express entry and rendering
app.js - Validation and access
middlewear.js - Request schemas
schema.js - Async error wrapper
utils/wrapAsync.js
Listings and reviews
- Listing routes
routes/listing.js - Listing workflows
controllers/listings.js - Listing records
models/listing.js - Review routes
routes/review.js - Review workflows
controllers/reviews.js - Review records
models/review.js - Sample listing data
init/data.js
Identity and sessions
- Account routes
routes/user.js - Account workflows
controllers/users.js - User records
models/user.js - Session store
Presentation and maps
- Listing pages
views/listings - Account pages
views/users - Error page
views/error.ejs - Listing map
public/js/map.js - Price tax toggle
public/js/script.js
External services
- Image storage
cloudConfig.js - Mapbox geocoder
- MongoDB
Other components
- Visitor or user
Connections 31
- Visitor or user → Express entry and rendering: sends requests
app.js - Express entry and rendering → Listing routes: mounts routes
app.js - Express entry and rendering → Review routes: mounts routes
app.js - Express entry and rendering → Account routes: mounts routes
app.js - Express entry and rendering → Session store: persists sessions
app.js - Express entry and rendering → User records: configures Passport
app.js - Listing routes → Listing workflows: dispatches actions
routes/listing.js - Listing routes → Validation and access: checks access
routes/listing.js - Listing workflows → Listing records: reads and writes
controllers/listings.js - Listing workflows → Image storage: uploads images
routes/listing.js - Listing workflows → Mapbox geocoder: geocodes location
controllers/listings.js - Listing workflows → Listing pages: renders pages
controllers/listings.js - Review routes → Review workflows: dispatches actions
routes/review.js - Review routes → Validation and access: checks access
routes/review.js - Review workflows → Review records: creates and deletes
controllers/reviews.js - Review workflows → Listing records: updates references
controllers/reviews.js - Express entry and rendering → MongoDB: connects database
app.js - Listing workflows → MongoDB: queries through models
- Review workflows → MongoDB: queries through models
- Account routes → Account workflows: dispatches actions
routes/user.js - Account workflows → User records: manages accounts
controllers/users.js - Account workflows → Account pages: renders pages
- Validation and access → Listing records: checks ownership
middlewear.js - Validation and access → Review records: checks authorship
middlewear.js - Validation and access → Request schemas: validates input
middlewear.js - Listing workflows → Async error wrapper: wraps async actions
controllers/listings.js - Review workflows → Async error wrapper: wraps async actions
controllers/reviews.js - Express entry and rendering → Error page: renders failures
app.js - Listing pages → Listing map: shows location
README.md - Listing pages → Price tax toggle: offers tax toggle
README.md - Sample listing data → Listing records: seeds examples
README.md