How kkumarkaushal95-arch/full-stack-project works
Wanderlust is an Express-based lodging-listing web app. Visitors browse listings; signed-in users can create, edit, and delete their own listings, upload listing images, and add or remove reviews. The runtime routes requests through authentication and validation middleware to controllers, which read and write MongoDB models and render EJS pages. User registration and login are present in the tree, but their controller and route wiring were not sampled; those details are represented only at the documented module level.
Main entry points: app.js Express app · routes/listing.js Listing routes · middleware.js Auth and validation · models/listing.js Listing model
Components 19
Web runtime
- Express app
app.js - Listing routes
routes/listing.js - Review routes
routes/review.js - User routes
routes/user.js - Auth and validation
middleware.js - Shared layout
views/layouts/boilerplate.ejs - Error page
views/error.ejs
Listings
- Listing actions
controllers/listings.js - Listing pages
views/listings - Image upload
cloudConfig.js
Users and reviews
- Review actions
controllers/reviews.js - User actions
controllers/users.js - Account pages
views/users
Persistence and media
- Review model
models/review.js - Listing model
models/listing.js - User model
models/user.js
Other components
- Visitor
- MongoDB
- Cloudinary
Connections 25
- Visitor → Express app: sends requests
- Express app → Listing routes: mounts routes
- Express app → Review routes: mounts routes
- Express app → User routes: mounts routes
- Listing routes → Auth and validation: checks access
- Listing routes → Listing actions: dispatches actions
- Review routes → Auth and validation: checks access
- Review routes → Review actions: dispatches actions
- User routes → User actions: dispatches actions
- Listing routes → Image upload: processes images
- Image upload → Cloudinary: stores images
- Listing actions → Listing model: reads and writes
- Review actions → Listing model: updates references
- Review actions → Review model: creates and deletes
- Auth and validation → Listing model: checks ownership
- Auth and validation → Review model: checks authorship
- Express app → User model: configures sessions
- Listing model → MongoDB: persists listings
- Review model → MongoDB: persists reviews
- User model → MongoDB: persists users
- Listing actions → Listing pages: renders pages
- User actions → Account pages: renders pages
- Express app → Error page: renders errors
- Listing pages → Shared layout: uses layout
- Account pages → Shared layout: uses layout