⚡Wanderlust is a full-stack travel listing web app inspired by Airbnb, built using Node.js, Express, MongoDB, and EJS.
It lets users explore, create, and review travel destinations with full authentication, authorization, and cloud-based image uploads.
Node.js | Express.js | MongoDB | JavaScript | Bootstrap |
Cloudinary | Mapbox | Git | NPM | EJS |
Experience the live version here:
| Feature | Description |
|---|---|
| 🧾 CRUD Operations | Users can Create, Read, Update, and Delete listings and reviews. |
| 🔐 Authentication | Secure login & signup using Passport.js with encrypted sessions. |
| 🛡️ Authorization | Only owners can modify or delete their listings or reviews. |
| 💬 Flash Messages | Real-time success and failure feedback with Express-Flash. |
| 🧮 Validations | Server-side using Joi, client-side with custom JavaScript. |
| 🧩 MVC Architecture | Clean separation of concerns — models, views, controllers. |
| ⚙️ Middlewares | Custom, validation, and error-handling middlewares. |
| ☁️ Cloud Integration | Cloudinary for image hosting. |
| 🗺️ Map Integration | Mapbox for interactive location maps. |
| 🚀 Deployment | Fully deployed on Render. |
Wanderlust/
├── controllers/
│ ├── listings.js
│ ├── reviews.js
│ └── users.js
├── init/
│ └── data.js
├── models/
│ ├── listing.js
│ └── review.js
├── public/
│ ├── css/
│ │ ├── rating.css
│ │ └── style.css
│ └── js/
│ ├── maps.js
│ └── script.js
├── routes/
│ ├── listing.js
│ ├── review.js
│ └── user.js
├── utils/
│ ├── ExpressError.js
│ ├── wrapAsync.js
│ └── middleware.js
├── views/
│ ├── includes/
│ │ └── flash.ejs
│ ├── layouts/
│ │ └── boilerplate.ejs
│ ├── listings/
│ │ ├── footer.ejs
│ │ ├── navbar.ejs
│ │ ├── index.ejs
│ │ └── show.ejs
│ ├── users/
│ │ ├── login.ejs
│ │ ├── signup.ejs
│ │ └── error.ejs
│ └── error.ejs
├── cloudConfig.js
├── LICENSE
├── middleware.js
├── package-lock.json
├── package.json
├── app.js
├── README.md
└── schema.jsflowchart TD
A[User Visits Wanderlust 🌍] --> B[Views Listings 🏕️]
B --> C[Registers / Logs In 🔐]
C --> D[Creates New Listing ➕]
D --> E[Uploads Images to Cloudinary ☁️]
E --> F[Adds Map Location via Mapbox 🗺️]
F --> G[Submits Form → Joi Validation ✅]
G --> H[Data Saved to MongoDB 💾]
H --> I[Success Flash Message ✨]
I --> J[Other Users Add Reviews 💬]
J --> K[Owner Edits or Deletes Listing ✏️❌]
K --> L[Reviews Auto-Deleted by Mongoose Middleware ⚙️]
L --> M[All Updates Synced on Render 🚀]1.Clone the repository
git clone https://github.com/PavithraSharma14/wanderlust-mern-fullstack.git
cd wanderlust2.Install dependencies
npm install3.Environment variables Create a .env file in the root with:
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_KEY=your_api_key
CLOUDINARY_SECRET=your_api_secret
MAPBOX_TOKEN=your_mapbox_token
DB_URL=your_mongodb_connection_string
SECRET=your_session_secret4.Run the app
node app.js
or
nodemon app.js5.Visit the app
👉 http://localhost:8080Listings
| Method | Route | Description |
|---|---|---|
| GET | /listings |
All listings |
| GET | /listings/:id |
Single listing |
| POST | /listings |
Create listing |
| PUT | /listings/:id |
Edit listing |
| DELETE | /listings/:id |
Delete listing |
Reviews
| Method | Route | Description |
|---|---|---|
| POST | /listings/:id/reviews |
Add review |
| DELETE | /listings/:id/reviews/:reviewId |
Delete review |
Users
- /login
- /signup
- /logout
Recommended Deployment Stack:
- Render → Backend
- MongoDB Atlas → Database
- Cloudinary → Image Storage
Contributions, issues, and feature requests are welcome!
Feel free to Fork this repo and submit a Pull Request.
- Fork the repository
- Clone your fork
git clone https://github.com/your-username/wanderlust.git- Create a new branch
git checkout -b feature-name- Make your changes
- Commit your updates
git commit -m "Add: your feature name"- Push the branch
git push origin feature-name- Open a Pull Request 🚀
- This project is licensed under the MIT License — see the LICENSE file for details.