π Live Demo: https://ani-wanderlust.onrender.com
Wanderlust is a full-stack property listing web application (inspired by Airbnb) where users can explore available properties, view detailed information, read and post reviews, and even create their own listings.
The platform includes:
- π± Fully responsive UI optimized for mobile, tablet, and desktop
- π Secure user authentication & authorization
- π Session management
- βοΈ Cloud-based image uploading for property photos
- βοΈ Full CRUD operations for listings and reviews
This project was built as the Major Project for the ApnaCollege web development curriculum. It serves to showcase practical, hands-on learning of:
- Backend web architecture
- MVC (Model-View-Controller) design patterns
- RESTful API conventions
- Database management using MongoDB
- Security practices like password hashing and route authorization
Open your terminal and run the following command to clone the repository to your local machine:
git clone https://github.com/your-username/apnacollege---major-project.git
cd apnacollege---major-project(Note: Please replace the URL with your actual GitHub repository URL if it differs.)
Ensure you have Node.js installed, then run from the root directory:
npm installCreate a .env file in the root directory and configure the following credentials:
NODE_ENV=development
SECRET=your_session_secret_string
CLOUD_NAME=your_cloudinary_cloud_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secretnode app.jsThe server will log Server is listening to port 8080. Open your browser and go to http://localhost:8080/listings.
- Backend: Node.js, Express.js
- Database: MongoDB (using Mongoose ODM) with
connect-mongofor session storage - Authentication: Passport.js (
passport-local,passport-local-mongoose) - Templating Engine: EJS (Embedded JavaScript) with
ejs-matefor standardized page layouts - Image Storage: Cloudinary (integrated via
cloudinaryandmulter) - Data Validation: Joi schema validation
- Styling/UI: CSS/Bootstrap (served statically from the
publicdirectory) and Flash messages (connect-flash) for user alerts.
The project strictly follows the MVC (Model-View-Controller) architecture. Here is a high-level overview of the directory structure:
π¦ apna-college-major-project
β£ π controllers # Core logic handling requests and DB operations
β£ π init # Scripts and dummy data to seed the database
β£ π models # Mongoose schemas (Listing, User, Review)
β£ π public # Static assets (CSS, JS, Images)
β£ π routes # Express routers (Listings, Reviews, Users)
β£ π utils # Helper functions (Error Wrappers, Custom Errors)
β£ π views # EJS templates for UI rendering
β β£ π includes # Reusable view partials (navbar, footer, flash)
β β£ π layouts # Boilerplate HTML layouts (ejs-mate)
β β£ π listings # Listing specific views (index, show, new, edit)
β β π users # Authentication views (login, signup)
β£ π .env # Environment variables
β£ π app.js # Main entry point and server configuration
β£ π cloudConfig.js # Cloudinary integration configuration
β£ π middleware.js # Custom Express middlewares (Auth & Validation)
β π schema.js # Server-side Joi validation schemas