WanderLust is a hotel booking web application that allows users to easily browse through various listings and reserve accommodations. It provides a clean interface for travelers to discover unique places to stay and allows hosts to list their properties for rent.
This is my first major fullstack project where I handled both the frontend and backend development. It is built as a functional clone of Airbnb and is designed with a responsive layout to ensure a seamless experience on both mobile phones and desktop computers.
β If this project helped or inspired you, consider giving it a star β it really motivates me to keep building!
Click here to explore unique stays and start your journey! π [ π WanderLust πΊοΈ ]
π‘ Pro Tip: Login is hassle-free! You don't need a real email IDβjust create a dummy account to test features like adding reviews. π
π Try this: Visit the app both as a Guest and while Logged In. The interface is smart enough to detect your status and completely adapts the User Menu and features accordingly!
Want a quick tour instead of clicking every page? π
This video gives a full UI walkthrough of WanderLust β covering all screens, user flows, and interactions from start to finish.
Watch it here! π [ π Walkthrough πΆββοΈ ]
β¨ Built to showcase the experience, not the code β perfect for getting the feel of the product in minutes.
| Immersive Home Page |
|---|
![]() |
| Custom designed landing page with dynamic animations |
| Curated Journeys | Seamless Onboarding | Host Opportunities |
|---|---|---|
![]() |
![]() |
![]() |
| Immersive dark-mode interface for travelers | Clean split-screen UI to guide user choice | Dedicated flow for earning on your terms |
While this project was initially inspired by a tutorial, I have significantly expanded its capabilities, design, and architecture to build a more robust production-ready application. Here are the major custom implementations:
| Feature | Description |
|---|---|
| πΊοΈ Map Integration | Replaced Mapbox with Leaflet.js & Nominatim (OpenStreetMap) to keep the project 100% free and open-source. |
| 𧬠Advanced Init & Seeding | Automated users, listings, images, and reviews with ownership safety and one-command database regeneration. |
| π¨ Landing Page | Designed a completely unique Home Page with modern aesthetics and dynamic animations. |
| π΄ Split Card | Created a diagonal-split-Card using CSS clip-path and custom "Double-Tap" logic for mobile interaction. |
| π Smart Search | Built a robust search logic that intelligently parses City and Country names from user queries. |
| π·οΈ Filters | Implemented category-based filtering (e.g., Farms, Pools, Arctic) for easy discovery. |
| π₯ User Menu | A smart, conditional dropdown menu that changes based on authentication state (Guest vs. User). |
| π§βπ» Animated Logo | Highly styled, custom logo using SVG icons with CSS animations to create a dynamic and engaging visual identity. |
| β Rating System | Pure JS & CSS rating logic. No external libraries used for maximum performance. |
| βοΈ Legal Pages | Added professional Privacy & Terms pages ("Junaid Advocate" edition π). |
- The Challenge: The original tutorial relied on Mapbox, which now requires credit card details for API access.
- My Solution: I completely re-engineered the geolocation system using Leaflet.js for rendering and OpenStreetMap (Nominatim API) for geocoding. This ensures the project remains 100% free and open-source without sacrificing interactive map functionality.
I believe in leveraging modern tools to write cleaner, faster, and more robust code. This project was built using an AI-Assisted Development workflow, treating AI not as a code generator, but as a pair programmer.
- π« "Trust but Verify": I learned when to deny AI code. AI often suggests deprecated packages or "hallucinated" variables. I manually verified every suggestion against documentation.
- π£οΈ Prompt Engineering (Bad Input === Bad Output): I realized AI is only as smart as my instructions. Learning to write specific, context-aware prompts saved hours of debugging.
- π§± Bridging the Knowledge Gap: AI helped me implement professional features I had never touched before (like Cron Jobs and Leaflet Maps) by explaining the logic, not just giving the code.
| Category | Technologies |
|---|---|
| π¨ Frontend | |
| βοΈ Backend | |
| π½ Database | |
| πΊοΈ Maps & Tools |
Beyond the beautiful UI, WanderLust is built on a robust full-stack architecture. Here is a breakdown of the complex engineering challenges powering the application.
| Category | Feature | Technical Implementation |
|---|---|---|
| π§ Core Logic | Full MVC Architecture | Built with a scalable Model-View-Controller pattern to keep code clean and modular. |
| π Security | Authentication & AuthZ | Secure login using Passport.js (Salt/Hash) π‘οΈ + Middleware for strict route protection. |
| π§ͺ Data | Automated DB Seeding | One-command database regeneration with realistic demo data and ownership-safe review logic. |
| πΊοΈ UX/UI | Interactive Maps | Integrated Leaflet APIs for dynamic location pinning and geocoding π. |
| π± Mobile | Touch-Optimized UI | Custom "Double-Tap" logic π to handle complex animations smoothly on touch devices. |
| βοΈ Data | Cloud Image Storage | Optimized image uploading and storage handling using Cloudinary πΈ. |
| π§ Safety | Server-Side Validation | robust data validation with Joi to prevent injection attacks and ensure data integrity. |
| π¬ Feedback | Flash Messages | Real-time success/error notifications using Express-Flash for better user guidance β¨. |
WanderLust follows a strict MVC (Model-View-Controller) architecture to ensure scalability and code maintainability.
WanderLust/
β
βββ π controllers/ π (Logic handling)
β βββ π listings.js
β βββ π reviews.js
β βββ π users.js
β
βββ π init/ π (Database initialization & regeneration)
β β
β βββ π advanceData/ π Pure seed data (NO logic)
β β βββ π listings.js
β β βββ π reviews.js
β β βββ π users.js
β β
β βββ π seedUsers.js π (Bulk user creation)
β βββ π seedListingsAndReviews.js π (Listings + reviews with ownership rules)
β βββ π init.js π (One-command DB reset pipeline)
β
βββ π models/ π (Mongoose Schemas)
β βββ π½ listing.js
β βββ π½ review.js
β βββ π½ user.js
β
βββ π node_modules/ βοΈ (Dependencies - Git Ignored)
β
βββ π public/ π (Static Assets)
β β
β βββ π assets/ πΈ (Images & Icons)
β β βββ πΌοΈ card-1.avif ... card-5.avif
β β βββ πΌοΈ compass.svg
β β βββ πΌοΈ hero.avif
β β βββ πΌοΈ travel.avif
β β βββ πΌοΈ home-page.png
β β βββ πΌοΈ mobile-view-1.jpg ... mobile-view-3.jpg
β β
β βββ π css/ π¨ (Modular Styling)
β β βββ π¨ home.css
β β βββ π¨ index.css
β β βββ π¨ show.css
β β βββ π¨ style.css
β β
β βββ π js/ β¨ (Client-Side Logic)
β βββ β¨ home.js
β βββ β¨ index.js
β βββ β¨ script.js
β βββ β¨ show.js
β
βββ π routes/ π (Express Routers)
β βββ π¦ index.js
β βββ π¦ listing.js
β βββ π¦ review.js
β βββ π¦ user.js
β
βββ π utils/ π (Helpers)
β βββ π οΈ category.js
β βββ π οΈ ExpressError.js
β βββ π οΈ geoData.js
β
βββ π views/ π (EJS Templates)
β β
β βββ π includes/ π§© (Partials)
β β βββ π compass_icon.ejs
β β βββ π flash.ejs
β β βββ π footer.ejs
β β βββ π map_pin_icon.ejs
β β βββ π navbar.ejs
β β
β βββ π layouts/ ποΈ (Base Layout)
β β βββ π boilerplate.ejs
β β
β βββ π listings/ π (Property Pages)
β β βββ π edit.ejs
β β βββ π error.ejs
β β βββ π index.ejs
β β βββ π new.ejs
β β βββ π show.ejs
β β
β βββ π pages/ π (Custom Static Pages)
β β βββ π home.ejs
β β βββ π privacy.ejs
β β βββ π terms.ejs
β β
β βββ π users/ π€ (Auth Forms)
β βββ π login.ejs
β βββ π signup.ejs
β
βββ βοΈ .env π (Local Config - Git Ignored)
βββ βοΈ .gitignore
βββ π app.js (Entry Point)
βββ βοΈ cloudConfig.js (Cloudinary Setup)
βββ βοΈ LICENSE (MIT License)
βββ π middleware.js (Auth Guards)
βββ π¦ package-lock.json (Dependency Tree)
βββ π¦ package.json
βββ π README.md
βββ π‘οΈ schema.js (Joi Validation)Seamless logic meets complex architecture. This flowchart visualizes the complete end-to-end data flow, from the custom split-landing interaction to secure cloud storage and database operations.
graph TD
A[Start: User Visits App π] --> B[π¨ Split-Landing Hero Page]
%% Global Feature (Added quotes below to fix the error)
B -- "Always Available" --> Z["π€ Smart User Menu (Guest/User)"]
B --> C{Choose Path}
%% Traveler Flow
C -- "Traveler (Explore)" --> D[Explore Listings with Leaflet Map πΊοΈ]
D --> F[Select Property]
%% Host Flow (Get Started)
C -- "Become a Host" --> G{Is User Logged In?}
%% Auth Logic
G -- No --> E[Login / Signup π]
E --> G
%% Create Listing Logic
G -- Yes --> J[Create New Listing Form π]
J --> K[Upload Images to Cloudinary βοΈ]
K --> L[Server-Side Joi Validation π‘οΈ]
L --> M[Save to MongoDB Atlas π½]
M --> N[π Live Listing on Render]
%% Booking Logic
F --> G
G -- Yes --> H[Book Stay / Leave Review π¬]
H --> O((Happy User β¨))
N --> O
Building WanderLust transformed my theoretical knowledge into production-grade engineering skills.
| π Domain | π Key Takeaways & Skills Mastered |
|---|---|
| ποΈ Architecture | Mastered the MVC (Model-View-Controller) pattern, decoupling logic to ensure the codebase is scalable and maintainable. |
| π½ Database Engineering | Designed complex One-to-Many relationships in MongoDB (connecting Users β Listings β Reviews) and handled cascading deletes. |
| π€ AI-Pair Programming | Leveraged Generative AI for architectural planning, debugging complex logic errors, and optimizing documentation workflows (Prompt Engineering). |
| π Security | Implemented robust security measures including Session-based Authentication (Passport.js), Joi Validation, and Environment Variable protection. |
| β‘ Performance Ops | Solved the "Cold Start" problem on Render by implementing Cron Jobs to keep the server active and responsive. |
| π API Integration | Replaced paid mapping services with Open-Source alternatives (Leaflet + Nominatim), mastering asynchronous data handling. |
Want to run this project locally? Follow these simple steps.
1. Clone the repository
git clone https://github.com/JunaidUsmani2468/WanderLust.git
cd WanderLust2. Install Dependencies
npm install3. Configure Environment Variables
Create a .env file in the root directory and add the following keys:
CLOUD_NAME=your_cloudinary_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret
ATLASDB_URL=your_mongodb_connection_string
MY_SECRET=your_session_secret4. Start the Application
node app.js5. Visit the app
http://localhost:80806. Database Regeneration
This project uses one shared password for all seeded demo users (defined via environment variables).
Add this to your .env file:
SEED_USER_PASSWORD=your_strong_dev_passwordThen regenerate the database with demo users, listings, images, and reviews:
node init/init.js
β οΈ This command clears existing data and is intended for local development only.
WanderLust is production-ready and deployed using modern cloud infrastructure.
| Service | Role |
|---|---|
| Render | Full-stack hosting with CI/CD integration for automated deployments. |
| MongoDB Atlas | Managed Cloud Database ensuring high availability and data persistence π½. |
| Cloudinary | Content Delivery Network (CDN) for optimized image storage and serving β‘. |
| Cron-job.org | Automated "Keep-Alive" pings to prevent server sleep and eliminate cold-start latency β‘. |
β‘ Performance Note: I configured an external Cron Job to ping the server every 14 minutes. This prevents the Render free-tier from "sleeping," ensuring instant load times for all users.
Open source is at the heart of this project. While this is primarily a portfolio piece, I welcome any suggestions or optimizations!
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch.
- Open a Pull Request.
Credit where credit is due. This project was built on the strong foundation laid by Shradha Khapra and the Apna College team.
- The Mentor: A massive thank you to Shradha Ma'am for making complex concepts like MVC Architecture, Middlewares, and Database Relations feel easy. Her teaching style didn't just help me copy code; it taught me how to think like a developer. π§
- The "Sigma" Boost: The "Sigma Batch" provided the roadmap, but her encouragement gave me the confidence to go off-road, switch to Leaflet, integrate Cron Jobs, and truly own this project. π
- The Community: Special thanks to the open-source contributors behind Passport.js, Leaflet, and Mongoose who make tools we love.
Distributed under the MIT License. See LICENSE for more information.



