A dynamic full-stack web application for creating, browsing, and managing travel destination listings. Built with the MERN stack and following MVC architecture.
- About
- Tech Stack
- Core Features
- Additional Functionalities
- User Flow
- Installation
- Environment Variables
- Usage
- Project Structure
- Screenshots
- Contributing
- License
Wanderlust is a comprehensive travel listing platform developed during my full-stack development journey at Apna College. The application allows users to discover, create, and manage travel destinations with rich features including authentication, image uploads, reviews, and advanced search capabilities.
- HTML5 โ Structure & markup
- CSS3 โ Styling & layout
- JavaScript โ Client-side scripting
- Bootstrap โ Responsive UI framework
- EJS โ Server-side templating engine
- Node.js โ JavaScript runtime environment
- Express.js โ Web application framework
- Passport.js โ Authentication middleware
- Multer โ File upload handling
- MongoDB Atlas โ Cloud database
- Mongoose โ ODM for MongoDB
- Cloudinary โ Image storage & optimization
- Render โ Hosting & deployment
- MVC Pattern โ Model-View-Controller structure
- User registration and login system
- Session management with Express Session
- Password encryption and secure authentication
- Authorization: Only listing owners can edit/delete their posts
- Create: Add new travel destinations with details
- Read: Browse all available listings
- Update: Edit your own listings
- Delete: Remove your listings
- Cloud-based image storage using Cloudinary
- Multiple image upload support with Multer
- Automatic image optimization and delivery
- Users can add reviews to any listing
- Star-based rating system
- Comment functionality
- Users can edit/delete their own reviews
- Average rating display for each listing
- Category-based browsing: Filter by destination type
- Query search: Search by title, keywords, or location
- Price range filtering: Find listings within budget
- Location-based search: Filter by country or region
- Combined filters: Use multiple filters simultaneously
- Mobile-first approach
- Clean and modern UI/UX
- Bootstrap-powered responsive layouts
- Cross-browser compatibility
- Flash Messages: Real-time user feedback for actions
- Custom Error Pages: User-friendly error handling with EJS templates
- Middleware Architecture: Clean, reusable middleware functions
- Form Validation: Server-side validation for data integrity
- Reusable Components: Modular EJS layouts and partials
- User Profiles: Profile-based listing management
- Session Persistence: Secure session storage with MongoDB
-
Sign Up / Login ๐ค
- New users create an account
- Existing users log in with credentials
-
Browse Listings ๐
- View all available travel destinations
- Use filters and search to find specific locations
- Browse by categories
-
Create Listing โ๏ธ
- Add new travel destination
- Upload images from device
- Provide details (title, description, price, location, country)
-
View Listing Details ๐
- See complete listing information
- View all images in gallery
- Read reviews and ratings from other users
-
Add Reviews โญ
- Logged-in users can submit reviews
- Rate destinations with star system
- Add detailed comments
-
Manage Your Content ๐ ๏ธ
- Edit your own listings
- Delete your listings
- Manage your reviews
- Node.js (v14 or higher)
- MongoDB Atlas account
- Cloudinary account
- Git
-
Clone the repository
git clone https://github.com/Chhatrapati-sahu-09/-majorproject.git cd majorproject -
Install dependencies
npm install
-
Set up environment variables
- Create a
.envfile in the root directory - Add the required environment variables (see Environment Variables)
- Create a
-
Initialize the database (optional)
node init/index.js
-
Start the application
# Development mode with nodemon npm start # Or production mode node app.js
-
Open in browser
http://localhost:8080
Create a .env file in the root directory with the following variables:
# MongoDB Atlas Connection
ATLASDB_URL=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/<database>?retryWrites=true&w=majority
# Session Secret (use a strong random string)
SECRET=your-super-secret-key-here
# Cloudinary Configuration
CLOUD_NAME=your-cloudinary-cloud-name
CLOUD_API_KEY=your-cloudinary-api-key
CLOUD_API_SECRET=your-cloudinary-api-secret
# Node Environment
NODE_ENV=developmentMongoDB Atlas:
- Go to MongoDB Atlas
- Create a cluster
- Go to Database Access โ Add user
- Go to Network Access โ Add IP (use
0.0.0.0/0for all IPs or your specific IP) - Get connection string from Connect โ Connect your application
Cloudinary:
- Sign up at Cloudinary
- Go to Dashboard
- Copy your Cloud Name, API Key, and API Secret
- Register/Login to access all features
- Browse listings on the homepage
- Search using the search bar or filters
- Click on any listing to see details
- Add reviews to share your experience
- Create listings to share new destinations
# Run in development mode
npm start
# Run tests (if configured)
npm test
# Build for production
npm run build
majorproject/
โโโ controllers/ # Request handlers
โ โโโ listings.js
โ โโโ reviews.js
โ โโโ users.js
โโโ models/ # Database schemas
โ โโโ listing.js
โ โโโ review.js
โ โโโ user.js
โโโ routes/ # Route definitions
โ โโโ listing.js
โ โโโ review.js
โ โโโ user.js
โโโ views/ # EJS templates
โ โโโ includes/ # Reusable partials
โ โโโ layouts/ # Layout templates
โ โโโ listings/ # Listing views
โ โโโ users/ # User views
โโโ public/ # Static assets
โ โโโ css/
โ โโโ js/
โ โโโ icon/
โโโ utils/ # Utility functions
โ โโโ ExpressError.js
โ โโโ wrapAsync.js
โโโ init/ # Database initialization
โ โโโ data.js
โ โโโ index.js
โโโ middleware.js # Custom middleware
โโโ schema.js # Validation schemas
โโโ cloudConfig.js # Cloudinary configuration
โโโ app.js # Main application file
โโโ package.json
โโโ .env # Environment variables (not in repo)
The Wanderlust homepage where users can browse featured travel destinations. It displays listings with images, pricing, categories, and location details in a clean grid layout. The top navigation includes search, category filters, login/signup, and add-home options.
This page shows the complete details of a selected travel destination. Users can view high-resolution images, listing descriptions, owner information, price, location, and country. The layout ensures a clean, immersive experience focused on the destination.
Each listing includes a review section where users can share their experiences. Reviews display usernames, star ratings, and comments. This helps new visitors evaluate the authenticity and quality of the listing.
This section displays additional accommodation options such as luxury resorts, heritage rooms, and budget stays. Users can browse listings filtered by categories like rooms, iconic cities, mountains, farms, and more.
The signup page allows users to register on Wanderlust using a username, email, and password. The UI is simple, clean, and focused on easy onboarding for new users.
This form enables authenticated users to create a new travel listing. Users can upload images, write descriptions, select categories, enter pricing, country, and location. The form integrates Multer & Cloudinary for image uploads and uses server-side validation.
Users can search listings using keywords like "Cottage". The platform returns matching results and displays a success message indicating the applied search filter. This feature allows users to quickly find specific types of properties.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Chhatrapati Sahu
- GitHub: @Chhatrapati-sahu-09
- LinkedIn: Connect with me
- Apna College - For the comprehensive full-stack development course
- MongoDB Atlas - For cloud database hosting
- Cloudinary - For image storage and management
- Render - For application hosting
- All contributors and users of this project
If you have any questions or need help, please:
- Open an issue on GitHub
- Contact me via LinkedIn
- Check the documentation
If you like this project, please give it a โญ on GitHub!
Happy Traveling! ๐