{"id":29867645,"url":"https://github.com/rohitmaji18/travelexa","last_synced_at":"2026-04-09T02:02:40.280Z","repository":{"id":285794746,"uuid":"959363815","full_name":"RohitMaji18/Travelexa","owner":"RohitMaji18","description":"A full-stack travel booking platform with an AI Itinerary Planner, built on Node.js, Express, MongoDB, and Pug for server-side rendering.","archived":false,"fork":false,"pushed_at":"2026-01-17T11:36:26.000Z","size":41051,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T18:21:57.966Z","etag":null,"topics":["auth","booking-platform","express-middleware","expressjs","full-stack-web-development","google-ai","javascript","leaflet-map","mongodb","moongose","mvc","nodejs","pug","restful-api","ssr","stripe-api","travel-app","webapp"],"latest_commit_sha":null,"homepage":"https://travelexa.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/RohitMaji18.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-02T17:09:15.000Z","updated_at":"2026-01-17T11:36:30.000Z","dependencies_parsed_at":"2025-07-18T23:33:54.419Z","dependency_job_id":null,"html_url":"https://github.com/RohitMaji18/Travelexa","commit_stats":null,"previous_names":["rohitmaji18/travelexa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RohitMaji18/Travelexa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohitMaji18%2FTravelexa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohitMaji18%2FTravelexa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohitMaji18%2FTravelexa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohitMaji18%2FTravelexa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RohitMaji18","download_url":"https://codeload.github.com/RohitMaji18/Travelexa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohitMaji18%2FTravelexa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["auth","booking-platform","express-middleware","expressjs","full-stack-web-development","google-ai","javascript","leaflet-map","mongodb","moongose","mvc","nodejs","pug","restful-api","ssr","stripe-api","travel-app","webapp"],"created_at":"2025-07-30T14:00:40.706Z","updated_at":"2026-04-09T02:02:40.275Z","avatar_url":"https://github.com/RohitMaji18.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🚀 Travelexa – AI-Powered Travel Platform\n\n\u003cp\u003eA comprehensive, full-stack travel booking application built with Node.js, Express, MongoDB, and Pug. Travelexa allows users to discover, book, and review tours, featuring secure payments, interactive maps, and a powerful AI Itinerary Planner powered by Google's Generative AI.\u003c/p\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://travelexa.onrender.com\" target=\"_blank\"\u003e\u003cstrong\u003eLive Demo\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"https://github.com/RohitMaji18/Travelexa\" target=\"_blank\"\u003e\u003cstrong\u003eView Code\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Node.js-339933?style=for-the-badge\u0026logo=nodedotjs\u0026logoColor=white\" alt=\"Node.js\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Express.js-000000?style=for-the-badge\u0026logo=express\u0026logoColor=white\" alt=\"Express.js\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/MongoDB-47A248?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white\" alt=\"MongoDB\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Pug-E3C291?style=for-the-badge\u0026logo=pug\u0026logoColor=black\" alt=\"Pug\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Stripe-626CD9?style=for-the-badge\u0026logo=stripe\u0026logoColor=white\" alt=\"Stripe\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-ISC-yellow.svg?style=for-the-badge\" alt=\"License: ISC\"\u003e\n\u003c/div\u003e\n\n---\n\n## ✨ Key Features\n* **AI Itinerary Planner:** Generate custom, dynamic travel plans using Google's Generative AI, a standout feature of the platform.\n* **Secure User Authentication:** Robust JWT-based authentication with `httpOnly` cookies, password hashing (bcryptjs), password reset, and role-based access control (user, guide, admin).\n* **RESTful API:** A well-structured API following the MVC pattern with versioned routes (`/api/v1/...`).\n* **Interactive Tour Maps:** View tour locations on dynamic maps powered by Leaflet.js, with data passed from the server.\n* **Secure Online Payments:** Seamless and secure payment processing integrated via Stripe Checkout, with webhooks for fulfillment.\n* **CRUD Operations:** Full create, read, update, and delete functionality for tours, users, and bookings.\n* **Automated Email Notifications:** Users receive emails for welcome, password resets, and booking confirmations using Nodemailer.\n* **Advanced Backend Security:** Protected against common threats with rate limiting, data sanitization (against XSS and NoSQL injection), parameter pollution prevention (HPP), CORS, and security headers via Helmet.\n* **Image Upload \u0026 Processing:** Efficient handling of image uploads with Multer and on-the-fly image compression using Sharp.\n* **Server-Side Rendering:** A fast and SEO-friendly user interface built with Pug templates.\n* **Robust Error Handling:** A centralized global error handling middleware for operational and programmer errors.\n\n---\n\n## 🛠️ Tech Stack\n\n| Category                  | Technology / Service                                                                    |\n| :------------------------ | :-------------------------------------------------------------------------------------- |\n| **Frontend** | Pug (SSR), CSS3, JavaScript (ES6+), Leaflet.js, Axios, Parcel Bundler                      |\n| **Backend** | Node.js, Express.js                                                                     |\n| **Database** | MongoDB, Mongoose (ODM)                                                                 |\n| **Artificial Intelligence** | Google Generative AI (`@google/generative-ai`)                                           |\n| **Authentication** | JSON Web Tokens (JWT), bcryptjs, cookie-parser                                          |\n| **Payments** | Stripe API                                                                              |\n| **Emails** | Nodemailer                                                                              |\n| **File Handling** | Multer (Uploads), Sharp (Image Processing)                                              |\n| **Security** | Helmet, express-rate-limit, express-mongo-sanitize, xss-clean, hpp, CORS                |\n| **DevOps \u0026 Tooling** | ESLint, Prettier, Morgan (Logging), Nodemon, `cross-env`, `ndb` (Debugging)                  |\n\n---\n\n## 🗺️ API Endpoints\n\nThe application exposes the following RESTful API endpoints under `/api/v1/`:\n\n| Method | Endpoint                    | Description                                |\n| :----- | :-------------------------- | :----------------------------------------- |\n| `POST` | `/users/signup`             | Register a new user.                       |\n| `POST` | `/users/login`              | Log in a user and receive a JWT.           |\n| `GET`  | `/tours`                    | Get a list of all tours with filtering.    |\n| `GET`  | `/tours/:id`                | Get details for a single tour.             |\n| `GET`  | `/bookings/checkout-session/:tourId` | Get a Stripe session for booking a tour. |\n| `POST` | `/ai/itinerary`             | Generate a new travel itinerary with AI.  |\n\n*... and many more CRUD endpoints for tours, users, bookings, and reviews.*\n\n---\n\n## 🚀 Getting Started\n\nTo get a local copy up and running, follow these steps.\n\n### 1. Clone the Repository\n```sh\ngit clone [https://github.com/RohitMaji18/Travelexa.git](https://github.com/RohitMaji18/Travelexa.git)\ncd Travelexa\n2. Install Dependencies\nBash\n\nnpm install\n3. Configure Environment Variables\nCreate a config.env file in the root of the project. This file stores all your secret keys and configuration variables.\n\nCode snippet\n\nNODE_ENV=development\nPORT=3000\n\n# Your MongoDB connection string\nDATABASE=mongodb+srv://...\n\n# JWT secret for signing tokens\nJWT_SECRET=a-long-and-very-secure-secret-for-jwt\nJWT_EXPIRES_IN=90d\nJWT_COOKIE_EXPIRES_IN=90\n\n# Stripe API keys\nSTRIPE_SECRET_KEY=sk_test_...\nSTRIPE_WEBHOOK_SECRET=whsec_...\n\n# Email configuration (e.g., SendGrid)\nSENDGRID_USERNAME=your_email_service_username\nSENDGRID_PASSWORD=your_email_service_password\n\n# Google Generative AI API Key\nGOOGLE_API_KEY=your_google_ai_api_key\n4. Run the Application\nThis project uses nodemon for backend live-reloading and parcel for frontend asset bundling. For the best development experience, run the backend and frontend scripts in two separate terminals.\n\nTerminal 1: Start the Backend Server\n\nBash\n\nnpm run dev\nTerminal 2: Watch for Frontend Changes\n\nBash\n\nnpm run watch:js\nThe application will be available at http://localhost:3000.\n\n📄 License\nDistributed under the ISC License. See LICENSE for more information.\n\n👨‍💻 Author\nRohit Maji - A passionate developer and MCA Student at NIT Agartala.\n\nGitHub: @RohitMaji18\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitmaji18%2Ftravelexa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitmaji18%2Ftravelexa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitmaji18%2Ftravelexa/lists"}