Ventara
A full-stack Airbnb-inspired platform built with Node.js, Express, and MongoDB, featuring secure auth, cloud image uploads, and map integration.
Project Overview
Ventara is a full-stack web application inspired by Airbnb, designed to let users discover, host, edit, and manage travel listings. Built with the MERN-style architecture (MongoDB + Express + Node) using EJS templating, it delivers a seamless and responsive booking-like experience for travel enthusiasts and hosts. Users can browse listings, view property details, sign up/log in, manage their own listings, and leave reviews.
Core Features
- Authentication & Security: Secure user registration and login using Passport.js. Passwords are salted and hashed, and persistent sessions are managed with `connect-mongo`.
- Cloud Image Management: `Multer` handles form uploads, while `Cloudinary` provides cloud-based storage, optimization, and delivery of all listing images.
- Database & Validation: Built on MongoDB with Mongoose for schema definition. `Joi` is used for server-side validation to ensure all data is secure and structured.
- Search & Filtering: Smart fuzzy search implemented with `Fuse.js` for case-insensitive queries, alongside category filters to enhance discovery.
- Interactive Maps: `Mapbox SDK` integration visualizes the location of each listing, providing essential context to users.
- Dynamic CRUD Operations: Users have full control to Create, Read, Update, and Delete their own listings, including image uploads and real-time form validation.
The Logic: Image Uploads with Multer & Cloudinary
A key part of this full-stack app is handling image uploads. This logic shows how Express, Multer, and Cloudinary work together to receive a file from a user, upload it to the cloud, and save the URL to MongoDB—all in one route handler.
// 1. Setup Cloudinary Storage (cloudinary/index.js)
const cloudinary = require('cloudinary').v2;
const { CloudinaryStorage } = require('multer-storage-cloudinary');
cloudinary.config({
cloud_name: process.env.CLOUD_NAME,
api_key: process.env.CLOUD_API_KEY,
api_secret: process.env.CLOUD_API_SECRET
});
const storage = new CloudinaryStorage({
cloudinary: cloudinary,
params: {
folder: 'Ventara',
allowedFormats: ['jpeg', 'png', 'jpg']
}
});
// 2. Create Multer Middleware (middleware.js)
const multer = require('multer');
const upload = multer({ storage });
// 3. Use Middleware in Express Route (routes/listings.js)
router.post(
'/',
isLoggedIn,
upload.single('listing[image]'), // Multer processes the image first
validateListing,
async (req, res) => {
// req.file now contains the Cloudinary data
let listing = new Listing(req.body.listing);
listing.owner = req.user._id;
// Save the image URL from Cloudinary to the new listing
listing.image = { url: req.file.path, filename: req.file.filename };
await listing.save();
req.flash('success', 'Successfully created a new listing!');
res.redirect(`/listings/${listing._id}`);
}
);
Technology Stack
This project was built with a modern MERN-style backend and a server-side rendered frontend, utilizing a wide range of powerful Node.js packages.
Learning Outcomes
Ventara was a comprehensive project that solidified my full-stack development skills. I mastered RESTful architecture with Express.js and learned to implement a complete authentication system from scratch. Handling image uploads to a cloud service like Cloudinary was a significant challenge that taught me how to work with multipart forms and third-party storage APIs.
This project reflects a complete skill set: from backend logic and database management with MongoDB to secure authentication and a clean, dynamic UI with EJS. It demonstrates my ability to design and build a scalable, feature-rich web application from the ground up.