Skip to content

Praveen-koujalagi/StayVerse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 StayVerse

License: ISC Node.js MongoDB

A modern, full-stack vacation rental platform inspired by Airbnb. Built with Node.js, Express, and MongoDB, featuring property listings, user authentication, reviews, and an intuitive search system.

πŸŽ₯ Project Demo

πŸ‘‰ Watch StayVerse Demo Video

✨ Features

🏑 Property Management

  • Browse vacation rental properties with beautiful card layouts
  • Upload and manage property images via Cloudinary integration
  • Detailed property pages with descriptions, pricing, and location info
  • Property categorization with 10+ types (apartments, villas, cabins, etc.)

πŸ” Smart Search & Filtering

  • Airbnb-style search bar with location and price range filtering
  • Category filters with Font Awesome icons for property types
  • Mobile-responsive search interface with overlay design
  • Real-time search results with visual feedback

πŸ‘€ User Authentication

  • Secure user registration and login with Passport.js
  • Session management with Express sessions
  • User ownership and authorization for property management
  • Protected routes for authenticated actions

⭐ Reviews & Ratings

  • 5-star rating system for properties
  • User reviews with comments and ratings
  • Review ownership and management
  • Average rating display on property cards

πŸ“± Modern UI/UX

  • Responsive design that works on all devices
  • Bootstrap-powered interface with custom styling
  • Interactive elements with smooth animations
  • Flash messages for user feedback

πŸ— Project Structure

StayVerse/
β”œβ”€β”€ πŸ“ controllers/          # Route logic and business operations
β”‚   β”œβ”€β”€ listings.js          # Property CRUD operations
β”‚   β”œβ”€β”€ reviews.js           # Review management
β”‚   └── users.js             # User authentication
β”œβ”€β”€ πŸ“ models/               # MongoDB data models
β”‚   β”œβ”€β”€ listing.js           # Property model with categories
β”‚   β”œβ”€β”€ review.js            # Review and rating model
β”‚   └── user.js              # User authentication model
β”œβ”€β”€ πŸ“ routes/               # Express route definitions
β”‚   β”œβ”€β”€ listings.js          # Property routes (/listings)
β”‚   β”œβ”€β”€ review.js            # Review routes
β”‚   └── user.js              # Auth routes (/login, /signup)
β”œβ”€β”€ πŸ“ views/                # EJS templates
β”‚   β”œβ”€β”€ πŸ“ listings/         # Property-related views
β”‚   β”œβ”€β”€ πŸ“ users/            # Authentication views
β”‚   β”œβ”€β”€ πŸ“ layouts/          # Page layouts
β”‚   └── πŸ“ includes/         # Reusable components
β”œβ”€β”€ πŸ“ public/               # Static assets
β”‚   β”œβ”€β”€ πŸ“ css/              # Custom stylesheets
β”‚   └── πŸ“ js/               # Client-side JavaScript
β”œβ”€β”€ πŸ“ scripts/              # Database utilities
β”‚   β”œβ”€β”€ check-listings.js    # Database inspection
β”‚   β”œβ”€β”€ update-categories.js # Category migration
β”‚   └── README.md            # Scripts documentation
β”œβ”€β”€ πŸ“ utils/                # Helper utilities
β”œβ”€β”€ πŸ“ init/                 # Database initialization
β”œβ”€β”€ app.js                   # Main Express application
β”œβ”€β”€ schema.js                # Joi validation schemas
└── cloudConfig.js           # Cloudinary configuration

πŸš€ Getting Started

Prerequisites

Before running StayVerse, ensure you have:

  • Node.js (v18.0.0 or higher)
  • MongoDB (v6.0 or higher) - running locally or MongoDB Atlas
  • Cloudinary account - for image storage and management

Installation

  1. Clone the repository

    git clone https://github.com/Praveen-koujalagi/StayVerse.git
    cd StayVerse
  2. Install dependencies

    npm install
  3. Environment Setup

    Create a .env file in the root directory:

    # Cloudinary Configuration (Required)
    CLOUDINARY_CLOUD_NAME=your_cloud_name_here
    CLOUDINARY_API_KEY=your_api_key_here
    CLOUDINARY_API_SECRET=your_api_secret_here
    
    # Optional: Database URL (defaults to local MongoDB)
    MONGODB_URL=mongodb://127.0.0.1:27017/stayverse
    
    # Optional: Server Port (defaults to 8080)
    PORT=8080
  4. Start MongoDB

    Make sure MongoDB is running on your system:

    # For local MongoDB installation
    mongod
    
    # Or use MongoDB Compass for a GUI
  5. Initialize the database (Optional)

    # Seed sample data
    npm run check-listings
  6. Start the application

    # Development mode with auto-reload
    npm run dev
    
    # Or production mode
    npm start
  7. Access the application

    Open your browser and navigate to: http://localhost:8080

🎯 Usage

For Guests (Browsing)

  1. Browse Properties: Visit the homepage to see all available listings
  2. Filter & Search: Use category filters or the search bar to find specific properties
  3. View Details: Click on any property to see detailed information, photos, and reviews
  4. Search by Location: Use the search bar to find properties in specific cities or countries
  5. Filter by Price: Set price ranges in the search interface

For Hosts (Property Owners)

  1. Register/Login: Create an account or sign in to manage properties
  2. Add Listings: Click "Add New Listing" to create property listings
  3. Upload Photos: Add property images through the integrated file upload
  4. Manage Properties: Edit or delete your own listings
  5. Monitor Reviews: See reviews and ratings from guests

For All Users

  1. Leave Reviews: Rate and review properties you've experienced
  2. User Profiles: Manage your account and view your activity
  3. Responsive Design: Use the platform on any device - desktop, tablet, or mobile

πŸ›  Available Scripts

# Development & Production
npm start              # Start the production server
npm run dev            # Start with nodemon for development

# Database Utilities
npm run check-listings      # Inspect current database state
npm run update-categories   # Migrate categories for filter system
npm run migrate-categories  # Setup categories for new installations

# Testing
npm test               # Run test suite (when implemented)

🏷 Property Categories

StayVerse supports 10 property categories, each with unique icons:

Category Icon Description
🏒 Apartment fa-building Modern city apartments and flats
🏠 House fa-home Traditional houses and homes
πŸ–οΈ Villa fa-warehouse Luxury villas and vacation homes
🌲 Cabin fa-tree Mountain cabins and forest retreats
🏨 Hotel fa-bed Hotel rooms and suites
🏝️ Resort fa-umbrella-beach Resort accommodations
🏑 Cottage fa-campground Countryside cottages
πŸ™οΈ Loft fa-city Urban lofts and converted spaces
🎨 Studio fa-paint-brush Studio apartments
πŸ‘‘ Penthouse fa-crown Luxury penthouses

πŸ”§ Technology Stack

Backend

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

Authentication & Security

  • Passport.js - Authentication middleware
  • Express Session - Session management
  • Joi - Data validation and sanitization
  • Method Override - HTTP verb support

File Upload & Storage

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

Frontend

  • EJS - Embedded JavaScript templating
  • Bootstrap 5 - UI component framework
  • Font Awesome - Icon library
  • Custom CSS - Enhanced styling and animations

Development Tools

  • Nodemon - Development server with auto-restart
  • dotenv - Environment variable management

πŸ”‘ Environment Variables

Variable Required Description Default
CLOUDINARY_CLOUD_NAME βœ… Yes Your Cloudinary cloud name -
CLOUDINARY_API_KEY βœ… Yes Your Cloudinary API key -
CLOUDINARY_API_SECRET βœ… Yes Your Cloudinary API secret -
MONGODB_URL ❌ No MongoDB connection string mongodb://127.0.0.1:27017/stayverse
PORT ❌ No Server port number 8080
NODE_ENV ❌ No Environment mode development

πŸ“± API Endpoints

Listings

  • GET /listings - Get all listings (with search/filter support)
  • GET /listings/new - Show create listing form
  • POST /listings - Create new listing
  • GET /listings/:id - Show specific listing
  • GET /listings/:id/edit - Show edit listing form
  • PUT /listings/:id - Update listing
  • DELETE /listings/:id - Delete listing

Reviews

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

Authentication

  • GET /signup - Show registration form
  • POST /signup - Register new user
  • GET /login - Show login form
  • POST /login - Authenticate user
  • POST /logout - Logout user

🀝 Contributing

We welcome contributions to StayVerse! Here's how you can help:

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

Development Guidelines

  • Follow existing code style and conventions
  • Write clear, descriptive commit messages
  • Test your changes thoroughly
  • Update documentation when necessary
  • Ensure responsive design compatibility

πŸ› Troubleshooting

Common Issues

MongoDB Connection Error

Error: connect ECONNREFUSED 127.0.0.1:27017
  • Solution: Ensure MongoDB is running locally or check your MongoDB Atlas connection string

Cloudinary Upload Error

Error: Must supply api_key
  • Solution: Check your .env file has valid Cloudinary credentials

Port Already in Use

Error: listen EADDRINUSE: address already in use :::8080
  • Solution: Kill the process using the port or change the PORT in .env

Module Not Found

Error: Cannot find module 'package-name'
  • Solution: Run npm install to install all dependencies

οΏ½β€πŸ’» Developer

Praveen Koujalagi - Full Stack Developer

StayVerse represents a comprehensive full-stack web application demonstrating modern web development practices, user authentication, database design, cloud integration, and responsive UI/UX implementation.

οΏ½πŸ“„ License

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

πŸ™ Acknowledgments

  • Airbnb - Design inspiration for the user interface
  • Bootstrap - UI component framework
  • Font Awesome - Beautiful icons
  • Cloudinary - Image storage and optimization
  • MongoDB - Flexible NoSQL database

πŸ“ž Support & Contact

πŸ› Project Support

πŸ‘¨β€πŸ’» Developer Contact


⭐ If you found this project helpful, please give it a star!

🏠 Homepage | πŸ“š Documentation | πŸ› Report Bug | πŸ’‘ Request Feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published