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.
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.
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.
- π 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
|
|
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
- 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
git clone https://github.com/VAMSHIYADAV46/WanderLust.git
cd WanderLust# Install all required packages
npm installCreate 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# If using local MongoDB, ensure it's running:
mongod
# The application will automatically create collections on first run- Sign up at Cloudinary
- Navigate to Dashboard
- Copy your Cloud Name, API Key, and API Secret
- Add them to your
.envfile
# Development mode
npm start
# Or with nodemon for auto-restart
npm run devOpen your browser and navigate to:
http://localhost:3000
-
Browse Listings π¨
- Visit the homepage to view all available hotels
- Use search and filter options to find your perfect stay
-
Create Account π€
- Click "Sign Up" to create a new account
- Provide username, email, and secure password
-
Book & Review β
- View detailed listing information
- Add reviews to share your experience
- Rate hotels based on your stay
-
Register & Login π
- Create an account or log in to existing account
- Access your personal dashboard
-
Create Listing β
- Click "Add New Listing"
- Fill in hotel details (name, location, price, description)
- Upload high-quality images via Cloudinary
- Submit for immediate publication
-
Manage Properties βοΈ
- Edit listing details anytime
- Update prices and availability
- Delete listings when needed
- Monitor guest reviews
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
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
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
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
|
|
|
- β 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
- User authentication system
- CRUD operations for listings
- Image upload with Cloudinary
- Review and rating system
- Responsive design
- Advanced search filters (price, location, amenities)
- Booking calendar integration
- Wishlist/favorites functionality
- User profiles with avatars
- Email notifications
- Pagination for listings
- Real-time availability checking
- Booking management dashboard
- Payment gateway integration (Stripe/Razorpay)
- Booking confirmation emails
- Cancellation policy management
- Host approval system
- 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
- Multi-property management
- Revenue analytics
- Dynamic pricing algorithms
- API for third-party integrations
- Advanced security features
- Compliance certifications
-
Create Web Service:
Build Command: npm install Start Command: npm start -
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
# 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- Create cluster at MongoDB Atlas
- Whitelist IP addresses (0.0.0.0/0 for all)
- Create database user
- Get connection string
- Add to environment variables
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
-
Fork the Repository
git clone https://github.com/VAMSHIYADAV46/WanderLust.git cd WanderLust -
Create Feature Branch
git checkout -b feature/AmazingFeature
-
Make Your Changes
- Follow the existing code style
- Write clear commit messages
- Add tests if applicable
- Update documentation
-
Commit Your Changes
git add . git commit -m "β¨ Add AmazingFeature: description"
-
Push to Your Fork
git push origin feature/AmazingFeature
-
Open Pull Request
- Provide clear description
- Link related issues
- Include screenshots for UI changes
- 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
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π¨ UI/UX enhancements
- π§ͺ Test coverage
- βΏ Accessibility improvements
- π Internationalization
- 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
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...
- π 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
- Airbnb - For revolutionizing hospitality booking
- Booking.com - For comprehensive hotel listings
- TripAdvisor - For review and rating systems
- π Repository: https://github.com/VAMSHIYADAV46/WanderLust
- π Documentation: https://github.com/VAMSHIYADAV46/WanderLust/wiki
- π Issue Tracker: https://github.com/VAMSHIYADAV46/WanderLust/issues
- π¬ Discussions: https://github.com/VAMSHIYADAV46/WanderLust/discussions
- π Live Demo: WanderLust