WanderLust is a full-stack accommodation booking platform inspired by modern travel rental marketplaces. It lets users explore stays, filter listings by category, view location details on an interactive map, create their own listings, and make bookings through a clean server-rendered interface.
The project also includes:
- user authentication with Passport.js and session-based login
- Cloudinary-powered image uploads for listing photos
- Mapbox geocoding and map display for property locations
- booking management with date-conflict checking
- profile pages for managing personal bookings and owned listings
- Browse Listings: View all available stays in a responsive card-based layout.
- Search and Filter: Find listings by country and category from the homepage.
- Create and Manage Listings: Logged-in users can add, edit, and delete their own properties.
- Image Uploads: Listing images are uploaded with Multer and stored in Cloudinary.
- Map Integration: Each listing includes geocoded coordinates and a Mapbox map preview.
- Booking Flow: Users can book stays by selecting dates, guests, and contact details.
- Booking Conflict Check: Prevents overlapping bookings for the same listing.
- User Accounts: Signup, login, logout, and persistent sessions with Passport Local.
- Profile Dashboard: Users can review their profile, bookings, and owned listings in one place.
- Tax Toggle UI: Listing cards can switch between base price and tax-inclusive pricing.
- Node.js: JavaScript runtime used to run the server.
- Express.js: Backend framework for routes, middleware, and request handling.
- EJS: Server-side templating with layout support.
- MongoDB: Database and ODM for users, listings, and bookings.
- Passport.js: Authentication and session-based login handling.
- Express Session: Session storage backed by MongoDB.
- Cloudinary: Image upload pipeline for listing photos.
- Mapbox SDK: Geocoding and interactive map rendering.
- Joi: Request payload validation for listing forms.
- Bootstrap: UI styling, filters, and booking interactions.
- Listings: CRUD operations for rental listings, including image upload and geocoding.
- Bookings: Booking creation with overlap validation and booking detail pages.
- Users: Account registration, authentication, and profile management.
- Middleware: Authentication guard, ownership checks, redirect handling, and validation.
- Seed Data: Starter listing dataset and initialization script for local setup.
To run this project locally, follow these steps.
- Node.js 20.16.0 or higher
- npm
- A MongoDB database connection string
- A Cloudinary account for image uploads
- A Mapbox access token for geocoding and maps
-
Clone the repository
git clone https://github.com/udayxgoel/WanderLust.git cd WanderLust -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory and add:PORT=4000 MONGODB_URL=your_mongodb_connection_string CLOUD_NAME=your_cloudinary_cloud_name CLOUD_API_KEY=your_cloudinary_api_key CLOUD_API_SECRET=your_cloudinary_api_secret MAP_TOKEN=your_mapbox_access_token SECRET=your_session_secret
-
Optional: seed the database
node init/index.js
-
Start the server
npm start
-
Open the app
Visit http://localhost:4000
- Production/server start:
npm start - Database seed:
node init/index.js
GET /listings- browse all listingsGET /listings/search?country=...- search listings by countryGET /listings/filter/:id- filter listings by categoryGET /listings/new- create listing formGET /listings/:id- listing details pagePOST /listings- create a new listingPUT /listings/:id- update an existing listingDELETE /listings/:id- delete a listingPOST /bookings- create a bookingGET /bookings/:id- view booking detailsGET /user/signup- signup pageGET /user/login- login pageGET /user/profile- user profile dashboard
When a user creates a listing, the app:
- uploads the selected image to Cloudinary
- geocodes the provided address using Mapbox
- stores owner, image, location, and listing details in MongoDB
When a user books a listing, the app:
- checks for overlapping bookings on the same property
- stores the booking with user and listing references
- redirects to a booking confirmation/details page
Contributions are welcome.
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature-name - Make your changes
- Commit:
git commit -m "Add your feature" - Push:
git push origin feature/your-feature-name - Open a pull request
If you find a bug or setup issue, please open an issue with:
- a clear title
- a short description of the problem
- steps to reproduce
- screenshots or logs if relevant
- your environment details
This project is currently licensed under ISC, as defined in package.json.
