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.
- ๐ 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
- ๐ก๏ธ 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
- Node.js (v14+)
- MongoDB (local or Atlas)
- npm or yarn
- Clone the repository
git clone https://github.com/sugamghising/TourAndTravelApp.git
cd TourAndTravel- 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- Setup Frontend (in new terminal)
cd client
npm install
npm start- Create Admin User (in new terminal)
cd server
npm run create-adminDefault Admin Credentials:
- Email:
admin@himalayan.com - Password:
admin123
- Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Admin Dashboard: Login and click "Admin" in navbar
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
Beautiful hero section showcasing Himalayan mountains with featured services (adventure tours, expert guides, safe travel, best prices).
- 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
Manage your bookings with:
- Tour details and dates
- Status tracking (Pending/Confirmed/Cancelled)
- Payment status
- Cancel booking option
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
- React 19
- TypeScript
- Axios
- Context API
- CSS3
- Node.js
- Express
- MongoDB
- Mongoose
- JWT Authentication
- bcrypt
| 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 |
-
Create Account & Login
- Navigate to http://localhost:3000
- Register a new account
- Login with credentials
-
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
-
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
-
Manage Bookings
- Go to "My Bookings"
- View booking details
- Cancel a booking if needed
-
Login as Admin
- Use credentials:
admin@himalayan.com/admin123 - Click "Admin" button in navbar
- Use credentials:
-
Create Tour
- Click "+ Create New Tour"
- Fill form with sample data
- Submit and verify success message
-
Edit Tour
- Click "Edit" on any tour
- Modify details
- Submit and verify update
-
Delete Tour
- Click "Delete" on any tour
- Confirm deletion
- Verify tour is removed
-
View All Bookings
- Switch to "All Bookings" tab
- Verify booking data displays correctly
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
PORT=5000| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/auth/register |
Register new user | No |
| POST | /api/auth/login |
Login user | No |
| 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 โญ |
| 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)
- Register/Login โ Create account or sign in
- Search & Filter โ Find perfect tour using search and filters
- Browse Tours โ View available Himalayan tours with details
- Book Tour โ Select any future date and confirm booking
- Manage Bookings โ View bookings, track status, cancel if needed
- Login as Admin โ Use admin credentials
- Access Dashboard โ Click "Admin" in navigation
- Manage Tours โ Create, edit, or delete tours
- Monitor Bookings โ View all customer bookings and statuses
- Admin dashboard for tour management
- Search and filter tours
- Flexible date selection
- 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
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
This is a demonstration project for tour booking functionality.
This project is in the developing phase. Feel free to fork and customize for your needs.
Status: ๐ง Developing
- Frontend design and implementation
- Backend API integration
- JWT authentication system
- Tour booking system
- Booking management
- Responsive design (mobile, tablet, desktop)
- Comprehensive documentation
- 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
- TypeScript for type safety
- Clean, maintainable code structure
- Error handling and validation
- Security best practices (JWT, bcrypt)
- RESTful API design
- Component-based architecture
Local Development:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
Test Accounts:
- Admin: admin@himalayan.com / admin123
- User: Register your own account
This project is open source and available for educational and commercial use.
- 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 ๐