A beautifully modern travel listing app with secure auth, image uploads, reviews, and geocoding.
Wanderlust is a full-stack travel listing platform where users can discover, create, and manage destination listings with photos, location data, and reviews.
- Create travel listings with destination, price, and image
- Upload listing images directly to Cloudinary
- Save listing location geometry using MapTiler geocoding
- Add and delete reviews for listings
- Securely register, log in, and manage sessions
| Frontend | Backend | Database | Integrations |
|---|---|---|---|
| EJS + EJS Mate | Express | MongoDB / Mongoose | Cloudinary |
| HTML/CSS | Node.js | Passport.js | MapTiler |
| Joi validation | connect-mongo | Multer |
- User registration and login with Passport
- Authorization checks for listing ownership
- Full CRUD for travel listings
- Image upload, storage, and resizing via Cloudinary
- Review creation and deletion
- Request validation using Joi
- Flash messaging for UI notifications
- Session persistence in MongoDB
app.js— main Express application entrypointroutes/— listing, review, and user routingcontrollers/— controller logic for routesmodels/— Mongoose schema modelsviews/— EJS templates and layoutspublic/— static CSS and JS assetsutils/— error handling and Cloudinary upload helpermiddleware.js— authentication and validation middlewarecloudConfig.js— Cloudinary configurationupload.js— Multer file upload setup
-
Clone repository
git clone <repo-url> cd wanderlust
-
Install dependencies
npm install
Create a .env file in the project root with:
ATLASDB_URL=<your MongoDB connection string>
SECRET=<your session secret>
MAPTILER_API_KEY=<your MapTiler API key>
CLOUD_NAME=<your Cloudinary cloud name>
CLOUD_API_KEY=<your Cloudinary API key>
CLOUD_API_SECRET=<your Cloudinary API secret>node app.jsThen open:
http://localhost:8080
/listings— view all listings/listings/new— add a new listing/listings/:id— listing details/listings/:id/edit— edit listing/listings/:id/reviews— add review/signup— register new user/login— login/logout— logout
- Listing image uploads use Cloudinary with in-memory Multer storage.
- Location geocoding is handled with MapTiler forward geocoding.
- Sessions are stored in MongoDB using
connect-mongo. - Protected routes require login and enforce ownership for edits and deletes.
- Add listing search and filters
- Add user profile pages
- Add map display for listing locations
- Add review ratings
- Add automated tests
MIT