WanderLust is a full-stack travel listings web application inspired by Airbnb. It allows users to browse, create, edit, and delete property/accommodation listings from around the world. Authenticated users can also leave star-rated reviews on listings. Listing images are uploaded and served via Cloudinary, and all data is persisted in MongoDB Atlas.
- Browse all travel/accommodation listings on a responsive home page
- User registration, login, and logout with session-based authentication
- Create new listings with title, description, price, location, country, and an image upload
- Edit or delete your own listings (owner-only access)
- Leave star-rated reviews with comments on any listing (logged-in users only)
- Delete your own reviews
- Flash messages for user feedback (success/error)
- Tax toggle on the listings page to display price including GST
| Category | Technology |
|---|---|
| Runtime | Node.js (v20) |
| Web Framework | Express.js |
| Database | MongoDB (MongoDB Atlas) |
| ODM | Mongoose |
| Templating | EJS with EJS-Mate (layouts) |
| Authentication | Passport.js (passport-local, passport-local-mongoose) |
| Session Store | express-session + connect-mongo |
| Image Upload | Multer + Cloudinary (multer-storage-cloudinary) |
| Validation | Joi |
| Frontend | Bootstrap 5, Font Awesome 6 |
| Utilities | method-override, connect-flash, dotenv |
WanderLust/
├── app.js # Entry point – Express app, middleware, route mounting
├── cloudConfig.js # Cloudinary configuration and Multer storage setup
├── middleware.js # Custom middleware (isLoggedIn, isOwner, isReviewAuthor)
├── schema.js # Joi validation schemas for listings and reviews
├── models/
│ ├── listings.js # Mongoose model for listings
│ ├── reviews.js # Mongoose model for reviews
│ └── user.js # Mongoose model for users (passport-local-mongoose)
├── routes/
│ ├── listings.js # Routes for CRUD operations on listings
│ ├── reviews.js # Routes for creating/deleting reviews
│ └── user.js # Routes for user registration/login/logout
├── controller/
│ ├── listings.js # Controller logic for listing routes
│ ├── reviews.js # Controller logic for review routes
│ └── users.js # Controller logic for user routes
├── views/ # EJS templates (index, show, new, edit, users, layouts)
├── public/ # Static assets (CSS, JS)
├── init/ # Database seed scripts
└── utils/ # Helper utilities (wrapAsync, ExpressErrors)
- Clone the repository and install dependencies:
npm install
- Create a
.envfile with the following variables:ATLASDB_URL=<your MongoDB Atlas connection string> SECRET=<session secret> CLOUD_NAME=<Cloudinary cloud name> CLOUD_API_KEY=<Cloudinary API key> CLOUD_API_SECRET=<Cloudinary API secret> - Start the development server:
nodemon app.js
- Visit
http://localhost:8080/listings