Skip to content

A modern, full-featured tour booking web application with a beautiful green and white theme. Built with React, TypeScript, Express, and MongoDB. Includes advanced search, filtering, flexible date selection, and a comprehensive admin dashboard.

Notifications You must be signed in to change notification settings

sugamghising/TourAndTravelApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”๏ธ Himalayan Tours & Travels

A modern, full-featured tour booking web application with a beautiful green and white theme. Built with React, TypeScript, Express, and MongoDB. Includes advanced search, filtering, flexible date selection, and a comprehensive admin dashboard.

Theme Colors

โœจ Key Features

For Travelers

  • ๐Ÿ  Beautiful Landing Page - Hero section with stunning mountain imagery
  • ๐Ÿ—บ๏ธ Advanced Tour Browsing - View all available Himalayan tours with filters
  • ๏ฟฝ Smart Search - Search tours by title with instant results
  • ๐ŸŽ›๏ธ Price & Duration Filters - Filter by budget and trip length
  • ๐Ÿ“… Flexible Date Selection - Book any future date (not limited to predefined dates)
  • ๐Ÿ‘ค Secure Authentication - JWT-based login and registration
  • ๐Ÿ“‹ Booking Management - View and cancel your bookings
  • ๐Ÿ“ฑ Fully Responsive - Optimized for desktop, tablet, and mobile
  • ๐ŸŽจ Nature-Inspired Design - Clean green & white minimalistic theme

For Admins

  • ๐Ÿ›ก๏ธ Admin Dashboard - Complete tour management system
  • โž• Create Tours - Add new tours with all details
  • โœ๏ธ Edit Tours - Update existing tour information
  • ๐Ÿ—‘๏ธ Delete Tours - Remove tours with confirmation
  • ๐Ÿ“Š Booking Overview - View all customer bookings
  • ๐Ÿ” Role-Based Access - Secure admin-only features
  • ๐Ÿ’ผ Professional UI - Tables, modals, and status badges

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v14+)
  • MongoDB (local or Atlas)
  • npm or yarn

Installation & Running

  1. Clone the repository
git clone https://github.com/sugamghising/TourAndTravelApp.git
cd TourAndTravel
  1. Setup Backend
cd server
npm install

# Create .env file with:
# MONGODB_URI=your_mongodb_connection_string
# JWT_SECRET=your_secret_key
# PORT=5000

npm run dev
  1. Setup Frontend (in new terminal)
cd client
npm install
npm start
  1. Create Admin User (in new terminal)
cd server
npm run create-admin

Default Admin Credentials:

  • Email: admin@himalayan.com
  • Password: admin123
  1. Access the Application

๐Ÿ“ Project Structure

TourAndTravel/
โ”œโ”€โ”€ client/                        # React TypeScript frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.tsx        # Navigation with auth
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home.tsx          # Landing page
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Tours.tsx         # Tours with search/filter
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Auth.tsx          # Login/Register
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Bookings.tsx      # User bookings
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AdminDashboard.tsx # Admin panel โญ
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Footer.tsx        # Footer
โ”‚   โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ AuthContext.tsx   # Global auth state
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ api.ts            # API integration
โ”‚   โ”‚   โ”œโ”€โ”€ types/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ index.ts          # TypeScript interfaces
โ”‚   โ”‚   โ””โ”€โ”€ App.tsx               # Main app
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ server/                        # Express backend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/          # Request handlers
โ”‚   โ”‚   โ”œโ”€โ”€ models/               # MongoDB schemas
โ”‚   โ”‚   โ”œโ”€โ”€ routes/               # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/           # Auth & validation
โ”‚   โ”‚   โ”œโ”€โ”€ scripts/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ createAdmin.ts    # Admin user script โญ
โ”‚   โ”‚   โ””โ”€โ”€ index.ts              # Server entry
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ .gitignore                    # Git ignore rules
โ””โ”€โ”€ README.md                     # This file

โญ = New features added

๐ŸŽจ Screenshots & Features

๐Ÿ  Home Page

Beautiful hero section showcasing Himalayan mountains with featured services (adventure tours, expert guides, safe travel, best prices).

๐Ÿ—บ๏ธ Tours Page with Search & Filters

  • Search Bar: Find tours by title
  • Price Filter: Low (<$500) / Medium ($500-$1500) / High (>$1500)
  • Duration Filter: Short (<5 days) / Medium (5-10 days) / Long (>10 days)
  • Results Count: Shows number of filtered tours
  • Flexible Date Picker: Select any future date for booking

๐Ÿ“‹ My Bookings Page

Manage your bookings with:

  • Tour details and dates
  • Status tracking (Pending/Confirmed/Cancelled)
  • Payment status
  • Cancel booking option

๐Ÿ›ก๏ธ Admin Dashboard (Admin Only)

Tours Management Tab:

  • View all tours in table format
  • Create new tours with detailed forms
  • Edit existing tours
  • Delete tours with confirmation
  • Form fields: Title, Description, Location, Price, Duration, Max Group Size, Images, Available Dates

All Bookings Tab:

  • View all customer bookings
  • User and tour information
  • Status badges (color-coded)
  • Payment status tracking
  • Booking timestamps

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React 19
  • TypeScript
  • Axios
  • Context API
  • CSS3

Backend

  • Node.js
  • Express
  • MongoDB
  • Mongoose
  • JWT Authentication
  • bcrypt

๐ŸŽจ Theme Colors

Color Hex Usage
Primary Green #2d5016 Headers, buttons, primary elements
Secondary Green #3a6b1f Hover effects, accents
White #ffffff Text, cards, backgrounds
Light Gray #f8f9fa Page background

๐Ÿงช Testing Guide

User Features Testing

  1. Create Account & Login

  2. Search & Filter Tours

    • Go to Tours page
    • Try text search (e.g., "Everest")
    • Use price filter (Low/Medium/High)
    • Use duration filter (Short/Medium/Long)
    • Verify results count updates
  3. Book a Tour with Flexible Date

    • Select any tour
    • Click "Book Now"
    • Choose any future date from date picker
    • Verify you cannot select past dates
    • Complete booking
  4. Manage Bookings

    • Go to "My Bookings"
    • View booking details
    • Cancel a booking if needed

Admin Features Testing

  1. Login as Admin

    • Use credentials: admin@himalayan.com / admin123
    • Click "Admin" button in navbar
  2. Create Tour

    • Click "+ Create New Tour"
    • Fill form with sample data
    • Submit and verify success message
  3. Edit Tour

    • Click "Edit" on any tour
    • Modify details
    • Submit and verify update
  4. Delete Tour

    • Click "Delete" on any tour
    • Confirm deletion
    • Verify tour is removed
  5. View All Bookings

    • Switch to "All Bookings" tab
    • Verify booking data displays correctly

๐Ÿ” Environment Variables

Backend (.env in server folder)

MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
PORT=5000

๐Ÿ“ API Endpoints

Authentication

Method Endpoint Description Auth Required
POST /api/auth/register Register new user No
POST /api/auth/login Login user No

Tours

Method Endpoint Description Auth Required Admin Only
GET /api/tours Get all tours No No
GET /api/tours/:id Get tour by ID No No
POST /api/tours Create tour Yes Yes โญ
PUT /api/tours/:id Update tour Yes Yes โญ
DELETE /api/tours/:id Delete tour Yes Yes โญ

Bookings

Method Endpoint Description Auth Required Admin Only
POST /api/bookings Create booking Yes No
GET /api/bookings Get user bookings Yes No
PUT /api/bookings/:id Cancel booking Yes No
GET /api/bookings/admin/all Get all bookings Yes Yes โญ

โญ = Admin-only endpoints (requires role: "admin" in JWT)

๐ŸŽฏ User Flow

Regular User Journey

  1. Register/Login โ†’ Create account or sign in
  2. Search & Filter โ†’ Find perfect tour using search and filters
  3. Browse Tours โ†’ View available Himalayan tours with details
  4. Book Tour โ†’ Select any future date and confirm booking
  5. Manage Bookings โ†’ View bookings, track status, cancel if needed

Admin Journey

  1. Login as Admin โ†’ Use admin credentials
  2. Access Dashboard โ†’ Click "Admin" in navigation
  3. Manage Tours โ†’ Create, edit, or delete tours
  4. Monitor Bookings โ†’ View all customer bookings and statuses

๐Ÿ”ฎ Future Enhancements

Completed โœ…

  • Admin dashboard for tour management
  • Search and filter tours
  • Flexible date selection

Planned ๐Ÿ“‹

  • Payment gateway integration (Stripe/PayPal)
  • Email notifications for bookings
  • Reviews and ratings system
  • Image upload functionality
  • Multi-language support
  • Revenue analytics dashboard
  • Export bookings to CSV
  • Calendar view for tour dates
  • Tour popularity metrics
  • Bulk tour operations

๐Ÿ› Troubleshooting

Can't see tours?

  • Add sample tours using the admin dashboard or MongoDB directly

Login not working?

  • Check MongoDB connection
  • Verify user exists in database

CORS errors?

  • Ensure backend CORS allows localhost:3000

Token expired?

  • Logout and login again

๐Ÿ“„ License

This is a demonstration project for tour booking functionality.

๐Ÿ‘ฅ Contributing

This project is in the developing phase. Feel free to fork and customize for your needs.


โœ… Project Status

Status: ๐Ÿšง Developing

Core Features

  • Frontend design and implementation
  • Backend API integration
  • JWT authentication system
  • Tour booking system
  • Booking management
  • Responsive design (mobile, tablet, desktop)
  • Comprehensive documentation

Advanced Features โญ

  • Search functionality
  • Price and duration filters
  • Flexible date selection (any future date)
  • Admin dashboard
  • Tour CRUD operations
  • Admin booking overview
  • Role-based access control
  • Professional UI with modals and tables

Code Quality

  • TypeScript for type safety
  • Clean, maintainable code structure
  • Error handling and validation
  • Security best practices (JWT, bcrypt)
  • RESTful API design
  • Component-based architecture

๐Ÿš€ Live Demo

Local Development:

Test Accounts:


๐Ÿ“œ License

This project is open source and available for educational and commercial use.


๐Ÿ™ Acknowledgments

  • Built with modern web technologies
  • Inspired by beautiful Himalayan landscapes
  • Designed for seamless user experience

Built with โค๏ธ for adventure seekers worldwide! ๐Ÿ”๏ธโ›ฐ๏ธ

Start your Himalayan adventure today at http://localhost:3000 ๐Ÿš€

About

A modern, full-featured tour booking web application with a beautiful green and white theme. Built with React, TypeScript, Express, and MongoDB. Includes advanced search, filtering, flexible date selection, and a comprehensive admin dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published