Skip to content

🌍 WanderLust β€” Full-Stack Hotel Booking Platform 🏨 A modern full-stack hotel booking platform built with Node.js, Express.js, MongoDB, and Passport.js. WanderLust lets users explore, book, and review stays with a secure, scalable, and elegant design β€” powered by Bootstrap and Cloudinary. ✈️

Notifications You must be signed in to change notification settings

VAMSHIYADAV46/WanderLust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 WanderLust

Your Gateway to Perfect Stays - Full-Stack Hotel Listing & Booking Platform

GitHub Repo Size GitHub Stars Last Commit Issues License

Node.js Express.js MongoDB Bootstrap Cloudinary Passport.js

πŸš€ Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report Bug β€’ ✨ Request Feature


🌟 Introduction

WanderLust is a comprehensive full-stack web application that revolutionizes the hotel listing and booking experience. Designed for both travelers seeking their perfect accommodation and hotel owners wanting to showcase their properties, WanderLust provides an intuitive, secure, and feature-rich platform for seamless hospitality management.

🎯 The Problem

Finding and booking accommodations online often involves navigating complex interfaces, dealing with security concerns, and struggling with poor user experiences. Hotel owners need simple tools to manage their listings without technical expertise.

πŸ’‘ Our Solution

WanderLust combines modern web technologies to create a user-friendly platform where travelers can discover perfect stays and property owners can effortlessly manage their listings. With robust authentication, cloud-based image management, and intuitive design, we make hospitality accessible to everyone.

πŸš€ What Makes WanderLust Unique

  • πŸ” Secure by Design: Industry-standard authentication with Passport.js
  • ☁️ Cloud-Powered: Cloudinary integration for optimized image delivery
  • πŸ“± Mobile-First: Responsive design that works beautifully on any device
  • ⚑ Fast & Reliable: Optimized performance with MongoDB and Express.js
  • 🎨 Modern UI: Clean, intuitive interface built with Bootstrap 5.3.3

✨ Features

🎬 Core Features

  • πŸ” User Authentication - Secure sign-up/login with Passport.js
  • 🏨 Hotel Management - Create, update, and delete listings
  • πŸ“Έ Image Upload - Cloudinary-powered image optimization
  • ⭐ Reviews System - Share and manage guest experiences
  • πŸ” Search & Filter - Find perfect accommodations easily
  • πŸ“± Responsive Design - Seamless experience across devices

πŸ›‘οΈ Benefits

  • ⚑ Lightning Fast - Optimized database queries
  • πŸ”’ Secure - Password hashing and session management
  • 🎨 Beautiful UI - Modern Bootstrap 5.3.3 design
  • πŸ“Š Scalable - MongoDB for flexible data management
  • 🌐 SEO Friendly - Server-side rendering with EJS
  • πŸ’° Cost-Effective - Open-source and customizable

πŸ—οΈ System Architecture

graph TB
    subgraph "Client Layer"
        A[Browser] --> B[EJS Templates]
        B --> C[Bootstrap UI]
    end
    
    subgraph "Application Layer"
        D[Express.js Server] --> E[Routes]
        E --> F[Controllers]
        F --> G[Middleware]
    end
    
    subgraph "Authentication"
        H[Passport.js] --> I[Local Strategy]
        I --> J[Session Management]
    end
    
    subgraph "Data Layer"
        K[MongoDB] --> L[User Model]
        K --> M[Listing Model]
        K --> N[Review Model]
    end
    
    subgraph "Storage"
        O[Cloudinary] --> P[Image Upload]
        P --> Q[Image Optimization]
    end
    
    A -->|HTTP Requests| D
    G -->|Authentication| H
    F -->|CRUD Operations| K
    F -->|Upload Images| O
    
    style A fill:#61dafb,stroke:#000,stroke-width:2px
    style D fill:#000000,stroke:#fff,stroke-width:2px
    style H fill:#34e27a,stroke:#000,stroke-width:2px
    style K fill:#47a248,stroke:#000,stroke-width:2px
    style O fill:#3448c5,stroke:#000,stroke-width:2px
Loading

πŸ› οΈ Tech Stack

Category Technology Description
Frontend HTML5 CSS3 JavaScript Core web technologies
Template Engine EJS Server-side rendering
UI Framework Bootstrap Responsive design framework
Backend Node.js JavaScript runtime
Framework Express.js Web application framework
Database MongoDB NoSQL database
ODM Mongoose MongoDB object modeling
Authentication Passport.js Authentication middleware
Image Storage Cloudinary Cloud-based image management
Session Store Connect-Mongo MongoDB session store

πŸ“¦ Installation & Setup

Prerequisites

  • Node.js 16.x or higher
  • npm or yarn package manager
  • MongoDB installed locally or MongoDB Atlas account
  • Cloudinary account (free tier available)
  • Git installed on your system

1️⃣ Clone the Repository

git clone https://github.com/VAMSHIYADAV46/WanderLust.git
cd WanderLust

2️⃣ Install Dependencies

# Install all required packages
npm install

3️⃣ Environment Configuration

Create a .env file in the root directory:

# Server Configuration
PORT=3000
NODE_ENV=development

# MongoDB Configuration
MONGO_URI=mongodb://localhost:27017/wanderlust
# Or use MongoDB Atlas:
# MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/wanderlust

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_KEY=your_cloudinary_api_key
CLOUDINARY_SECRET=your_cloudinary_api_secret

# Session Configuration
SESSION_SECRET=your_super_secret_session_key_here

# Application URL
APP_URL=http://localhost:3000

4️⃣ Database Setup

# If using local MongoDB, ensure it's running:
mongod

# The application will automatically create collections on first run

5️⃣ Cloudinary Setup

  1. Sign up at Cloudinary
  2. Navigate to Dashboard
  3. Copy your Cloud Name, API Key, and API Secret
  4. Add them to your .env file

6️⃣ Start the Application

# Development mode
npm start

# Or with nodemon for auto-restart
npm run dev

7️⃣ Access the Application

Open your browser and navigate to:

http://localhost:3000

πŸ’» Usage Guide

For Travelers

  1. Browse Listings 🏨

    • Visit the homepage to view all available hotels
    • Use search and filter options to find your perfect stay
  2. Create Account πŸ‘€

    • Click "Sign Up" to create a new account
    • Provide username, email, and secure password
  3. Book & Review ⭐

    • View detailed listing information
    • Add reviews to share your experience
    • Rate hotels based on your stay

For Hotel Owners

  1. Register & Login πŸ”

    • Create an account or log in to existing account
    • Access your personal dashboard
  2. Create Listing βž•

    • Click "Add New Listing"
    • Fill in hotel details (name, location, price, description)
    • Upload high-quality images via Cloudinary
    • Submit for immediate publication
  3. Manage Properties ✏️

    • Edit listing details anytime
    • Update prices and availability
    • Delete listings when needed
    • Monitor guest reviews

Project Structure

WanderLust/
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ user.js          # User schema and methods
β”‚   β”œβ”€β”€ listing.js       # Hotel listing schema
β”‚   └── review.js        # Review schema
β”œβ”€β”€ views/
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── boilerplate.ejs
β”‚   β”œβ”€β”€ listings/
β”‚   β”‚   β”œβ”€β”€ index.ejs    # All listings
β”‚   β”‚   β”œβ”€β”€ show.ejs     # Single listing
β”‚   β”‚   β”œβ”€β”€ new.ejs      # Create listing
β”‚   β”‚   └── edit.ejs     # Edit listing
β”‚   └── users/
β”‚       β”œβ”€β”€ signup.ejs
β”‚       └── login.ejs
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ listings.js      # Listing routes
β”‚   β”œβ”€β”€ reviews.js       # Review routes
β”‚   └── users.js         # User routes
β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ listings.js      # Listing logic
β”‚   β”œβ”€β”€ reviews.js       # Review logic
β”‚   └── users.js         # User logic
β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ auth.js          # Authentication checks
β”‚   └── validation.js    # Input validation
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── images/
β”œβ”€β”€ utils/
β”‚   └── cloudinary.js    # Cloudinary configuration
β”œβ”€β”€ app.js               # Main application file
β”œβ”€β”€ package.json
β”œβ”€β”€ .env.example
└── README.md

πŸ”‘ Key Features Explained

πŸ” Authentication System

WanderLust uses Passport.js for robust authentication:

// Local Strategy Configuration
passport.use(new LocalStrategy(User.authenticate()));
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());

Features:

  • Secure password hashing with bcrypt
  • Session-based authentication
  • Login/logout functionality
  • Protected routes middleware
  • Remember me functionality

πŸ“Έ Image Management

Cloudinary integration for professional image handling:

// Cloudinary Configuration
cloudinary.config({
  cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
  api_key: process.env.CLOUDINARY_KEY,
  api_secret: process.env.CLOUDINARY_SECRET
});

Benefits:

  • Automatic image optimization
  • Responsive image delivery
  • CDN-powered fast loading
  • Thumbnail generation
  • Format conversion
  • Storage optimization

⭐ Review System

Comprehensive review and rating system:

// Review Schema
const reviewSchema = new Schema({
  rating: { type: Number, min: 1, max: 5 },
  comment: String,
  author: { type: Schema.Types.ObjectId, ref: 'User' },
  createdAt: { type: Date, default: Date.now }
});

Features:

  • 1-5 star rating system
  • Text reviews
  • User attribution
  • Edit/delete own reviews
  • Average rating calculation

πŸ“š Learning Outcomes

What This Project Demonstrates:

🎯 Full-Stack Development

  • MERN stack integration
  • RESTful API design
  • MVC architecture
  • Server-side rendering

πŸ” Security Best Practices

  • Authentication & authorization
  • Password hashing
  • Session management
  • Input validation & sanitization

☁️ Cloud Integration

  • Cloudinary setup
  • Image upload handling
  • CDN utilization
  • Environment variables

Skills Developed:

  • βœ… Database Design - MongoDB schema modeling and relationships
  • βœ… User Authentication - Complete auth flow with Passport.js
  • βœ… File Uploads - Handling multipart form data with Multer
  • βœ… Cloud Storage - Integrating third-party services
  • βœ… Responsive Design - Bootstrap 5.3.3 implementation
  • βœ… Template Engines - Dynamic content with EJS
  • βœ… Error Handling - Comprehensive error management
  • βœ… Middleware - Custom Express middleware creation
  • βœ… Session Management - User session handling
  • βœ… Security - Web application security fundamentals

πŸ—ΊοΈ Roadmap

Phase 1: Core Features βœ…

  • User authentication system
  • CRUD operations for listings
  • Image upload with Cloudinary
  • Review and rating system
  • Responsive design

Phase 2: Enhanced Features 🚧

  • Advanced search filters (price, location, amenities)
  • Booking calendar integration
  • Wishlist/favorites functionality
  • User profiles with avatars
  • Email notifications
  • Pagination for listings

Phase 3: Booking System πŸ“‹

  • Real-time availability checking
  • Booking management dashboard
  • Payment gateway integration (Stripe/Razorpay)
  • Booking confirmation emails
  • Cancellation policy management
  • Host approval system

Phase 4: Advanced Features 🎯

  • Interactive maps with Mapbox/Google Maps
  • Multi-language support (i18n)
  • Chat system between guests and hosts
  • Advanced analytics dashboard
  • Mobile application (React Native)
  • Social media integration

Phase 5: Enterprise Features 🏒

  • Multi-property management
  • Revenue analytics
  • Dynamic pricing algorithms
  • API for third-party integrations
  • Advanced security features
  • Compliance certifications

πŸš€ Deployment

Deploy to Render

Backend Deployment

  1. Create Web Service:

    Build Command: npm install
    Start Command: npm start
    
  2. Environment Variables:

    NODE_ENV=production
    MONGO_URI=your_mongodb_atlas_uri
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_KEY=your_api_key
    CLOUDINARY_SECRET=your_api_secret
    SESSION_SECRET=your_production_secret
    

Deploy to Heroku

# Login to Heroku
heroku login

# Create new app
heroku create wanderlust-app

# Add MongoDB Atlas add-on
heroku addons:create mongolab:sandbox

# Set environment variables
heroku config:set CLOUDINARY_CLOUD_NAME=your_cloud_name
heroku config:set CLOUDINARY_KEY=your_key
heroku config:set CLOUDINARY_SECRET=your_secret
heroku config:set SESSION_SECRET=your_secret

# Deploy
git push heroku main

MongoDB Atlas Setup

  1. Create cluster at MongoDB Atlas
  2. Whitelist IP addresses (0.0.0.0/0 for all)
  3. Create database user
  4. Get connection string
  5. Add to environment variables

🀝 Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

How to Contribute

  1. Fork the Repository

    git clone https://github.com/VAMSHIYADAV46/WanderLust.git
    cd WanderLust
  2. Create Feature Branch

    git checkout -b feature/AmazingFeature
  3. Make Your Changes

    • Follow the existing code style
    • Write clear commit messages
    • Add tests if applicable
    • Update documentation
  4. Commit Your Changes

    git add .
    git commit -m "✨ Add AmazingFeature: description"
  5. Push to Your Fork

    git push origin feature/AmazingFeature
  6. Open Pull Request

    • Provide clear description
    • Link related issues
    • Include screenshots for UI changes

Contribution Guidelines

  • Code Style: Follow ESLint configuration
  • Testing: Test thoroughly before submitting
  • Documentation: Update README for new features
  • Commits: Use conventional commit messages
  • Reviews: Be open to feedback and suggestions

Areas for Contribution

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“ Documentation improvements
  • 🎨 UI/UX enhancements
  • πŸ§ͺ Test coverage
  • β™Ώ Accessibility improvements
  • 🌍 Internationalization

πŸ› Known Issues

  • Large image uploads may take time on slower connections
  • Session timeout on prolonged inactivity
  • Search functionality needs optimization for large datasets

Report issues at: GitHub Issues


πŸ“„ License

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

MIT License

Copyright (c) 2024 Mekala Vamshi Yadav

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...

πŸ™ Acknowledgements

Special Thanks To:

  • πŸƒ MongoDB - For flexible database solutions
  • 🟒 Node.js - For powerful JavaScript runtime
  • ⚑ Express.js - For minimalist web framework
  • ☁️ Cloudinary - For image management platform
  • πŸ” Passport.js - For authentication middleware
  • 🎨 Bootstrap - For responsive design framework
  • πŸ“ EJS - For templating engine
  • πŸ‘₯ Open Source Community - For continuous inspiration and support

Inspired By:

  • Airbnb - For revolutionizing hospitality booking
  • Booking.com - For comprehensive hotel listings
  • TripAdvisor - For review and rating systems

πŸ‘¨β€πŸ’» Author

Mekala Vamshi Yadav

Full-Stack Developer | MERN Stack Enthusiast | Open Source Contributor

GitHub LinkedIn Portfolio


πŸ”— Project Links


πŸ“Š Project Stats

GitHub stars GitHub forks GitHub watchers


⭐ Star this repo if you find it helpful!

Built with ❀️ and β˜• for Travelers & Developers

🌍 Happy Coding & Safe Travels! ✈️

About

🌍 WanderLust β€” Full-Stack Hotel Booking Platform 🏨 A modern full-stack hotel booking platform built with Node.js, Express.js, MongoDB, and Passport.js. WanderLust lets users explore, book, and review stays with a secure, scalable, and elegant design β€” powered by Bootstrap and Cloudinary. ✈️

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •