Wanderlust is a modern fullβstack web application for discovering and publishing travel accommodation listings. It delivers an Airbnbβinspired UX with secure auth, image hosting, geocoded locations, ratings & reviews, and a clean responsive design.
Experience Wanderlust live: https://wanderlust-1-f7ft.onrender.com/listings
π The application is deployed on Render and ready to use. Create an account to start exploring and listing properties!
- Live Demo
- Features
- Design Highlights
- Project Structure
- Tech Stack
- Getting Started
- Environment Variables
- Data Models
- Primary Routes
- Security & Validation
- Troubleshooting
- Roadmap
- Contributing
- Acknowledgments
- License
- Secure user registration and login system
- Passport.js integration with local strategy
- Session management with express-session
- User profile management
- Create, edit, and delete property listings
- Upload and manage property images with Cloudinary
- Interactive property details with booking interface
- Location-based mapping with Mapbox integration
- Interactive 5-star rating system
- Add, view, and delete reviews
- User-friendly review cards with avatars
- Review validation and moderation
- Airbnb-inspired interface with professional styling
- Responsive design that works on all devices
- Modern color scheme with CSS custom properties
- Interactive animations and hover effects
- Clean typography with Inter font family
- Card-based layouts with subtle shadows and rounded corners
- Sticky navigation bar with search functionality
- Category filters with active states
- User-friendly dropdown menus
- Mobile-responsive navigation
- Fully responsive layout for all screen sizes
- Touch-friendly interface elements
- Optimized mobile navigation
- Adaptive grid systems
- Color Palette: Professional Airbnb-inspired colors (#FF385C primary red)
- Typography: Modern Inter font with proper weight hierarchy
- Cards: Elevated cards with smooth hover animations
- Filters: Horizontal scrolling category filters with icons
- Forms: Clean, modern authentication forms
- Reviews: Beautiful review cards with user avatars
- Navigation: Sleek navbar with integrated search
Wanderlust/
βββ π app.js # Main application entry point
βββ π§ middleware.js # Custom middleware functions
βββ π schema.js # Joi validation schemas
βββ βοΈ cloudConfig.js # Cloudinary configuration
βββ π models/ # Mongoose data models
β βββ listing.js
β βββ review.js
β βββ user.js
βββ π£οΈ Routes/ # Express route handlers
β βββ listing.js
β βββ reviews.js
β βββ user.js
βββ π§ utils/ # Utility functions
β βββ ExpressError.js
β βββ wrapAsync.js
βββ π¨ public/ # Static assets
β βββ CSS/
β β βββ style.css # Main Airbnb-style CSS
β β βββ rating.css # Star rating styles
β βββ map.js # Mapbox integration
β βββ script.js # Client-side JavaScript
βββ π views/ # EJS templates
β βββ layouts/
β β βββ boilerplate.ejs # Main layout template
β βββ includes/
β β βββ navbar.ejs # Modern navigation bar
β β βββ footer.ejs # Enhanced footer
β β βββ flash.ejs # Flash messages
β β βββ filter.ejs # Category filters
β βββ user/
β β βββ login.ejs # Modern login form
β β βββ signup.ejs # Modern signup form
β βββ index.ejs # Homepage with listings grid
β βββ show.ejs # Property details page
β βββ edit.ejs # Edit listing form
β βββ Newform.ejs # Create listing form
β βββ error.ejs # Error handling page
βββ ποΈ init/ # Database initialization
βββ data.js
βββ index.js
Live Demo: https://wanderlust-1-f7ft.onrender.com/listings
Local Development: The app runs onhttp://localhost:8080
# 1. Clone
git clone https://github.com/Asheesh18-codes/Wanderlust.git
cd Wanderlust
# 2. Install dependencies
npm install
# 3. (Optional) Create .env from template
Copy-Item .env.example .env -ErrorAction SilentlyContinue
# 4. Seed sample data
node init/index.js
# 5. Start server
node app.jsOpen: http://localhost:8080
- Node.js (v14 or higher) & npm
- MongoDB (running locally or MongoDB Atlas)
- Cloudinary account (for image uploads)
- Mapbox account (for interactive maps)
- Clone repository (see Quick Start above).
- Run
npm install. - Create
.env(see below). - Ensure MongoDB service is running locally OR provide an Atlas URI.
- (Optional) Seed database with curated sample listings:
node init/index.js. - Start the server:
node app.js(or add astartscript topackage.json).
| Variable | Description | Required |
|---|---|---|
SESSION_SECRET |
Secret key for session management | β Yes |
MONGODB_URI |
MongoDB connection string | β Yes |
CLOUD_NAME |
Cloudinary cloud name | β Yes |
CLOUD_API_KEY |
Cloudinary API key | β Yes |
CLOUD_API_SECRET |
Cloudinary API secret | β Yes |
MAP_TOKEN |
Mapbox access token | β Yes |
Optional (future enhancements):
NODE_ENV=production(enables secure cookies if you adjust session config)PORT=8080(currently hard-coded; abstract if you prefer deployment flexibility)
Tip: Create an
.env.examplefile to help contributors (a template is recommended β see below).
SESSION_SECRET=change_me
MONGODB_URI=mongodb://127.0.0.1:27017/wanderlust
CLOUD_NAME=xxxx
CLOUD_API_KEY=xxxxxxxxxxxxxxxxxxxx
CLOUD_API_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MAP_TOKEN=pk.eyJ....Commit .env.example β NEVER commit your real .env.
- Node.js - Runtime environment
- Express.js - Web application framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Passport.js - Authentication middleware
- Express-session - Session management
- Joi - Data validation
- Multer - File upload handling
- EJS - Templating engine
- Bootstrap 5 - CSS framework
- Custom CSS - Airbnb-inspired styling
- Font Awesome - Icon library
- Inter Font - Modern typography
- Cloudinary - Image storage and optimization
- Mapbox - Interactive maps and geocoding
- Render - Cloud application hosting
- Method-override - HTTP verb support
- Connect-flash - Flash messaging
- Dotenv - Environment variable management
- CSS custom properties for consistent theming
- Airbnb-inspired color palette and typography
- Smooth animations and micro-interactions
- Mobile-first responsive design
- Image upload with Cloudinary integration
- Interactive maps with Mapbox
- Real-time form validation
- Session-based authentication
- RESTful API architecture
- Efficient database queries with Mongoose
- Image optimization through Cloudinary
- Minimal CSS and JavaScript footprint
- Fast server-side rendering with EJS
| Field | Type | Required | Notes |
|---|---|---|---|
| title | String | β | Listing title |
| description | String | β | Rich text description |
| image.filename | String | β | Defaults to placeholder |
| image.url | String | β | Defaults to Unsplash image |
| price | Number | β | Must be >= 0 |
| location | String | β | City / locality |
| country | String | β | Country name |
| review[] | ObjectId(Review) | β | Autoβdeleted cascade on listing removal |
| owner | ObjectId(User) | β | Authenticated creator |
| geometry | GeoJSON Point | β | [lng, lat] for Mapbox |
| Field | Type | Required | Notes |
|---|---|---|---|
| rating | Number | β | 1β5 |
| comment | String | β | User text |
| author | ObjectId(User) | β | Reference to user |
| created_at | Date | β | Default now |
| Field | Type | Required | Notes |
|---|---|---|---|
| username | String | β | Added by passport-local-mongoose |
| String | β | Unique email | |
| hash/salt | String | β | Managed internally by passport-local-mongoose |
| Method | Path | Purpose | Middleware |
|---|---|---|---|
| GET | / | List all listings | β |
| GET | /new | Render create form | isLoggedIn |
| POST | / | Create new listing | isLoggedIn, upload.single, validateListing |
| GET | /:id | Show listing details | β |
| GET | /:id/edit | Edit form | isLoggedIn, isOwner |
| PUT | /:id | Update listing | isLoggedIn, isOwner, upload.single, validateListing |
| DELETE | /:id | Delete listing | isLoggedIn, isOwner |
| Method | Path | Purpose | Middleware |
|---|---|---|---|
| POST | / | Add review | isLoggedIn, validateReview |
| DELETE | /:reviewId | Delete review | isLoggedIn, isReviewAuthor |
| Method | Path | Purpose |
|---|---|---|
| GET | /signup | Signup form |
| POST | /signup | Create user |
| GET | /login | Login form |
| POST | /login | Authenticate |
| GET | /logout | Destroy session |
- Password hashing & salting via
passport-local-mongoose - Session cookies:
httpOnly(togglesecurefor HTTPS deployments) - Server-side validation: Joi schemas (
schema.js) - Auth guards:
isLoggedIn,isOwner,isReviewAuthor - Controlled file uploads via Multer + Cloudinary storage adapter
- Cascade delete of associated reviews on listing removal
Consider enabling Helmet & rate limiting (
express-rate-limit) in production.
Currently no automated tests. Suggested stack:
- Jest + Supertest for route/integration tests
- MongoDB Memory Server for isolated DB runs
- Lighthouse / Playwright for UX regression (optional)
| Issue | Possible Cause | Fix |
|---|---|---|
| Cannot connect to DB | MongoDB not running | Start local service / check URI |
| Images not uploading | Cloudinary creds invalid | Recreate API key / verify env vars |
| Map not loading | Invalid Mapbox token | Regenerate public token |
| Session not persisting | Missing SESSION_SECRET | Add to .env |
| 404 on edit/delete | Ownership check failing | Ensure logged in as listing owner |
- Add search & advanced filtering (price range, country)
- Favorites / wishlist feature
- Pagination & infinite scroll for listings
- Image gallery & multiβimage uploads
- Email verification & password reset flow
- Enhanced deployment monitoring and logging
- API layer (JSON endpoints) for future SPA/mobile client
The application is currently deployed on Render at: https://wanderlust-1-f7ft.onrender.com/listings
- β Production-ready with secure HTTPS
- β MongoDB Atlas integration
- β Cloudinary for image management
- β Environment variables configured
- β Automatic deployments from main branch
- Run
node --watch app.js(Node 18+) for a lightweight dev reload if you don't add Nodemon. - Use MongoDB Compass to inspect seeded data.
- Validate GeoJSON coordinates are
[longitude, latitude](order matters for Mapbox).
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes with proper commit messages
- Test thoroughly on different screen sizes
- Submit a pull request with a detailed description
- Follow the existing code style and structure
- Ensure mobile responsiveness for any UI changes
- Test authentication flows thoroughly
- Validate all forms on both client and server side
- Airbnb for design inspiration
- Bootstrap team for the excellent CSS framework
- Mapbox for providing amazing mapping services
- Cloudinary for reliable image management
- Render for seamless deployment platform
- The open-source community for the incredible tools and libraries
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Include screenshots for UI-related problems
- Try the live demo first: https://wanderlust-1-f7ft.onrender.com/listings
Made with β€οΈ for travelers around the world
Start your journey with Wanderlust today! π
π Try Live Demo