Skip to content

Chhatrapati-sahu-09/-majorproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

65 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Wanderlust Logo

JavaScript Node.js Express.js MongoDB Mongoose HTML5 CSS3 Bootstrap Passport.js Cloudinary Render Multer MVC CRUD

๐ŸŒ Wanderlust โ€“ Travel Destination Listing Platform

A dynamic full-stack web application for creating, browsing, and managing travel destination listings. Built with the MERN stack and following MVC architecture.

๐Ÿ”— Live Demo

Visit Wanderlust


๐Ÿ“‹ Table of Contents


๐Ÿ“– About

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.


๐Ÿš€ Tech Stack

๐ŸŽจ Frontend

HTML5 CSS3 JavaScript Bootstrap EJS

  • HTML5 โ€“ Structure & markup
  • CSS3 โ€“ Styling & layout
  • JavaScript โ€“ Client-side scripting
  • Bootstrap โ€“ Responsive UI framework
  • EJS โ€“ Server-side templating engine

โš™๏ธ Backend

Node.js Express.js Passport.js Multer

  • Node.js โ€“ JavaScript runtime environment
  • Express.js โ€“ Web application framework
  • Passport.js โ€“ Authentication middleware
  • Multer โ€“ File upload handling

๐Ÿ—„๏ธ Database

MongoDB Mongoose

  • MongoDB Atlas โ€“ Cloud database
  • Mongoose โ€“ ODM for MongoDB

โ˜๏ธ Cloud Services

Cloudinary Render

  • Cloudinary โ€“ Image storage & optimization
  • Render โ€“ Hosting & deployment

๐Ÿงฉ Architecture

MVC CRUD

  • MVC Pattern โ€“ Model-View-Controller structure

โญ Core Features

๐Ÿ” Authentication & Authorization

  • User registration and login system
  • Session management with Express Session
  • Password encryption and secure authentication
  • Authorization: Only listing owners can edit/delete their posts

๐Ÿž๏ธ Listing Management (CRUD Operations)

  • Create: Add new travel destinations with details
  • Read: Browse all available listings
  • Update: Edit your own listings
  • Delete: Remove your listings

โ˜๏ธ Image Upload System

  • Cloud-based image storage using Cloudinary
  • Multiple image upload support with Multer
  • Automatic image optimization and delivery

โญ Review & Rating System

  • 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

๐Ÿ” Advanced Search & Filter

  • 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

๐Ÿ“ฑ Responsive Design

  • Mobile-first approach
  • Clean and modern UI/UX
  • Bootstrap-powered responsive layouts
  • Cross-browser compatibility

๐Ÿงญ Additional Functionalities

  • 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

๐ŸŽฏ User Flow

  1. Sign Up / Login ๐Ÿ‘ค

    • New users create an account
    • Existing users log in with credentials
  2. Browse Listings ๐Ÿ”

    • View all available travel destinations
    • Use filters and search to find specific locations
    • Browse by categories
  3. Create Listing โœ๏ธ

    • Add new travel destination
    • Upload images from device
    • Provide details (title, description, price, location, country)
  4. View Listing Details ๐Ÿ“–

    • See complete listing information
    • View all images in gallery
    • Read reviews and ratings from other users
  5. Add Reviews โญ

    • Logged-in users can submit reviews
    • Rate destinations with star system
    • Add detailed comments
  6. Manage Your Content ๐Ÿ› ๏ธ

    • Edit your own listings
    • Delete your listings
    • Manage your reviews

๐Ÿ› ๏ธ Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB Atlas account
  • Cloudinary account
  • Git

Steps

  1. Clone the repository

    git clone https://github.com/Chhatrapati-sahu-09/-majorproject.git
    cd majorproject
  2. Install dependencies

    npm install
  3. Set up environment variables

    • Create a .env file in the root directory
    • Add the required environment variables (see Environment Variables)
  4. Initialize the database (optional)

    node init/index.js
  5. Start the application

    # Development mode with nodemon
    npm start
    
    # Or production mode
    node app.js
  6. Open in browser

    http://localhost:8080
    

๐Ÿ” Environment Variables

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=development

How to Get Credentials:

MongoDB Atlas:

  1. Go to MongoDB Atlas
  2. Create a cluster
  3. Go to Database Access โ†’ Add user
  4. Go to Network Access โ†’ Add IP (use 0.0.0.0/0 for all IPs or your specific IP)
  5. Get connection string from Connect โ†’ Connect your application

Cloudinary:

  1. Sign up at Cloudinary
  2. Go to Dashboard
  3. Copy your Cloud Name, API Key, and API Secret

๐ŸŽฎ Usage

For Users:

  1. Register/Login to access all features
  2. Browse listings on the homepage
  3. Search using the search bar or filters
  4. Click on any listing to see details
  5. Add reviews to share your experience
  6. Create listings to share new destinations

For Developers:

# Run in development mode
npm start

# Run tests (if configured)
npm test

# Build for production

npm run build

๐Ÿ“ Project Structure

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)

๐Ÿ“ธ Screenshots

1. Homepage โ€“ Explore Travel Listings

Homepage 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.

2. Individual Listing Page โ€“ Full Details View

Listing Details 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.

3. Reviews Section โ€“ User Feedback & Ratings

Create Listing 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.

4. More Listings โ€“ Category-Based Browsing

Search and Filter 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.

5. Signup Page โ€“ Create a New Account

Login/Signup 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.

6. Create a New Listing โ€“ Add a Property

Filtered Listings 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.

7. Search Results โ€“ Query-Based Filtering

Reviews 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.


๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new 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

Chhatrapati Sahu


๐Ÿ™ Acknowledgments

  • 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

๐Ÿ“ž Support

If you have any questions or need help, please:

  • Open an issue on GitHub
  • Contact me via LinkedIn
  • Check the documentation

๐ŸŒŸ Show Your Support

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


Happy Traveling! ๐ŸŒโœˆ๏ธ

About

A full-stack travel listing platform built using Node.js, Express, MongoDB, and EJS. Features include user authentication, CRUD operations, Cloudinary image uploads, reviews & ratings, filtered search, and responsive UI. Deployed on Render.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors