Skip to content

JEETJM/zenvyra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Zenvyra

HTML CSS JavaScript Bootstrap NodeJS ExpressJS MongoDB EJS Render GitHub

🌐 Live Demo

πŸ”— https://zenvyra-app.onrender.com

πŸ“¦ GitHub Repository

πŸ”— https://github.com/JEETJM/zenvyra


🌟 Project Overview

Zenvyra is a feature-rich full-stack rental listing platform inspired by Airbnb.

It allows users to:

  • Discover rental properties 🌍
  • Create & manage listings 🏠
  • Upload images ☁️
  • Leave reviews ⭐
  • Explore locations via interactive maps πŸ—ΊοΈ

⚑ Built with a scalable MVC architecture, ensuring clean code and maintainability.


🎯 Advanced Features (Detailed)

🏠 1. Listing Management System

  • Create new listings with full details
  • Update existing listings
  • Delete listings securely
  • Dynamic rendering of listings
  • Server-side validation (Joi)
// Example: Create Listing
router.post("/", isLoggedIn, validateListing, async (req, res) => {
  const newListing = new Listing(req.body.listing);
  newListing.author = req.user._id;
  await newListing.save();
  res.redirect("/listings");
});

⭐ 2. Review System

  • Add reviews to listings
  • Delete reviews by owner
  • Rating-based feedback system
  • Relational linking (Listing ↔ Reviews)
// Example: Add Review
router.post("/", isLoggedIn, async (req, res) => {
  const listing = await Listing.findById(req.params.id);
  const review = new Review(req.body.review);
  review.author = req.user._id;

  listing.reviews.push(review);
  await review.save();
  await listing.save();
});

πŸ‘€ 3. Authentication & Authorization

  • Secure login/signup system
  • Passport.js Local Strategy
  • Session-based authentication
  • Protected routes (middleware)
  • Role-based access (optional extension)
passport.use(new LocalStrategy(User.authenticate()));
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());

πŸ–ΌοΈ 4. Image Upload System (Cloudinary + Multer)

  • Upload images from frontend
  • Store in Cloudinary
  • Save image URL + filename in DB
  • Optimized image handling
const storage = new CloudinaryStorage({
  cloudinary: cloudinary,
  params: {
    folder: "Zenvyra/listings",
  },
});

πŸ—ΊοΈ 5. Map Integration (Mapbox)

  • Display location on map
  • Marker popup with listing details
  • Forward & reverse geocoding
mapboxgl.accessToken = MAP_TOKEN;
const map = new mapboxgl.Map({
  container: "map",
  style: "mapbox://styles/mapbox/streets-v11",
});

πŸ” 6. Search & Filtering System

  • Search by:

    • Title
    • Location
    • Country
  • Dynamic filtering logic

  • Scalable for categories (future)


🎨 7. UI / UX (Premium Design)

  • Fully responsive design πŸ“±
  • Dark / Light mode toggle πŸŒ™
  • Animated buttons & cards
  • Smooth transitions
  • Clean modern layout

⚑ 8. Backend Architecture

  • MVC pattern
  • Modular routing
  • Custom middleware
  • Centralized error handling
  • Async wrapper (WrapAsync)
module.exports = (fn) => {
  return function (req, res, next) {
    fn(req, res, next).catch(next);
  };
};

πŸ” 9. Security Features

  • Password hashing & salting
  • Session management
  • Secure cookies
  • Input validation (Joi)
  • Protection against invalid requests

πŸ› οΈ Tech Stack

πŸ’» Frontend

  • HTML5
  • CSS3 (Animations)
  • JavaScript
  • Bootstrap
  • EJS

βš™οΈ Backend

  • Node.js
  • Express.js

πŸ—„οΈ Database

  • MongoDB
  • Mongoose

πŸ” Authentication

  • Passport.js
  • express-session

☁️ Services

  • Cloudinary
  • Mapbox
  • Render

πŸ“‚ Project Structure (Detailed)

zenvyra/
β”‚
β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ listings.js
β”‚   β”œβ”€β”€ reviews.js
β”‚   └── users.js
β”‚
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ listing.js
β”‚   β”œβ”€β”€ review.js
β”‚   └── user.js
β”‚
β”œβ”€β”€ Routes/
β”‚   β”œβ”€β”€ listings.js
β”‚   β”œβ”€β”€ reviews.js
β”‚   └── users.js
β”‚
β”œβ”€β”€ views/
β”‚   β”œβ”€β”€ listings/
β”‚   β”‚   β”œβ”€β”€ index.ejs
β”‚   β”‚   β”œβ”€β”€ show.ejs
β”‚   β”‚   β”œβ”€β”€ new.ejs
β”‚   β”‚   └── edit.ejs
β”‚   β”‚
β”‚   β”œβ”€β”€ reviews/
β”‚   β”œβ”€β”€ users/
β”‚   β”œβ”€β”€ includes/
β”‚   β”‚   β”œβ”€β”€ navbar.ejs
β”‚   β”‚   └── footer.ejs
β”‚   β”‚
β”‚   └── layouts/
β”‚
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ css/
β”‚   └── js/
β”‚
β”œβ”€β”€ uploads/
β”œβ”€β”€ utils/
β”œβ”€β”€ init/
β”‚
β”œβ”€β”€ app.js
β”œβ”€β”€ middleware.js
β”œβ”€β”€ cloudConfig.js
β”œβ”€β”€ Schema.js
β”œβ”€β”€ .env
└── package.json

βš™οΈ Installation Guide

git clone https://github.com/JEETJM/zenvyra.git
cd zenvyra
npm install

πŸ” Environment Variables

MONGO_URL=your_mongodb_url
CLOUD_NAME=your_cloudinary_name
CLOUD_API_KEY=your_key
CLOUD_API_SECRET=your_secret
MAP_TOKEN=your_mapbox_token
SESSION_SECRET=your_secret

▢️ Run Project

npm run dev

or

node app.js

πŸš€ Future Enhancements

  • ❀️ Wishlist system
  • 🏨 Booking system
  • πŸ’³ Payment gateway
  • πŸ§‘β€πŸ’» Admin dashboard
  • πŸ’¬ Real-time chat
  • πŸ“Š Analytics dashboard

πŸ‘¨β€πŸ’» Author

Jeet Mondal


πŸ’™ Support

⭐ Star this repo 🍴 Fork it πŸ“’ Share it


πŸ”₯ Built with Passion by JEET MONDAL πŸ”₯

About

"Building the Future with Code"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors