Skip to content

Book luxurious rooms at your visiting place at an affordable price

Notifications You must be signed in to change notification settings

manoharsingh2402/WanderLust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿก WanderLust

A full-stack travel and accommodation booking platform

WanderLust is a modern web application that allows users to discover, list, and book unique accommodations around the world. Built with the MEN stack (MongoDB, Express.js, Node.js) and EJS templating.

๐ŸŒ Live Demo

Visit: https://wanderlust-3-lc3j.onrender.com/


โœจ Features

For Guests

  • ๐Ÿ” Browse and search accommodation listings
  • ๐Ÿ—บ๏ธ Interactive map integration for location viewing
  • ๐Ÿ“ View detailed property information with images
  • ๐Ÿ’ฌ Read and write reviews for properties
  • ๐Ÿ’ณ Secure payment integration with Razorpay (Test Mode)
  • ๐Ÿ“ฑ Responsive design for all devices
  • ๐Ÿ‘ค User authentication and profile management

For Hosts

  • ๐Ÿ  Create and manage property listings
  • ๐Ÿ“ธ Upload multiple images for properties
  • โœ๏ธ Edit and delete your listings
  • ๐Ÿ“Š Track bookings and manage reservations
  • ๐Ÿ’ฐ Receive payments securely

Technical Features

  • ๐Ÿ” Secure authentication with Passport.js
  • ๐Ÿ—„๏ธ MongoDB database with Mongoose ODM
  • โ˜๏ธ Image storage with Cloudinary
  • ๐Ÿ›ก๏ธ Input validation and sanitization
  • ๐Ÿšจ Error handling and flash messages
  • ๐Ÿ“ Location validation and mapping

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - NoSQL database
  • Mongoose - ODM for MongoDB

Frontend

  • EJS - Templating engine
  • Bootstrap - CSS framework
  • JavaScript - Client-side scripting

Authentication & Security

  • Passport.js - Authentication middleware
  • Express Session - Session management
  • Connect Flash - Flash messages
  • Joi - Schema validation

Payment & Storage

  • Razorpay - Payment gateway integration
  • Cloudinary - Image upload and storage
  • Multer - File upload middleware

๐Ÿ“‹ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v14 or higher)
  • MongoDB (local or Atlas account)
  • npm or yarn

๐Ÿš€ Installation & Setup

1. Clone the repository

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

2. Install dependencies

npm install

3. Set up environment variables

Create a .env file in the root directory:

# Database
ATLASDB_URL=your_mongodb_connection_string

# Cloudinary (for image uploads)
CLOUD_NAME=your_cloudinary_cloud_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret

# Razorpay (for payments)
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret

# Session Secret
SECRET=your_session_secret_key

# Optional: Map API
MAP_TOKEN=your_mapbox_token

4. Run the application

Development mode:

npm start

Production mode:

NODE_ENV=production npm start

The app will be running at http://localhost:8080


๐Ÿ“ Project Structure

WanderLust/
โ”œโ”€โ”€ models/              # Mongoose 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
โ”‚   โ”œโ”€โ”€ listings/        # Listing views
โ”‚   โ”œโ”€โ”€ users/           # User views
โ”‚   โ””โ”€โ”€ layouts/         # Layout templates
โ”œโ”€โ”€ public/              # Static files
โ”‚   โ”œโ”€โ”€ css/            # Stylesheets
โ”‚   โ””โ”€โ”€ js/             # Client-side scripts
โ”œโ”€โ”€ middleware.js        # Custom middleware
โ”œโ”€โ”€ schema.js           # Joi validation schemas
โ”œโ”€โ”€ cloudConfig.js      # Cloudinary configuration
โ”œโ”€โ”€ razorpayConfig.js   # Razorpay configuration
โ”œโ”€โ”€ app.js              # Main application file
โ””โ”€โ”€ package.json        # Dependencies

๐Ÿ”‘ Environment Variables

Variable Description Required
ATLASDB_URL MongoDB connection string Yes
CLOUD_NAME Cloudinary cloud name Yes
CLOUD_API_KEY Cloudinary API key Yes
CLOUD_API_SECRET Cloudinary API secret Yes
RAZORPAY_KEY_ID Razorpay test/live key ID Yes
RAZORPAY_KEY_SECRET Razorpay secret key Yes
SECRET Session secret for security Yes
MAP_TOKEN Mapbox access token (optional) No

๐Ÿ’ณ Payment Integration

WanderLust uses Razorpay for secure payment processing.

Test Mode Credentials:

Credit/Debit Card:

  • Card Number: 4111 1111 1111 1111
  • CVV: Any 3 digits (e.g., 123)
  • Expiry: Any future date (e.g., 12/25)

UPI:

  • UPI ID: success@razorpay (for successful payment)
  • UPI ID: failure@razorpay (for failed payment)

OTP: Any 6-digit number in test mode


๐Ÿ“ธ Screenshots

Coming soon...


๐Ÿ—บ๏ธ API Routes

Listings

  • GET /listings - View all listings
  • GET /listings/new - Show create listing form
  • POST /listings - Create new listing
  • GET /listings/:id - View single listing
  • GET /listings/:id/edit - Show edit 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

Users

  • GET /signup - Signup form
  • POST /signup - Register user
  • GET /login - Login form
  • POST /login - Login user
  • GET /logout - Logout user

Payments

  • POST /payment/create-order - Create Razorpay order
  • POST /payment/verify-payment - Verify payment signature

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

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

๐Ÿ“ License

This project is licensed under the ISC License.


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

Manohar Singh


๐Ÿ™ Acknowledgments


๐Ÿ› Known Issues

  • None currently reported

๐Ÿ“ฎ Contact

For any queries or suggestions, feel free to reach out or open an issue on GitHub.


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

About

Book luxurious rooms at your visiting place at an affordable price

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published