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.
π Watch StayVerse Demo Video
- 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.)
- 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
- 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
- 5-star rating system for properties
- User reviews with comments and ratings
- Review ownership and management
- Average rating display on property cards
- Responsive design that works on all devices
- Bootstrap-powered interface with custom styling
- Interactive elements with smooth animations
- Flash messages for user feedback
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
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
-
Clone the repository
git clone https://github.com/Praveen-koujalagi/StayVerse.git cd StayVerse
-
Install dependencies
npm install
-
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
-
Start MongoDB
Make sure MongoDB is running on your system:
# For local MongoDB installation mongod # Or use MongoDB Compass for a GUI
-
Initialize the database (Optional)
# Seed sample data npm run check-listings
-
Start the application
# Development mode with auto-reload npm run dev # Or production mode npm start
-
Access the application
Open your browser and navigate to:
http://localhost:8080
- Browse Properties: Visit the homepage to see all available listings
- Filter & Search: Use category filters or the search bar to find specific properties
- View Details: Click on any property to see detailed information, photos, and reviews
- Search by Location: Use the search bar to find properties in specific cities or countries
- Filter by Price: Set price ranges in the search interface
- Register/Login: Create an account or sign in to manage properties
- Add Listings: Click "Add New Listing" to create property listings
- Upload Photos: Add property images through the integrated file upload
- Manage Properties: Edit or delete your own listings
- Monitor Reviews: See reviews and ratings from guests
- Leave Reviews: Rate and review properties you've experienced
- User Profiles: Manage your account and view your activity
- Responsive Design: Use the platform on any device - desktop, tablet, or mobile
# 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)
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 |
- Node.js - JavaScript runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database for data storage
- Mongoose - MongoDB object modeling library
- Passport.js - Authentication middleware
- Express Session - Session management
- Joi - Data validation and sanitization
- Method Override - HTTP verb support
- Multer - File upload handling
- Cloudinary - Cloud-based image storage and optimization
- EJS - Embedded JavaScript templating
- Bootstrap 5 - UI component framework
- Font Awesome - Icon library
- Custom CSS - Enhanced styling and animations
- Nodemon - Development server with auto-restart
- dotenv - Environment variable management
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 |
GET /listings
- Get all listings (with search/filter support)GET /listings/new
- Show create listing formPOST /listings
- Create new listingGET /listings/:id
- Show specific listingGET /listings/:id/edit
- Show edit listing formPUT /listings/:id
- Update listingDELETE /listings/:id
- Delete listing
POST /listings/:id/reviews
- Add review to listingDELETE /listings/:id/reviews/:reviewId
- Delete review
GET /signup
- Show registration formPOST /signup
- Register new userGET /login
- Show login formPOST /login
- Authenticate userPOST /logout
- Logout user
We welcome contributions to StayVerse! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Test thoroughly
- Commit your changes
git commit -m 'Add some amazing feature'
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow existing code style and conventions
- Write clear, descriptive commit messages
- Test your changes thoroughly
- Update documentation when necessary
- Ensure responsive design compatibility
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
Praveen Koujalagi - Full Stack Developer
- π GitHub: @Praveen-koujalagi
- πΌ LinkedIn: Connect with Praveen
- π§ Email: Contact 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.
This project is licensed under the ISC License - see the LICENSE file for details.
- Airbnb - Design inspiration for the user interface
- Bootstrap - UI component framework
- Font Awesome - Beautiful icons
- Cloudinary - Image storage and optimization
- MongoDB - Flexible NoSQL database
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Feature Requests: Request Features
- Developer: Praveen Koujalagi
- GitHub: @Praveen-koujalagi
- Email: praveenkoujalagi@gmail.com
β If you found this project helpful, please give it a star!
π Homepage | π Documentation | π Report Bug | π‘ Request Feature