Skip to content

PavithraSharma14/wanderlust-mern-fullstack

Repository files navigation

🌍 Wanderlust — Full Stack Travel Listing Web Application

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. ✈️🏕️


🚀Tech Stack


Node.js

Express.js

MongoDB

JavaScript

Bootstrap

Cloudinary

Mapbox

Git

NPM

EJS

💫 Live Demo

Experience the live version here:

Live Demo


⚙️Key Features

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.

📁 Project Structure

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.js

🔁 How It Works — Application Workflow

flowchart 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 🚀]

🧰 Installation & Setup

1.Clone the repository

git clone https://github.com/PavithraSharma14/wanderlust-mern-fullstack.git
cd wanderlust

2.Install dependencies

npm install

3.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_secret

4.Run the app

node app.js
or
nodemon app.js

5.Visit the app

👉 http://localhost:8080

🚦 Core API Routes

Listings

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

🚀 Deployment

Recommended Deployment Stack:

  • Render → Backend
  • MongoDB Atlas → Database
  • Cloudinary → Image Storage

🤝 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to Fork this repo and submit a Pull Request.

🔧 How to Contribute

  1. Fork the repository
  2. Clone your fork
   git clone https://github.com/your-username/wanderlust.git
  1. Create a new branch
   git checkout -b feature-name
  1. Make your changes
  2. Commit your updates
  git commit -m "Add: your feature name"
  1. Push the branch
  git push origin feature-name
  1. Open a Pull Request 🚀

📜 License

  • This project is licensed under the MIT License — see the LICENSE file for details.

🔗 Connect With Me


Made with ❤️ by Pavithra Sharma

About

⚡Wanderlust is a full-stack Airbnb clone built using the MERN stack — featuring authentication, dynamic listings, reviews all wrapped in a responsive, modern UI inspired by real-world platforms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors