{"id":17504658,"url":"https://github.com/joel112003/wanderlust","last_synced_at":"2026-04-01T17:29:16.046Z","repository":{"id":257887378,"uuid":"866499115","full_name":"Joel112003/WanderLust","owner":"Joel112003","description":"Wanderlust - A application build using js and its framework(express.js) ","archived":false,"fork":false,"pushed_at":"2024-12-14T08:42:22.000Z","size":5987,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T05:48:31.755Z","etag":null,"topics":["bootstrap","express-js","git","github","html-css-javascript","mongodb-atlas","node-js"],"latest_commit_sha":null,"homepage":"https://wanderlust-gs2w.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Joel112003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T11:25:24.000Z","updated_at":"2024-12-14T08:42:26.000Z","dependencies_parsed_at":"2024-12-08T12:21:59.307Z","dependency_job_id":"f3651e15-d637-4f53-83e4-b77094d97149","html_url":"https://github.com/Joel112003/WanderLust","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"112b0eafbd1d3fe9f8f4b6e3d18529ea5c0ae03f"},"previous_names":["joel112003/wanderlust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joel112003%2FWanderLust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joel112003%2FWanderLust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joel112003%2FWanderLust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joel112003%2FWanderLust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joel112003","download_url":"https://codeload.github.com/Joel112003/WanderLust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100458,"owners_count":20723469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","express-js","git","github","html-css-javascript","mongodb-atlas","node-js"],"created_at":"2024-10-20T01:15:22.471Z","updated_at":"2026-04-01T17:29:16.033Z","avatar_url":"https://github.com/Joel112003.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#                                                       🏡 WanderLust\n\nA full-stack travel accommodation platform where hosts can list their properties and travelers can discover, book, and review unique stays around the world. Think of it as a simplified Airbnb — built from scratch with real payments, real-time messaging, and an admin dashboard.\n\n![Node.js](https://img.shields.io/badge/Node.js-v20.15-339933?logo=nodedotjs\u0026logoColor=white)\n![React](https://img.shields.io/badge/React-18.3-61DAFB?logo=react\u0026logoColor=black)\n![MongoDB](https://img.shields.io/badge/MongoDB-Atlas-47A248?logo=mongodb\u0026logoColor=white)\n![Express.js](https://img.shields.io/badge/Express.js-Backend-339933?logo=express\u0026logoColor=white)\n![Socket.IO](https://img.shields.io/badge/Socket.IO-Realtime-339933?logo=socketdotio\u0026logoColor=white)\n\n\n---\n\n## What's Inside\n\nThis isn't a tutorial project. It's got actual features people use:\n\n- **Browse \u0026 Search** — Filter listings by category, location, price range, and more\n- **Book \u0026 Pay** — Integrated with [Razorpay](https://razorpay.com/) for real payment processing (test mode)\n- **Real-Time Chat** — Guests and hosts can message each other instantly via Socket.IO\n- **Reviews \u0026 Ratings** — Leave detailed reviews with aspect-based ratings (cleanliness, accuracy, etc.)\n- **Host Dashboard** — Manage your listings, track bookings, handle cancellations\n- **Admin Panel** — Full dashboard with user management, listing approvals, review moderation, and PDF reports\n- **Trust \u0026 Safety** — Host reliability scores, review authenticity checks, listing verification system\n- **Wishlist** — Save your favorite listings\n- **Notifications** — Get notified about bookings, cancellations, messages\n- **Maps** — Every listing has a map pin via [Mapbox](https://www.mapbox.com/)\n- **Image Uploads** — Powered by [Cloudinary](https://cloudinary.com/)\n- **Email Alerts** — Automated emails for bookings, cancellations, and reports\n\n---\n\n## Tech Stack\n\n| Layer | Tech |\n|-------|------|\n| **Frontend** | React 18, Vite, Framer Motion, Material UI, Recharts |\n| **Backend** | Node.js, Express.js |\n| **Database** | MongoDB Atlas (Mongoose ODM) |\n| **Auth** | JWT + Passport.js (Local + JWT strategies) |\n| **Payments** | Razorpay |\n| **Real-time** | Socket.IO |\n| **File Storage** | Cloudinary |\n| **Maps** | Mapbox GL JS |\n| **Email** | Nodemailer (Gmail SMTP) |\n| **Security** | Helmet, CORS, Rate Limiting, bcrypt via passport-local-mongoose |\n\n---\n\n## Project Structure\n\n```\nWanderLust/\n├── backend/\n│   ├── app.js                  # Entry point — Express server + Socket.IO\n│   ├── middleware.js            # Auth middleware (JWT verification, admin checks)\n│   ├── cloudConfig.js           # Cloudinary setup\n│   ├── schema.js                # Joi validation schemas\n│   ├── config/\n│   │   └── passport.js          # Passport strategies (Local + JWT)\n│   ├── controllers/\n│   │   ├── listing.js           # CRUD for listings + geocoding\n│   │   ├── user.js              # Signup, login, profile management\n│   │   ├── review.js            # Reviews with pagination\n│   │   ├── message.js           # Real-time messaging logic\n│   │   ├── notification.js      # In-app notifications\n│   │   ├── wishlist.js          # Wishlist management\n│   │   ├── cancellation.js      # Booking/listing cancellations + auto-rebooking\n│   │   ├── trust.js             # Trust scores, review authenticity\n│   │   ├── adminController.js   # Admin CRUD + dashboard stats\n│   │   ├── adminReportController.js  # PDF report generation\n│   │   ├── reportController.js  # User-submitted listing reports\n│   │   └── alternativeBookingController.js  # Rebooking after cancellation\n│   ├── models/                  # Mongoose schemas (User, Listing, Booking, Review, etc.)\n│   ├── routes/                  # Express routers (one per feature)\n│   ├── services/\n│   │   └── emailService.js      # All email templates + sending logic\n│   ├── socket/\n│   │   └── messageSocket.js     # Socket.IO event handlers\n│   └── util/\n│       ├── rebookingHelper.js   # Find alternative listings\n│       └── trustScoring.js      # Trust score calculation\n│\n├── frontend/\n│   ├── src/\n│   │   ├── App.jsx              # Routes + layout\n│   │   ├── AuthContext.jsx      # Auth state management\n│   │   ├── components/\n│   │   │   ├── views/           # Main pages (Listings, ListingDetail, BookingPage, etc.)\n│   │   │   ├── users/           # Login, Signup, Account page\n│   │   │   ├── Admin/           # Admin dashboard, user/listing/review management\n│   │   │   ├── layouts/         # Navbar, Footer, common layouts\n│   │   │   ├── extras/          # Terms, Privacy, Help Center\n│   │   │   ├── hooks/           # Custom hooks (useSocket)\n│   │   │   ├── trust/           # Trust \u0026 verification UI components\n│   │   │   └── lib/             # API client config\n│   │   └── utilis/\n│   │       ├── css/             # Component stylesheets\n│   │       └── js/              # Utility functions (storage, notifications)\n│   └── vite.config.js\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n\nYou'll need these installed on your machine:\n\n- [Node.js](https://nodejs.org/) (v18 or higher — I used v20.15)\n- [Git](https://git-scm.com/)\n- A [MongoDB Atlas](https://www.mongodb.com/atlas) account (free tier works fine)\n- A [Cloudinary](https://cloudinary.com/) account (free tier)\n- A [Mapbox](https://www.mapbox.com/) account (free tier)\n- A [Razorpay](https://razorpay.com/) account (test mode — no real money needed)\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/Joel112003/WanderLust.git\ncd WanderLust\n```\n\n### 2. Set up the backend\n\n```bash\ncd backend\nnpm install\n```\n\nCreate a `.env` file in the `backend/` folder:\n\n```env\nNODE_ENV=development\nPORT=8000\n\n# Generate these yourself — run: node -p \"require('crypto').randomBytes(64).toString('hex')\"\nJWT_SECRET=your_jwt_secret_here\nADMIN_JWT_SECRET=your_admin_jwt_secret_here\nSESSION_SECRET=your_session_secret_here\n\n# MongoDB Atlas — get your connection string from Atlas dashboard\nATLAS_DB=mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true\u0026w=majority\n\n# Cloudinary — get these from your Cloudinary dashboard\nCLOUDINARY_CLOUD_NAME=your_cloud_name\nCLOUDINARY_API_KEY=your_api_key\nCLOUDINARY_API_SECRET=your_api_secret\n\n# Mapbox — get your token from mapbox.com/account/access-tokens\nMAPBOX_TOKEN=your_mapbox_token\n\n# Razorpay — get test keys from Razorpay dashboard\nRAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxxx\nRAZORPAY_KEY_SECRET=your_razorpay_secret\n\n# Email — use a Gmail App Password (not your regular password)\n# Go to: Google Account → Security → 2-Step Verification → App Passwords\nGMAIL_USER=your_email@gmail.com\nGMAIL_APP_PASS=your_16_char_app_password\nADMIN_EMAIL=your_email@gmail.com\n\n# Frontend URL (for CORS)\nFRONTEND_URL=http://localhost:5173/\n```\n\n\u003e **How to get a Gmail App Password:** Go to [myaccount.google.com](https://myaccount.google.com/) → Security → 2-Step Verification (turn it on first) → App Passwords → Generate one for \"Mail\". You'll get a 16-character password.\n\nStart the backend:\n\n```bash\nnpm run dev\n```\n\nYou should see:\n\n```\n╔════════════════════════════════════════╗\n║    ✅ WanderLust Server Started        ║\n║    Port: 8000\n║    Environment: development\n║    Socket.IO: Enabled ✅               ║\n╚════════════════════════════════════════╝\n```\n\n### 3. Set up the frontend\n\nOpen a new terminal:\n\n```bash\ncd frontend\nnpm install --legacy-peer-deps\n```\n\nCreate a `.env` file in the `frontend/` folder:\n\n```env\nVITE_APP_MAPBOX_TOKEN=your_mapbox_token\nVITE_APP_API_URL=http://localhost:8000\nVITE_RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxxx\n```\n\n\u003e ⚠️ **Important:** Never put secret keys in the frontend `.env`. Only public keys go here (like `KEY_ID`, not `KEY_SECRET`).\n\nStart the frontend:\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:5173](http://localhost:5173) in your browser. That's it — you're running!\n\n---\n\n## API Endpoints\n\nHere's a quick overview. All endpoints return JSON.\n\n### Auth\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| POST | `/auth/signup` | Register a new user |\n| POST | `/auth/login` | Log in (returns JWT token) |\n| POST | `/auth/logout` | Log out |\n| GET | `/auth/profile` | Get current user's profile |\n| PUT | `/auth/profile-update` | Update profile |\n| GET | `/auth/host/:id` | View a host's public profile |\n\n### Listings\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| GET | `/listings` | Get all approved listings |\n| GET | `/listings/search` | Search listings |\n| GET | `/listings/:id` | Get listing details |\n| POST | `/listings` | Create a listing (auth required) |\n| PUT | `/listings/:id` | Update a listing (owner only) |\n| DELETE | `/listings/:id` | Delete a listing (owner only) |\n| PATCH | `/listings/:id/unavailable-dates` | Set unavailable dates |\n| PATCH | `/listings/:id/status` | Approve/reject listing (admin only) |\n\n### Bookings\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| GET | `/bookings/listing/:listingId` | Get bookings for a listing (public — for calendar) |\n| POST | `/bookings` | Create a booking |\n| GET | `/bookings/my-bookings` | Get your bookings |\n| PUT | `/bookings/:id/confirm` | Host confirms a booking |\n| PUT | `/bookings/:id/cancel` | Cancel your booking |\n| GET | `/bookings/owner/listings` | Get all bookings for your listings (host) |\n| POST | `/bookings/:id/cancel-by-owner` | Host cancels booking + auto-rebooking |\n\n### Payments (Razorpay)\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| POST | `/api/payment/create-order` | Create Razorpay order before payment |\n| POST | `/api/payment/verify` | Verify payment signature after payment |\n| GET | `/api/payment/bookings` | Get user's paid bookings |\n| POST | `/api/payment/cancel/:id` | Cancel a pending booking |\n\n### Reviews\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| GET | `/listings/:id/reviews` | Get reviews for a listing |\n| POST | `/listings/:id/reviews` | Add a review |\n| DELETE | `/listings/:id/reviews/:reviewId` | Delete your review |\n\n### Messages\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| POST | `/messages` | Send a message |\n| GET | `/messages/conversations` | Get all your conversations |\n| GET | `/messages/unread/count` | Get unread message count |\n| GET | `/messages/listing/:listingId` | Get messages for a listing |\n| PUT | `/messages/:messageId/read` | Mark message as read |\n\n### Other\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| GET/POST/DELETE | `/wishlist` | Manage your wishlist |\n| GET/PUT/DELETE | `/notifications` | Manage notifications |\n| POST | `/api/reports/listing` | Report a listing |\n| GET | `/trust/host-reliability/:hostId` | Get host trust score |\n| GET | `/trust/listing-trust/:listingId` | Get listing trust metrics |\n| GET | `/health` | Health check (for monitoring) |\n\n### Admin\n| Method | Endpoint | What it does |\n|--------|----------|-------------|\n| POST | `/admin/login` | Admin login |\n| GET | `/admin/dashboard` | Dashboard stats |\n| GET | `/admin/users` | List all users |\n| GET | `/admin/listings` | List all listings (including pending) |\n| GET | `/admin/reviews` | List all reviews |\n| GET | `/admin/reports/generate` | Generate PDF report |\n\n---\n\n## Setting Up Third-Party Services\n\n### MongoDB Atlas\n1. Go to [mongodb.com/atlas](https://www.mongodb.com/atlas) and create a free cluster\n2. Click **Connect** → **Connect your application**\n3. Copy the connection string and replace `\u003cpassword\u003e` with your actual password\n4. Paste it as `ATLAS_DB` in your `.env`\n\n### Cloudinary\n1. Sign up at [cloudinary.com](https://cloudinary.com/)\n2. Go to your **Dashboard** — you'll see Cloud Name, API Key, and API Secret right there\n3. Copy them into your `.env`\n\n### Mapbox\n1. Sign up at [mapbox.com](https://www.mapbox.com/)\n2. Go to [Account → Access Tokens](https://account.mapbox.com/access-tokens/)\n3. Copy your default public token\n4. Put it in both `backend/.env` (as `MAPBOX_TOKEN`) and `frontend/.env` (as `VITE_APP_MAPBOX_TOKEN`)\n\n### Razorpay\n1. Sign up at [razorpay.com](https://razorpay.com/)\n2. Go to **Settings → API Keys → Generate Test Key**\n3. You'll get a Key ID and Key Secret\n4. `RAZORPAY_KEY_ID` goes in both backend and frontend `.env`\n5. `RAZORPAY_KEY_SECRET` goes in backend `.env` **only** (never expose this on the frontend)\n\n---\n\n## Deployment\n\nThe project is set up for [Render](https://render.com/). There's a `render.yaml` in the backend folder.\n\n**Backend (Render):**\n1. Connect your GitHub repo to Render\n2. Set build command: `npm install`\n3. Set start command: `node app.js`\n4. Add all your `.env` variables in Render's Environment tab\n\n**Frontend (Vercel or Render):**\n1. Set build command: `npm run build`\n2. Set output directory: `dist`\n3. Add frontend env variables (`VITE_APP_*`)\n4. Update `VITE_APP_API_URL` to point to your deployed backend URL\n\nDon't forget to update `FRONTEND_URL` in the backend `.env` to match your deployed frontend URL (for CORS to work).\n\n---\n\n## Things I'd Improve\n\nIf I had more time, here's what I'd add:\n\n- **Tests** — Unit and integration tests with Jest + Supertest. The test script is currently a placeholder.\n- **Image optimization** — Auto-compress images before uploading to Cloudinary\n- **Redis caching** — For search results and frequently accessed listings (not needed at current scale though)\n- **Rate limiting per user** — Current rate limiting is IP-based, per-user would be better\n- **Proper CI/CD** — GitHub Actions for automated testing and deployment\n- **Error monitoring** — Sentry or similar for production error tracking\n\n---\n\n## Contributing\n\nPull requests are welcome! If you find a bug or have a feature idea:\n\n1. Fork the repo\n2. Create your branch (`git checkout -b feature/cool-feature`)\n3. Commit your changes (`git commit -m 'Add cool feature'`)\n4. Push to the branch (`git push origin feature/cool-feature`)\n5. Open a Pull Request\n\n---\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n---\n\nBuilt by [Joel](https://github.com/Joel112003) ☕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoel112003%2Fwanderlust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoel112003%2Fwanderlust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoel112003%2Fwanderlust/lists"}