Skip to content

About

Hotel Management website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

✨ Wanderlust ✨

A beautifully modern travel listing app with secure auth, image uploads, reviews, and geocoding.

Node.js Express MongoDB Cloudinary


🚀 Project Overview

Wanderlust is a full-stack travel listing platform where users can discover, create, and manage destination listings with photos, location data, and reviews.

Mobile Friendly Secure Auth MapTiler

What users can do:

  • Create travel listings with destination, price, and image
  • Upload listing images directly to Cloudinary
  • Save listing location geometry using MapTiler geocoding
  • Add and delete reviews for listings
  • Securely register, log in, and manage sessions

📦 Key Technologies

Frontend Backend Database Integrations
EJS + EJS Mate Express MongoDB / Mongoose Cloudinary
HTML/CSS Node.js Passport.js MapTiler
Joi validation connect-mongo Multer

🧩 Features

  • User registration and login with Passport
  • Authorization checks for listing ownership
  • Full CRUD for travel listings
  • Image upload, storage, and resizing via Cloudinary
  • Review creation and deletion
  • Request validation using Joi
  • Flash messaging for UI notifications
  • Session persistence in MongoDB

📁 Project Structure

  • app.js — main Express application entrypoint
  • routes/ — listing, review, and user routing
  • controllers/ — controller logic for routes
  • models/ — Mongoose schema models
  • views/ — EJS templates and layouts
  • public/ — static CSS and JS assets
  • utils/ — error handling and Cloudinary upload helper
  • middleware.js — authentication and validation middleware
  • cloudConfig.js — Cloudinary configuration
  • upload.js — Multer file upload setup

⚙️ Installation

  1. Clone repository

    git clone <repo-url>
    cd wanderlust
  2. Install dependencies

    npm install

🔑 Environment Variables

Create a .env file in the project root with:

ATLASDB_URL=<your MongoDB connection string>
SECRET=<your session secret>
MAPTILER_API_KEY=<your MapTiler API key>
CLOUD_NAME=<your Cloudinary cloud name>
CLOUD_API_KEY=<your Cloudinary API key>
CLOUD_API_SECRET=<your Cloudinary API secret>

▶️ Run Locally

node app.js

Then open:

http://localhost:8080

📌 Routes

  • /listings — view all listings
  • /listings/new — add a new listing
  • /listings/:id — listing details
  • /listings/:id/edit — edit listing
  • /listings/:id/reviews — add review
  • /signup — register new user
  • /login — login
  • /logout — logout

🛠️ Notes

  • Listing image uploads use Cloudinary with in-memory Multer storage.
  • Location geocoding is handled with MapTiler forward geocoding.
  • Sessions are stored in MongoDB using connect-mongo.
  • Protected routes require login and enforce ownership for edits and deletes.

📈 Possible Improvements

  • Add listing search and filters
  • Add user profile pages
  • Add map display for listing locations
  • Add review ratings
  • Add automated tests

📜 License

MIT

About

Hotel Management website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages