Skip to content

Julliet-Mohanta/Travel-Plans-

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

235 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

โœˆ๏ธ PackGo โ€” Smart Travel Planner

PackGo Landing Page

MERN Stack Node.js MongoDB Material UI CI Pipeline Security Scan


Plan trips. Track expenses. Check weather. Translate languages. Book flights & hotels.
All in one beautiful, full-stack travel companion.


๐Ÿš€ Live Demo ยท ๐Ÿ“– Docs ยท ๐Ÿ› Report Bug ยท โœจ Request Feature


๐Ÿ“‘ Table of Contents


๐ŸŒ Overview

PackGo is a production-ready, full-stack travel planning application built with the MERN stack (MongoDB, Express.js, React 19, Node.js). It consolidates every tool a traveller needs โ€” itinerary management, expense tracking, real-time weather, live language translation, and flight & hotel search โ€” into a single, polished web application.

Whether you're planning a weekend getaway or a month-long adventure, PackGo keeps all your travel data organised, secure, and accessible from any device.


๐Ÿ“ธ Screenshots

๐Ÿ  Landing Page & Dashboard

Landing Page Dashboard
Landing Page Dashboard

๐Ÿ—บ๏ธ Trip Detail & Expense Tracker

Trip Detail Expense Tracker
Trip Detail Expense Tracker

๐ŸŒค๏ธ Weather Forecast & Live Translator

Weather Forecast Live Translator
Weather Forecast Live Translator

โœจ Features

๐Ÿ—บ๏ธ Trip Management

  • Create, edit, and delete trips with destination autocomplete
  • Status tracking โ€” Planned ยท Ongoing ยท Completed
  • Destination images fetched automatically from the seeded catalogue
  • Per-trip budget allocation

๐Ÿ’ฐ Expense Tracker

  • Log expenses by category โ€” Food ยท Transport ยท Accommodation ยท Activities ยท Shopping
  • Budget utilization progress bar with overspend alerts
  • Category-wise breakdown with interactive pie charts (Recharts)
  • Export expenses to CSV for offline records

๐ŸŒค๏ธ Weather Forecast

  • Real-time weather powered by OpenWeatherMap API
  • 5-day forecast with weather condition icons
  • Smart travel tips based on temperature & conditions

๐ŸŒ Live Translator

  • Instant translation via Google Translate API (google-translate-api-x) โ€” no API key needed
  • 28+ languages including Hindi, Spanish, French, Japanese, Arabic
  • Auto language detection
  • Common travel phrases quick-select
  • Copy to clipboard with one click

โœˆ๏ธ Flight & Hotel Booking

  • Search flights by origin, destination, and dates
  • Search hotels by location, check-in/check-out, and guests
  • Visual flight timeline with airline info and pricing
  • Hotel cards with ratings, amenities, and booking CTA
  • (Currently uses mock data โ€” designed for real API integration)

๐Ÿ” Authentication & Security

  • JWT-based authentication with token auto-refresh
  • Secure password hashing with bcryptjs
  • Protected routes with middleware guard
  • Profile management and password change
  • Security headers via Helmet + API rate limiting

๐Ÿ“Š Dashboard Analytics

  • Trip statistics โ€” Total, Completed, Planned, Budget overview
  • Total spending analytics across all trips
  • Monthly trip distribution bar chart (Recharts)
  • Quick action cards for navigation
  • Upcoming trip cards with status badges

๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Version Purpose
React 19 Component-based UI framework
Redux + Redux-Thunk 5 / 3 Global state management with async actions
React Router v7 Client-side routing with nested layouts
Material-UI (MUI) v6 Pre-built UI components and theming
Recharts 3 Bar & Pie chart data visualizations
Axios 1 HTTP client with JWT interceptors
React-Toastify 11 Toast notification system
Leaflet / React-Leaflet 1.9 / 5 Interactive maps

Backend

Technology Version Purpose
Node.js 18+ JavaScript runtime
Express.js 4 REST API server
MongoDB + Mongoose Atlas NoSQL database with schema validation
jsonwebtoken โ€” Token-based authentication
bcryptjs โ€” Password hashing
Helmet โ€” Security HTTP headers
express-rate-limit โ€” API rate limiting (100 req / 15 min)
google-translate-api-x โ€” Free Google Translate integration
cors โ€” Cross-origin resource sharing
dotenv โ€” Environment variable management

๐Ÿ“ Project Structure

travel-planner/
โ”œโ”€โ”€ assets/                          # README screenshots
โ”‚   โ”œโ”€โ”€ landing_page.png
โ”‚   โ”œโ”€โ”€ dashboard.png
โ”‚   โ”œโ”€โ”€ trip_detail.png
โ”‚   โ”œโ”€โ”€ expense_tracker.png
โ”‚   โ”œโ”€โ”€ weather_forecast.png
โ”‚   โ””โ”€โ”€ live_translator.png
โ”‚
โ”œโ”€โ”€ client/                          # โš›๏ธ React Frontend
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ components/
โ”‚       โ”‚   โ””โ”€โ”€ PrivateRoute.js      # Auth route guard
โ”‚       โ”œโ”€โ”€ pages/
โ”‚       โ”‚   โ”œโ”€โ”€ Home.js              # Landing page
โ”‚       โ”‚   โ”œโ”€โ”€ Login.js             # Login with image carousel
โ”‚       โ”‚   โ”œโ”€โ”€ Register.js          # Multi-step registration
โ”‚       โ”‚   โ”œโ”€โ”€ Dashboard.js         # Dashboard layout + sidebar
โ”‚       โ”‚   โ”œโ”€โ”€ NotFound.js          # 404 page
โ”‚       โ”‚   โ””โ”€โ”€ dashboard/
โ”‚       โ”‚       โ”œโ”€โ”€ DashboardHome.js  # Analytics overview
โ”‚       โ”‚       โ”œโ”€โ”€ TripsView.js      # Trip list + create modal
โ”‚       โ”‚       โ”œโ”€โ”€ TripDetail.js     # Trip detail + expenses
โ”‚       โ”‚       โ”œโ”€โ”€ ExpensesView.js   # Expense tracker + pie chart
โ”‚       โ”‚       โ”œโ”€โ”€ BookingView.js    # Flight & hotel search
โ”‚       โ”‚       โ”œโ”€โ”€ WeatherView.js    # Weather forecast
โ”‚       โ”‚       โ”œโ”€โ”€ TranslatorView.js # Live translator
โ”‚       โ”‚       โ””โ”€โ”€ ProfileView.js    # Profile & password
โ”‚       โ”œโ”€โ”€ redux/
โ”‚       โ”‚   โ”œโ”€โ”€ store.js
โ”‚       โ”‚   โ”œโ”€โ”€ actions/             # Async thunk actions
โ”‚       โ”‚   โ”œโ”€โ”€ reducers/            # State reducers
โ”‚       โ”‚   โ””โ”€โ”€ types/               # Action type constants
โ”‚       โ”œโ”€โ”€ services/
โ”‚       โ”‚   โ””โ”€โ”€ api.js               # Axios instance + interceptors
โ”‚       โ”œโ”€โ”€ theme.js                 # MUI custom theme (Poppins)
โ”‚       โ”œโ”€โ”€ App.js                   # Root component + routes
โ”‚       โ””โ”€โ”€ index.js                 # Entry point
โ”‚
โ”œโ”€โ”€ server/                          # ๐ŸŸข Express Backend
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ authController.js        # Register, login, profile
โ”‚   โ”‚   โ”œโ”€โ”€ tripController.js        # Trip CRUD
โ”‚   โ”‚   โ”œโ”€โ”€ expenseController.js     # Expense CRUD + aggregation
โ”‚   โ”‚   โ”œโ”€โ”€ weatherController.js     # OpenWeatherMap integration
โ”‚   โ”‚   โ”œโ”€โ”€ translatorController.js  # Google Translate integration
โ”‚   โ”‚   โ””โ”€โ”€ bookingController.js     # Flight & hotel (mock)
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”œโ”€โ”€ User.js                  # User schema + password methods
โ”‚   โ”‚   โ”œโ”€โ”€ Trip.js                  # Trip schema with nested objects
โ”‚   โ”‚   โ”œโ”€โ”€ Expense.js               # Expense schema linked to trips
โ”‚   โ”‚   โ””โ”€โ”€ Destination.js           # Destination catalogue schema
โ”‚   โ”œโ”€โ”€ routes/                      # Express route declarations
โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ”œโ”€โ”€ auth.js                  # JWT verification middleware
โ”‚   โ”‚   โ””โ”€โ”€ errorHandler.js          # Global error handler
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ seed.js                  # Database seeder
โ”‚   โ”‚   โ””โ”€โ”€ cleanAndSeed.js          # Clean + reseed script
โ”‚   โ””โ”€โ”€ server.js                    # Express app entry point
โ”‚
โ”œโ”€โ”€ .env.example                     # Environment variable template
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ CODE_OF_CONDUCT.md
โ”œโ”€โ”€ CONTRIBUTING.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

๐Ÿš€ Getting Started

Prerequisites

Make sure you have the following installed:

  • Node.js v18 or higher โ†’ Download
  • MongoDB (local) or a free MongoDB Atlas cluster โ†’ Get Atlas
  • npm (bundled with Node.js)
  • OpenWeatherMap API Key (free) โ†’ Get Key

1. Clone the Repository

git clone https://github.com/hitesh-kumar123/Travel-Plans-.git
cd travel-planner

2. Install Dependencies

โš ๏ธ Important:
This repository uses separate frontend (client) and backend (server) environments.

Running commands like:

npm run dev

from the root directory will result in a missing script error.

Please install dependencies and run scripts separately inside the client and server directories.

# Install backend dependencies
cd server
npm install

# Install frontend dependencies
cd ../client
npm install

3. Configure Environment Variables

Copy the example file and fill in your values:

cp .env.example server/.env

Open server/.env and update:

PORT=5000
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/travel-planner
JWT_SECRET=your_super_secret_jwt_key_here
WEATHER_API_KEY=your_openweathermap_api_key

๐Ÿ’ก Tip: The translator uses google-translate-api-x โ€” no API key required!
Get your free weather key at openweathermap.org/api.

4. Seed the Database (Optional but Recommended)

cd server
node data/seed.js

This populates the destinations collection with sample travel destinations and images for destination autocomplete.

5. Run the Application

Open two separate terminals:

# Terminal 1 โ€” Backend (http://localhost:5000)
cd server
npm run dev
# Terminal 2 โ€” Frontend (http://localhost:3000)
cd client
npm start

Then open your browser at http://localhost:3000 ๐ŸŽ‰


๐Ÿ”‘ Environment Variables

Variable Required Description
PORT โœ… Port for the Express server (default: 5000)
MONGO_URI โœ… MongoDB connection string (local or Atlas)
JWT_SECRET โœ… Secret key for signing JWT tokens (use a long random string)
WEATHER_API_KEY โœ… Your free OpenWeatherMap API key
SMTP_HOST โŒ SMTP server host for sending emails (ethereal fallback if omitted)
SMTP_PORT โŒ SMTP server port (default: 587)
SMTP_SECURE โŒ Use SSL/TLS (true or false, default: false)
SMTP_USER โŒ SMTP authentication username credential
SMTP_PASS โŒ SMTP authentication password credential
FROM_EMAIL โŒ Custom sender email address (default: noreply@packgo.com)
FROM_NAME โŒ Custom sender display name (default: PackGo)

๐Ÿ“ก API Endpoints

Base URL: http://localhost:5000/api

๐Ÿ” Authentication

Method Endpoint Description Auth
POST /auth/register Register a new user โŒ
POST /auth/login Login and receive JWT token โŒ
GET /auth/profile Get current user profile โœ…
PUT /auth/profile Update user profile โœ…
PUT /auth/change-password Change password โœ…
POST /auth/verify-otp Verify registration/login 6-digit OTP code โŒ
POST /auth/resend-otp Request a new registration/login OTP code โŒ
POST /auth/otp-status Query active registration/login countdown state โŒ
POST /auth/request-email-change Initiate profile email update โœ…
POST /auth/verify-email-change Confirm and execute pending profile email change โœ…
POST /auth/discard-email-change Cancel and discard pending profile email change โœ…
GET /auth/email-change-status Query active profile email change status details โœ…

๐Ÿ—บ๏ธ Trips

Method Endpoint Description Auth
POST /trips Create a new trip โœ…
GET /trips Get all trips for the logged-in user โœ…
GET /trips/:id Get a trip by ID โœ…
PUT /trips/:id Update a trip โœ…
DELETE /trips/:id Delete a trip โœ…

๐Ÿ’ฐ Expenses

Method Endpoint Description Auth
GET /expenses Get all user expenses (analytics) โœ…
POST /expenses Create a new expense โœ…
GET /expenses/trip/:tripId Get expenses for a specific trip โœ…
GET /expenses/:id Get expense by ID โœ…
PUT /expenses/:id Update an expense โœ…
DELETE /expenses/:id Delete an expense โœ…
GET /expenses/summary/:tripId Category-wise expense summary โœ…

๐ŸŒค๏ธ Weather

Method Endpoint Description Auth
GET /weather/current/:location Current weather for a city โŒ
GET /weather/forecast/:location 5-day weather forecast โŒ

๐ŸŒ Translator

Method Endpoint Description Auth
POST /translator/translate Translate text between languages โŒ
GET /translator/languages Get list of supported languages โŒ

๐Ÿ“ Destinations

Method Endpoint Description Auth
GET /destinations Get all destinations โŒ
GET /destinations/search?q= Search destinations by name โŒ
GET /destinations/:id Get destination by ID โŒ

โœˆ๏ธ Booking

Method Endpoint Description Auth
POST /booking/flights/search Search available flights โœ…
POST /booking/hotels/search Search available hotels โœ…
POST /booking/flights/book Book a flight โœ…
POST /booking/hotels/book Book a hotel โœ…

๐Ÿ—„๏ธ Database Models

๐Ÿ‘ค User

{
  name:      String,   // required
  email:     String,   // required, unique
  password:  String,   // hashed with bcrypt
  createdAt: Date
}

๐Ÿ—บ๏ธ Trip

{
  user:           ObjectId,    // ref: User
  destination:    String,
  startDate:      Date,
  endDate:        Date,
  description:    String,
  budget:         Number,
  status:         Enum['planned', 'ongoing', 'completed'],
  activities:     [String],
  accommodation:  { name, address, checkIn, checkOut },
  transportation: { type, details },
  images:         [String],
  notes:          String
}

๐Ÿ’ธ Expense

{
  user:        ObjectId,   // ref: User
  trip:        ObjectId,   // ref: Trip
  amount:      Number,
  currency:    String,     // default: 'INR'
  category:    Enum['food', 'transport', 'accommodation', 'activities', 'shopping', 'other'],
  description: String,
  date:        Date
}

๐Ÿ“ Destination

{
  name:               String,
  city:               String,
  state:              String,
  category:           String,
  description:        String,
  images:             [String],
  entrance_fee_inr:   Number,
  best_time_to_visit: String,
  rating:             Number
}

๐Ÿ”’ Security Features

Feature Implementation
JWT Authentication Stateless tokens with 24h expiry and auto-refresh interceptors
Password Hashing bcrypt with configurable salt rounds
Security Headers Helmet.js sets X-Content-Type-Options, X-Frame-Options, etc.
Rate Limiting 100 requests per 15 minutes per IP via express-rate-limit
OTP Rate Limiting 60s resend cooldown, 5 max attempts, and a 24h security lockout (otpBlockedUntil)
CORS Policy Configured to allow only specified origins
Input Validation Server-side validation on all user-submitted data
Protected Routes Frontend <PrivateRoute> + backend auth middleware guard

๐ŸŽจ Design Highlights

  • Custom MUI Theme โ€” Poppins typography, curated palette, rounded components and consistent spacing
  • Editorial Landing Page โ€” Playfair Display + DM Sans typography, hero illustrations, animated call-to-actions
  • Fully Responsive โ€” Mobile-first approach; collapsible sidebar drawer on small screens
  • Micro-animations โ€” Hover lift effects, card transitions, skeleton loaders
  • Toast Notifications โ€” Real-time feedback (success / error / info) on all user actions via React-Toastify
  • Interactive Charts โ€” Bar chart for monthly trip analytics, pie chart for expense breakdown

๐Ÿ”ฎ Future Enhancements

  • Real flight & hotel API integration (Amadeus / Skyscanner / RapidAPI)
  • AI-powered itinerary generation (OpenAI / Gemini)
  • Social trip sharing with friends and collaborative planning
  • Push notifications & email reminders for upcoming trips
  • Offline mode with service workers (PWA)
  • Travel insurance integration
  • Multi-currency expense conversion with live exchange rates
  • Trip photo gallery with image uploads (Cloudinary)
  • Dark mode toggle
  • Mobile app (React Native)

๐Ÿค Contributing

We โค๏ธ contributions from the community! PackGo is an open-source project and all kinds of contributions are welcome โ€” bug fixes, feature additions, documentation improvements, and more.

Please read our:

Quick Steps

# 1. Fork the repository on GitHub

# 2. Clone your fork
git clone https://github.com/<your-username>/Travel-Plans-.git

# 3. Create a feature branch
git checkout -b feature/your-amazing-feature

# 4. Make your changes and commit
git add .
git commit -m "feat: add your amazing feature"

# 5. Push and open a Pull Request
git push origin feature/your-amazing-feature

Good First Issues are labelled good first issue โ€” a great place to start! ๐ŸŒฑ


๐Ÿ“„ License

This project is licensed under the MIT License.
See the LICENSE file for full details.


๐Ÿ‘ฅ Mentors

We are incredibly grateful to our mentors for their valuable support and code reviews:

  • Mrigakshi Rathore โ€” GSSoC'26 Mentor
    • GitHub
    • LinkedIn

๐Ÿ‘ค Author

Hitesh Kumar

GitHub

LinkedIn


โญ If PackGo helped you, please give it a star โ€” it means a lot! โญ

About

PackGo: Your ultimate travel companion. Built with React, Redux, Node.js & MongoDB to seamlessly plan trips, track budgets, check weather, and organize bookings in one intuitive dashboard.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 94.9%
  • CSS 4.7%
  • HTML 0.4%
โšก