Skip to content

๐Ÿก Full-stack Airbnb clone built with Node.js, Express, MongoDB & EJS. Features user auth, property listings, reviews, image uploads & responsive design. Live demo available!

Notifications You must be signed in to change notification settings

aashutosh585/WanderLust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿก WanderLust - Airbnb Clone

A full-stack web application inspired by Airbnb, built with Node.js, Express, MongoDB, and EJS. WanderLust allows users to explore, list, and review accommodations around the world.

๐ŸŒ Live Demo

๐Ÿš€ Visit WanderLust Live

๐Ÿ“‹ Table of Contents

โœจ Features

๐Ÿ  Property Management

  • Browse Listings: Explore accommodations with beautiful image galleries
  • Category Filtering: Filter by categories like Trending, Rooms, Mountains, etc.
  • Detailed Views: View comprehensive property information
  • Add New Listings: Property owners can list their accommodations
  • Edit/Delete: Full CRUD operations for property owners
  • Image Upload: Cloudinary integration for high-quality images

๐Ÿ‘ค User Authentication & Authorization

  • Secure Registration & Login: User authentication with Passport.js
  • Session Management: Persistent login sessions
  • Protected Routes: Authorization middleware
  • User Profiles: Personalized user experience

โญ Reviews & Ratings

  • 5-Star Rating System: Interactive star rating interface
  • Review Comments: Detailed user reviews
  • Review Management: Users can manage their reviews
  • Review Count Display: Shows total reviews per listing

๐ŸŽจ Modern UI/UX

  • Responsive Design: Mobile-first approach with Bootstrap 5
  • Interactive Elements: Smooth animations and hover effects
  • Category Badges: Visual indicators on property images
  • Flash Messages: User feedback system
  • Clean Interface: Professional and intuitive design

๐Ÿ”ง Advanced Features

  • Form Validation: Client and server-side validation with Joi
  • Error Handling: Comprehensive error management
  • Security: Input sanitization and XSS protection
  • Performance: Optimized images and efficient queries

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js - JavaScript runtime environment
  • Express.js - Fast web application framework
  • MongoDB - NoSQL database for flexible data storage
  • Mongoose - MongoDB object modeling for Node.js

Frontend

  • EJS - Embedded JavaScript templating engine
  • Bootstrap 5 - Responsive CSS framework
  • Font Awesome - Icon library
  • Custom CSS - Additional styling and animations

Authentication & Security

  • Passport.js - Authentication middleware
  • bcrypt - Password hashing
  • express-session - Session management
  • Joi - Data validation schema

File Upload & Storage

  • Multer - File upload middleware
  • Cloudinary - Cloud-based image storage and optimization

Additional Packages

  • method-override - HTTP method override
  • connect-flash - Flash message middleware
  • dotenv - Environment variable management

๐Ÿš€ Installation & Setup

Prerequisites

Make sure you have the following installed:

  • Node.js (v14 or higher)
  • MongoDB (local installation or MongoDB Atlas)
  • Git

1. Clone the Repository

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

2. Install Dependencies

npm install

3. Environment Variables

Create a .env file in the root directory and add:

CLOUD_NAME=your_cloudinary_cloud_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret
ATLASDB_URL=your_mongodb_connection_string
SECRET=your_session_secret_key

4. Database Setup

Initialize the database with sample data (optional):

node init/index.js

5. Start the Application

npm start

The application will be available at http://localhost:8080

๐Ÿ“ฑ Usage

For Travelers

  1. Explore Listings: Browse available accommodations on the homepage
  2. Filter by Category: Use category filters to find specific types of properties
  3. View Details: Click on any listing to see detailed information
  4. Read Reviews: Check ratings and reviews from other travelers
  5. Leave Reviews: Rate and review properties after your stay

For Property Owners

  1. Sign Up/Login: Create an account to list your property
  2. Add Listing: Click "Airbnb your home" to create a new listing
  3. Upload Images: Add high-quality photos of your property
  4. Manage Listings: Edit or delete your property listings
  5. Monitor Reviews: Track guest feedback and ratings

๐Ÿ”— API Endpoints

Listings

GET    /listings           - Get all listings
GET    /listings/new       - New listing form
POST   /listings           - Create new listing
GET    /listings/:id       - Get specific listing
GET    /listings/:id/edit  - Edit listing form
PUT    /listings/:id       - Update listing
DELETE /listings/:id       - Delete listing

Reviews

POST   /listings/:id/reviews           - Add review
DELETE /listings/:id/reviews/:reviewId - Delete review

Authentication

GET    /signup    - Registration form
POST   /signup    - Register user
GET    /login     - Login form
POST   /login     - Authenticate user
GET    /logout    - Logout user

๐Ÿ“ Project Structure

WanderLust/
โ”œโ”€โ”€ controllers/           # Route controllers
โ”‚   โ”œโ”€โ”€ listings.js       # Listing operations
โ”‚   โ”œโ”€โ”€ reviews.js        # Review operations
โ”‚   โ””โ”€โ”€ users.js          # User authentication
โ”œโ”€โ”€ models/               # Database models
โ”‚   โ”œโ”€โ”€ listing.js        # Listing schema
โ”‚   โ”œโ”€โ”€ review.js         # Review schema
โ”‚   โ””โ”€โ”€ user.js           # User schema
โ”œโ”€โ”€ routes/               # Express routes
โ”‚   โ”œโ”€โ”€ listing.js        # Listing routes
โ”‚   โ”œโ”€โ”€ review.js         # Review routes
โ”‚   โ””โ”€โ”€ user.js           # User routes
โ”œโ”€โ”€ views/                # EJS templates
โ”‚   โ”œโ”€โ”€ includes/         # Partial templates
โ”‚   โ”œโ”€โ”€ layouts/          # Layout templates
โ”‚   โ”œโ”€โ”€ listings/         # Listing views
โ”‚   โ””โ”€โ”€ users/            # User views
โ”œโ”€โ”€ public/               # Static files
โ”‚   โ”œโ”€โ”€ css/              # Stylesheets
โ”‚   โ””โ”€โ”€ js/               # Client-side JavaScript
โ”œโ”€โ”€ utils/                # Utility functions
โ”œโ”€โ”€ init/                 # Database initialization
โ”œโ”€โ”€ app.js                # Main application file
โ”œโ”€โ”€ cloudConfig.js        # Cloudinary configuration
โ”œโ”€โ”€ middleware.js         # Custom middleware
โ””โ”€โ”€ schema.js             # Joi validation schemas

๐ŸŽฏ Categories

WanderLust features various accommodation categories:

  • ๐Ÿ”ฅ Trending - Popular destinations
  • ๐Ÿ›๏ธ Rooms - Private rooms
  • ๐Ÿ™๏ธ Iconic Cities - Urban accommodations
  • ๐Ÿฅพ Hiking - Adventure locations
  • โ›ฐ๏ธ Mountains - Mountain retreats
  • ๐Ÿฐ Castles - Historic properties
  • ๐ŸŠ Amazing Pools - Properties with pools
  • ๐Ÿ•๏ธ Camping - Outdoor experiences
  • ๐Ÿšœ Farms - Rural getaways
  • ๐Ÿ›ธ Domes - Unique architecture
  • โ›ต Boats - Waterfront stays

๐Ÿ”’ Security Features

  • Password Hashing: Secure password storage with bcrypt
  • Session Security: Secure session management
  • Input Validation: Joi schema validation
  • XSS Protection: Input sanitization
  • Authorization: Route protection middleware
  • File Upload Security: Cloudinary integration

๐Ÿ“ฑ Responsive Design

Fully responsive design that works on:

  • ๐Ÿ’ป Desktop (1200px+)
  • ๐Ÿ’ป Laptop (992px-1199px)
  • ๐Ÿ“ฑ Tablet (768px-991px)
  • ๐Ÿ“ฑ Mobile (320px-767px)

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

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

๐Ÿ‘จโ€๐Ÿ’ป Author

Ashutosh Maurya

๐Ÿ™ Acknowledgments

  • Airbnb - For the design inspiration
  • Bootstrap - For the responsive framework
  • Font Awesome - For the beautiful icons
  • Cloudinary - For image storage and optimization
  • MongoDB Atlas - For database hosting
  • Render - For seamless deployment

๐Ÿ“Š Project Stats

  • โญ Stars: Show your support by starring this repository
  • ๐Ÿด Forks: Feel free to fork and contribute
  • ๐Ÿ› Issues: Report bugs or request features
  • ๐Ÿ“ License: MIT License

๐Ÿ”ฎ Future Enhancements

  • Advanced search and filtering
  • Booking system integration
  • Payment gateway integration
  • Real-time chat system
  • Mobile app development
  • Multi-language support

๐ŸŒŸ Show Your Support

If you found this project helpful, please give it a โญ star!

๐Ÿš€ Live Demo | ๐Ÿ“š Documentation


Made with โค๏ธ by Ashutosh Maurya

About

๐Ÿก Full-stack Airbnb clone built with Node.js, Express, MongoDB & EJS. Features user auth, property listings, reviews, image uploads & responsive design. Live demo available!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published