A full-stack travel booking platform featuring flights, hotels, treks, and international trips with an AI-powered chatbot and interactive 3D globe visualization.
- π« Multi-Service Booking: Flights, hotels, buses, trains, treks, and international packages
- π€ AI Chatbot: Gemini AI-powered support assistant
- π Interactive Globe: 3D visualization of destinations using Globe.gl
- π User Authentication: JWT-based login/signup with MongoDB
- π± PWA Support: Install as a mobile app
- π¨ Modern UI: Dark theme with smooth animations
- π³ Booking Management: Track and manage bookings
- β Reviews & Ratings: Customer feedback system
- HTML5, CSS3, JavaScript (ES6+)
- Globe.gl (3D visualization)
- PWA (Progressive Web App)
- Responsive design
- Python 3.x
- Flask (Web framework)
- MongoDB (Database)
- MongoEngine (ODM)
- Google Gemini AI (Chatbot)
- JWT (Authentication)
- Python 3.8+
- MongoDB 4.4+
- Google Gemini API Key
- Modern web browser
git clone https://github.com/arkham-knight07/tour-travel.git
cd tour-travelcd backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create .env file
cat > .env << EOF
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/travelmate
# JWT Configuration
JWT_SECRET=your-secret-key-change-this-in-production
# Google Gemini API
GEMINI_API_KEY=your-gemini-api-key-here
# Flask Configuration
FLASK_ENV=development
DEBUG=True
EOF
# Start MongoDB (macOS)
brew services start mongodb-community
# Run the backend server
python app.pyThe backend will start at http://127.0.0.1:5002
# Open a new terminal
cd frontend
# Serve the frontend (using Python's HTTP server)
python3 -m http.server 8000The frontend will be available at http://localhost:8000
tour-travel/
βββ frontend/
β βββ index.html # Homepage
β βββ manifest.json # PWA manifest
β βββ service-worker.js # Service worker for PWA
β βββ pages/ # HTML pages
β β βββ booking.html
β β βββ login.html
β β βββ globe.html
β β βββ ...
β βββ scripts/ # JavaScript modules
β β βββ api.js
β β βββ chatbot.js
β β βββ globe.js
β β βββ main.js
β βββ styles/ # CSS files
β βββ assets/ # Images, videos, icons
β βββ data/ # Static JSON data
β
βββ backend/
βββ app.py # Flask application entry point
βββ requirements.txt # Python dependencies
βββ api/ # API route blueprints
β βββ auth_routes.py # Authentication endpoints
β βββ places_routes.py # Places/destinations CRUD
β βββ booking_routes.py # Booking management
β βββ chatbot_routes.py # AI chatbot
β βββ tours_routes.py # Tour packages
βββ models/ # MongoDB models
β βββ user.py
β βββ place.py
β βββ booking.py
βββ services/ # Business logic
β βββ chatbot_service.py
β βββ booking_service.py
β βββ tour_service.py
βββ config/ # Configuration
β βββ database.py
βββ utils/ # Helper functions
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user profilePOST /api/auth/logout- Logout userPUT /api/auth/update- Update user profile
GET /api/places- Get all places (with filters)GET /api/places/<id>- Get specific placeGET /api/places/search?q=<query>- Search placesPOST /api/places- Create new placePUT /api/places/<id>- Update placeDELETE /api/places/<id>- Delete place
GET /api/bookings- Get all bookingsPOST /api/bookings- Create new booking
POST /chat- Send message to AI chatbotGET /chat/faq- Get FAQ data
GET /api/tours- Get tour packages
Create a .env file in the backend/ directory:
# Database
MONGODB_URI=mongodb://localhost:27017/travelmate
# JWT Authentication
JWT_SECRET=your-super-secret-jwt-key-change-this
# Google Gemini AI
GEMINI_API_KEY=your-gemini-api-key
# Flask
FLASK_ENV=development
DEBUG=True- Install Vercel CLI:
npm i -g vercel- Deploy frontend:
cd frontend
vercelOption 1: Railway/Render
- Push code to GitHub
- Connect repository to Railway/Render
- Add environment variables
- Deploy
Option 2: Heroku
cd backend
heroku create your-app-name
git push heroku mainImportant: Update API URLs in frontend after deploying backend!
-
Update API URLs in
frontend/scripts/api.js:const API_BASE = "https://your-backend-url.com";
-
Set MongoDB Atlas URL in backend
.env:MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/travelmate
-
Enable HTTPS cookies in
backend/api/auth_routes.py:secure=True # Change from False
-
Update CORS in
backend/app.pyfor your domain
cd backend
pytest# Health check
curl http://127.0.0.1:5002/health
# Get places
curl http://127.0.0.1:5002/api/places# Start MongoDB
brew services start mongodb-community # macOS
sudo systemctl start mongod # Linux# Kill process on port 5002
lsof -ti:5002 | xargs kill -9
# Or use a different port in app.py- Check backend CORS configuration
- Ensure frontend is making requests to correct backend URL
MIT License - feel free to use this project for learning or commercial purposes.
Created with β€οΈ by arkham-knight07 ,rayak25 ,Nav2428
Pull requests are welcome! For major changes, please open an issue first.
For support, email verdhanchiku@gmail.com or open an issue.
Happy Traveling!



