How saumya-mishra-cse/airbnb works
This is an Airbnb-inspired property-listing web application. Visitors browse listings; signed-in users can create, edit, and delete listings, while listing owners and review authors are checked by middleware. Listing and review controllers use Mongoose models, and the server renders EJS pages. Authentication uses Passport with Mongo-backed sessions; listing creation also uses geocoding and configured image storage. The README confirms listing CRUD and signup/login/logout. Relationships for unsampled modules are included only where the source index or README supports them.
Main entry points: app.js Express server · listing.js Listing routes · listings.js Listing operations · review.js Review operations
Components 18
Web application
- Express server
app.js - Listing routes
routes/listing.js - Review routes
routes/review.js - User routes
routes/user.js - Auth and validation
middleware.js
Listings
- Listing operations
controllers/listings.js
Accounts and reviews
- Review operations
controllers/review.js - User operations
controllers/users.js
Persistence and integrations
- Listing records
models/listing.js - Review records
models/review.js - User records
models/user.js - MongoDB
- Geocoding service
- Image storage config
cloudConfig.js
Rendered interface
- Listing pages
views/listings - Account pages
views/users - Map interface
public/js/map.js
Other components
- Visitor
Connections 21
- Visitor → Express server: sends requests
app.js - Express server → Listing routes: mounts routes
app.js - Express server → Review routes: mounts routes
app.js - Express server → User routes: mounts routes
app.js - Express server → User records: configures Passport
app.js - Express server → MongoDB: connects sessions and data
app.js - Listing routes → Listing operations: dispatches
routes/listing.js - Review routes → Review operations: dispatches
routes/review.js - User routes → User operations: dispatches
routes/user.js - Listing routes → Auth and validation: checks access
routes/listing.js - Review routes → Auth and validation: checks access
routes/review.js - Listing routes → Image storage config: configures uploads
routes/listing.js - Listing operations → Listing records: reads and writes
controllers/listings.js - Listing operations → Geocoding service: geocodes location
controllers/listings.js - Listing operations → Listing pages: renders
controllers/listings.js - Review operations → Listing records: updates listing reviews
controllers/review.js - Review operations → Review records: creates and deletes
controllers/review.js - Review operations → Listing pages: redirects to listing
controllers/review.js - User operations → User records: uses user records
controllers/users.js - Listing records → Review records: deletes associated reviews
models/listing.js - Visitor → Map interface: uses map