Wanderlust is a fullβstack travel listing web application inspired by Airbnb. It enables users to create, browse, and manage travel destinations with secure authentication, image uploads, and modern UI templates.
- Backend: Node.js, Express.js, MongoDB (Mongoose)
- Templating: EJS + ejs-mate
- Authentication: Passport.js (Local Strategy), Sessions
- Image Uploads: Multer + Cloudinary
- Validation: Joi
- Styling: Bootstrap / Custom CSS
- Utilities: Method-Override, Connect-Flash, Dotenv
- β User Registration & Login with Passport.js
- β Create, Update & Delete travel listings
- β Upload multiple images via Cloudinary
- β Server-side validation with Joi
- β Flash messages & error handling
- β Session-based authentication with MongoDB store
- β Fully functional CRUD routes
- β Mobile-responsive EJS templates
wanderlust/
βββ app.js # Main server file
βββ package.json # Dependencies & scripts
βββ .env # Environment variables (not committed)
βββ /models # Mongoose schemas
βββ /routes # Express routes
βββ /views # EJS templates
βββ /public # Static assets (CSS, JS, images)
βββ /utils # Utility functions
Tip: If your tree doesnβt render in some viewers, ensure the block is fenced with triple backticks and a language hint like
text.
Create a .env file in the project root with the following keys:
CLOUD_NAME=your_cloudinary_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_secret
MONGODB_URI=your_mongodb_connection_uri
SECRET=your_session_secretgit clone https://github.com/vishxlkr/wanderlust.git
cd wanderlustnpm installnpm run serverApp will be available at: http://localhost:3000
Prerequisites: Node.js (compatible with the version specified in
package.json), a running MongoDB instance (or Atlas), and a Cloudinary account.
GET / # Home page
GET /listings # Show all listings
POST /listings # Create new listing
GET /listings/:id # Show single listing
PUT /listings/:id # Update listing
DELETE /listings/:id # Delete listing
GET /register # User registration form
POST /register # Register new user
GET /login # Login form
POST /login # Login user
GET /logout # Logout user{
"engines": {
"node": "22.14.0"
},
"name": "wanderlust",
"version": "1.0.0",
"description": "A travel listing web application built with Node.js, Express, and MongoDB.",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"server": "node app.js"
},
"keywords": ["travel", "express", "nodejs", "mongodb", "passport"],
"author": "Vishal Kumar",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"cloudinary": "^1.41.3",
"connect-flash": "^0.1.1",
"connect-mongo": "^5.1.0",
"dotenv": "^17.2.1",
"ejs": "^3.1.10",
"ejs-mate": "^4.0.0",
"express": "^4.18.2",
"express-session": "^1.18.2",
"joi": "^17.13.3",
"method-override": "^3.0.0",
"mongoose": "^8.14.3",
"multer": "^2.0.2",
"multer-storage-cloudinary": "^4.0.0",
"passport": "^0.7.0",
"passport-local": "^1.0.0",
"passport-local-mongoose": "^8.0.0"
}
}
Vishal Kumar GitHub: https://github.com/vishxlkr
This project is licensed under the ISC License.