✈ïļ Travel Assistant Bot

Comprehensive travel assistant bot project integrating AI capabilities, flight search, hotel booking, weather information, itinerary management, and travel recommendations. Features AI-powered travel assistance with conversation memory, flight search, hotel booking, weather checking, budget calculator, shareable itinerary links, multilingual UI, and dark mode.
Try Interactive Demo

📖 Project Overview

Travel Assistant Bot is a comprehensive travel assistant bot project that integrates OpenAI API with Flask to create a powerful travel assistant with AI capabilities. This project offers AI-powered travel assistance with conversation memory, flight search, hotel booking, weather checking, budget calculator, shareable itinerary links, itinerary management, travel recommendations, multilingual UI (English/Bengali), and dark mode. Perfect for travelers, travel agencies, and developers looking to create travel planning applications with AI-powered features and comprehensive travel services.

⚡ Quick Facts

ðŸŽŊ Type: Travel Assistant Bot with AI Capabilities
ðŸĪ– AI Features: OpenAI API, Conversation Memory, Travel Assistance, Flight Search, Hotel Booking, Weather Info
⚡ Setup Time: ~5 minutes
ðŸ“Ķ Backend: Python with Flask
ðŸŽĻ Frontend: HTML5, CSS3, JavaScript
🧠 AI Model: OpenAI GPT-3.5 Turbo
ðŸ“ą Platform: Web Application
🔧 Technologies: Python, Flask, OpenAI API, OpenWeather API
25+
Files
5000+
Lines of Code
20+
Advanced Features
200K
Context Tokens
Developer: Molla Samser | Website: rskworld.in | Email: help@rskworld.in
Difficulty Level: Intermediate - Perfect for developers learning Python, Flask, OpenAI API integration, travel application development, and web development.

âœĻ Features

Core Features

ðŸĪ– OpenAI API Integration

Seamless integration with OpenAI GPT models for AI-powered travel assistance with conversation memory and context awareness.

🧠 Conversation Memory

Maintains conversation context for better travel assistance and recommendations with efficient memory storage per user.

✈ïļ Flight Search

Search and compare flights by origin, destination, and date. Find the best flight options for your travel plans.

ðŸĻ Hotel Booking

Find and book hotels by city, check-in, and check-out dates. Get hotel recommendations for your destination.

Advanced Features

☁ïļ Weather Information

Get real-time weather data for any destination via OpenWeather API. Plan your trip with current weather conditions and forecasts.

🗚ïļ Itinerary Management

Create, save, update, and manage travel itineraries. Organize your trip details in one place with shareable links.

💰 Budget Calculator

Calculate total trip costs including flights, hotels, and extras. Plan your travel budget effectively.

🌙 Dark Mode

Toggle between light and dark themes for comfortable viewing in any lighting condition.

🌐 Multilingual Support

Support for English and Bengali (āĶŽāĶūāĶ‚āĶēāĶū) languages. Switch between languages seamlessly.

🔗 Shareable Links

Generate shareable itinerary links to share your travel plans with friends and family.

ðŸŽŊ Travel Recommendations

Get personalized travel recommendations based on your preferences and interests.

ðŸ‘Ī User Authentication

Register and login with JWT-based authentication. Save your itineraries and access them anytime.

📊 Admin Dashboard

Monitor usage metrics and analytics. Track events and system performance.

⚡ Rate Limiting

Prevent API abuse with configurable rate limits for better performance and security.

ðŸ’ū Database Storage

SQLite database for storing itineraries, user data, and analytics. Lightweight and efficient.

🔄 Caching System

Cache API responses for better performance and reduced API costs. Faster response times.

🛠ïļ Technologies

Python

Core programming language for Travel Assistant Bot

Language

Flask

Python web framework for building REST API

Framework

OpenAI API

AI model integration for travel assistance

AI API

OpenWeather API

Weather data integration for destinations

Weather API

PyJWT

JWT token generation and validation for authentication

Auth

SQLite

Lightweight database for storing data

Database

requests

HTTP library for API calls

HTTP

ðŸ“Ķ Installation Guide - Step by Step

⏱ïļ Installation Time: ~5 minutes

Follow these simple steps to set up the Travel Assistant Bot on your system.

📋 Prerequisites

🐍 Python 3.8+

Python 3.8 or higher required for the Flask backend

Download: Python

🌐 OpenAI API Key

Get your API key from OpenAI Platform (required for AI travel assistance)

Get Key: OpenAI Platform

🌐 OpenWeather API Key

Get your API key from OpenWeatherMap (required for weather information)

Get Key: OpenWeatherMap API

🌐 Internet Connection

Required for OpenAI API, OpenWeather API, and web application access

🚀 Step-by-Step Installation

📌 Step 1: Download or Clone the Project

Option A: Download ZIP

  1. Download the project ZIP file from the repository
  2. Extract it to your desired location (e.g., C:\Projects\travel-assistant-bot or ~/Projects/travel-assistant-bot)
  3. Navigate to the extracted folder

Option B: Clone with Git

git clone https://github.com/rskworld/travel-assistant-bot.git
cd travel-assistant-bot
✅ Step 2: Install Python Dependencies

Install required Python packages using pip.

# Install dependencies
pip install -r requirements.txt
🔑 Step 3: Set Up API Keys

Configure your OpenAI API key and OpenWeather API key in the environment file.

  1. Copy .env.example to .env
  2. Edit .env and add your keys:
    • OPENAI_API_KEY=sk-your-openai-key-here
    • OPENWEATHER_API_KEY=your-openweather-key-here
    • JWT_SECRET=your-secret-key-here (for authentication)
    • RATE_LIMIT_PER_MIN=120 (optional, default: 120)
  3. Get your OpenAI API key from OpenAI Platform
  4. Get your OpenWeather API key from OpenWeatherMap API
🚀 Step 4: Start the Flask Server

Start the Flask backend server by running app.py.

# Start Flask server
python app.py

# The server will start on http://localhost:5000
# Open the web application in your browser
🌐 Step 5: Open Frontend

Open the HTML file in your browser or use a local web server.

Method 1: Direct File Opening

  1. Open index.html in your browser

Method 2: Using Local Web Server (Recommended)

# In a new terminal, start HTTP server
python -m http.server 8000

# Then open: http://localhost:8000

✅ Installation Complete!

Congratulations! You've successfully set up the Travel Assistant Bot. The application is ready to use with all features including:

  • OpenAI API integration for AI-powered travel assistance
  • Conversation memory for context-aware travel planning
  • Flight search functionality
  • Hotel booking functionality
  • Weather information via OpenWeather API
  • Itinerary management and sharing
  • Budget calculator for trip planning
  • Travel recommendations based on preferences
  • Multilingual UI (English/Bengali)
  • Dark mode support
  • User authentication with JWT

Next Steps:

  1. Ensure the Flask server is running (Step 4)
  2. Open the web application in your browser
  3. Try searching for flights, hotels, or weather information
  4. Create and manage your travel itineraries
  5. Explore all the features and customization options!

🔧 Troubleshooting Installation

❌ API Key Issues

Solution: Ensure your .env file contains valid OPENAI_API_KEY and OPENWEATHER_API_KEY. Check API keys have sufficient credits.

❌ Flask Server Not Starting

Solution: Check Python version (3.8+), verify dependencies installed with pip install -r requirements.txt, ensure port 5000 is available.

❌ Connection Errors

Solution: Verify Flask server is running on port 5000, check static/js/app.js has correct API endpoints, ensure CORS is enabled in Flask.

❌ Import Errors

Solution: Reinstall dependencies, check virtual environment is activated, verify all packages in requirements.txt are installed.

📚 Usage Guide - Step by Step

ðŸŽŊ Getting Started with Travel Assistant Bot

Step-by-Step Usage Instructions

📝 Step 1: Start Backend Server

  1. Ensure Flask server is running: python app.py
  2. Check server status at http://localhost:5000/api/health
  3. You should see: {"status":"healthy"}

🌐 Step 2: Open Frontend

  1. Open the web application in your browser (or access via Flask templates)
  2. You should see the Travel Assistant Bot interface with:
    • Chat messages area for travel assistance
    • Text input field
    • Send button
    • Quick tools panel (Flight Search, Hotel Booking, Weather, Itinerary)
    • Language selector (English/Bengali)
    • Dark mode toggle
    • Budget calculator

💎 Step 3: Start Chatting

  1. Text Input: Type your message and press Enter or click Send
  2. Voice Input: Click microphone button and speak (optional)
  3. File Upload: Click paperclip icon to attach images or documents
  4. Try These:
    • "Find flights from New York to Paris for next month"
    • "Search hotels in Tokyo for 3 nights"
    • "What's the weather like in London?"
    • "Help me plan a 5-day trip to Paris"
    • "What are the best travel destinations in Asia?"
    • "Calculate budget for a 7-day trip to Barcelona"
  5. View Responses: The bot will respond with flight options, hotel suggestions, weather information, itinerary plans, and travel recommendations

⚙ïļ Step 4: Customize Settings

Click the Settings button to customize your experience:

  • Language Selection: Choose language (English/Bengali)
  • Max Tokens: Set maximum response length (1-4096)
  • Temperature: Control response creativity (0-1)
  • Stream Response: Toggle real-time streaming
  • Voice Settings: Configure voice input/output options
  • Language: Select language for voice features
  • Auto Speak: Toggle automatic text-to-speech
  • Dark Mode: Toggle between light and dark themes

📊 Step 5: Explore Advanced Features

Try out the advanced features:

  • Multiple Sessions: Create and manage multiple chat sessions
  • Itinerary Management: Create, save, and manage travel itineraries
  • Export: Export chat history as PDF or TXT files
  • Code Highlighting: View code with syntax highlighting
  • Markdown Rendering: See formatted text with markdown support
  • API Usage: Monitor token usage and API statistics
  • Quick Templates: Use pre-built conversation templates
  • Chat Search: Search through conversation history

ðŸ’ŧ Using Travel Assistant Bot

You can use these features in the web application:

# Travel Assistant Bot Features - AI Chat: Ask travel-related questions - Flight Search: Search flights by origin, destination, date - Hotel Search: Find hotels by city, check-in, check-out dates - Weather: Get weather information for any location - Itinerary: Create, save, and manage travel itineraries - Budget Calculator: Calculate total trip costs - Recommendations: Get personalized travel recommendations - Share: Generate shareable itinerary links
# Example Usage in Travel Assistant User: "Find flights from NYC to Paris for next month" Bot: [Flight options with prices and times] User: "Search hotels in Tokyo for 3 nights" Bot: [Hotel suggestions with ratings and prices] User: "What's the weather in London?" Bot: [Current weather and 7-day forecast]

📊 Features Usage

ðŸĪ– AI Travel Assistant

Ask travel-related questions and get AI-powered assistance with planning

✈ïļ Flight Search

Search flights by origin, destination, and date. Compare prices and times

ðŸĻ Hotel Booking

Find hotels by city, check-in, and check-out dates. Get recommendations

☁ïļ Weather Information

Get real-time weather data and forecasts for your destination

🗚ïļ Itinerary Management

Create, save, update, and manage travel itineraries with shareable links

💰 Budget Calculator

Calculate total trip costs including flights, hotels, and extras

ðŸŽŊ Recommendations

Get personalized travel recommendations based on preferences

🌐 Multilingual UI

Switch between English and Bengali languages seamlessly

🚀 Advanced Features & Capabilities

The Travel Assistant Bot includes advanced AI capabilities, flight search, hotel booking, weather information, and itinerary management. Here's what you can do:

🧠 AI-Powered Travel Assistance

Intelligent travel planning and recommendations

The AI-powered travel assistant excels at travel planning, itinerary creation, destination recommendations, and answering travel-related questions. Ask about flights, hotels, destinations, or trip planning and get detailed, helpful responses.

✈ïļ Flight Search & Booking

Search and compare flights

Search flights by origin, destination, and date. Compare prices, airlines, and flight times. Get the best flight options for your travel plans with detailed information.

ðŸĻ Hotel Search & Booking

Find and book hotels

Search hotels by city, check-in, and check-out dates. Get hotel recommendations with ratings, prices, amenities, and locations. Find the perfect accommodation for your trip.

☁ïļ Weather Information

Real-time weather data and forecasts

Get real-time weather information for any destination. View current conditions, 7-day forecasts, temperature, humidity, and wind speed. Plan your trip with accurate weather data.

ðŸ’Ą Interactive Features: All features are interactive and responsive. Settings are automatically saved, and the interface adapts to your preferences. The chatbot supports both streaming and non-streaming responses for optimal user experience.

ðŸ’ŧ Code Examples

Basic Travel Assistant Bot API Integration

# Python Flask backend - app.py from flask import Flask, request, jsonify from services.openai_service import generate_response from services.flight_service import search_flights app = Flask(__name__) @app.route('/api/chat', methods=['POST']) def chat(): data = request.json messages = data.get('messages', []) reply = generate_response(messages) return jsonify({'reply': reply}) @app.route('/api/flights', methods=['POST']) def flights(): data = request.json origin = data.get('origin') destination = data.get('destination') date = data.get('date') results = search_flights(origin, destination, date) return jsonify({'flights': results}) if __name__ == '__main__': app.run(debug=True, port=5000)

JavaScript Frontend Integration

// Frontend JavaScript - app.js async function sendMessage(message) { const response = await fetch('http://localhost:5000/api/chat', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ messages: [{'role': 'user', 'content': message}] }) }); const data = await response.json(); return data.reply; } async function searchFlights(origin, destination, date) { const response = await fetch('http://localhost:5000/api/flights', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({origin, destination, date}) }); const data = await response.json(); return data.flights; } // Usage sendMessage('Find flights from NYC to Paris').then(response => { console.log('Travel Assistant:', response); });

Complete Travel Assistant Bot Example

// Travel Assistant Bot Class class TravelAssistantBot { constructor(apiUrl) { this.apiUrl = apiUrl || 'http://localhost:5000/api'; this.conversationHistory = []; } async sendMessage(message) { this.conversationHistory.push({role: 'user', content: message}); const response = await fetch(this.apiUrl + '/chat', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ messages: this.conversationHistory }) }); const data = await response.json(); // Update conversation history this.conversationHistory.push({role: 'assistant', content: data.reply}); return data.reply; } async searchFlights(origin, destination, date) { const response = await fetch(this.apiUrl + '/flights', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({origin, destination, date}) }); const data = await response.json(); return data.flights; } clearHistory() { this.conversationHistory = []; } } // Usage const travelBot = new TravelAssistantBot(); travelBot.sendMessage('Find flights from NYC to Paris').then(response => { console.log('Travel Assistant:', response); });

Configuration Example

// Frontend config - app.js const TravelBotConfig = { api: { baseUrl: 'http://localhost:5000/api', endpoints: { chat: '/chat', flights: '/flights', hotels: '/hotels', weather: '/weather', itinerary: '/itineraries' } }, ui: { animationDuration: 300, messageDelay: 500, defaultLanguage: 'en' } }; // Access configuration console.log(TravelBotConfig.api.baseUrl);
# Backend config - Environment variables (.env) OPENAI_API_KEY=sk-your-openai-key-here OPENWEATHER_API_KEY=your-openweather-key-here JWT_SECRET=your-secret-key-here RATE_LIMIT_PER_MIN=120 PORT=5000

🔗 Travel Assistant Bot API Integration

Travel Assistant Bot API Integration

The application integrates with OpenAI API for AI-powered travel assistance and OpenWeather API for weather information. The backend uses Python Flask to handle API calls, while the frontend uses JavaScript for user interactions and response rendering.

Available APIs & Technologies

API/Technology Type Description
OpenAI API AI API AI-powered travel assistance and recommendations
OpenWeather API Weather API Real-time weather data and forecasts
Flask REST API Backend Python Flask server for API endpoints
SQLite Database Database Store itineraries, user data, and analytics
JWT Authentication Auth User authentication and authorization

Backend API Endpoints

# Flask Backend - app.py @app.route('/api/chat', methods=['POST']) def api_chat(): data = request.json messages = data.get('messages', []) reply = generate_response(messages) return jsonify({'reply': reply}) @app.route('/api/flights', methods=['POST']) def api_flights(): data = request.json origin = data.get('origin') destination = data.get('destination') date = data.get('date') results = search_flights(origin, destination, date) return jsonify({'flights': results}) @app.route('/api/hotels', methods=['POST']) def api_hotels(): data = request.json city = data.get('city') check_in = data.get('check_in') check_out = data.get('check_out') results = search_hotels(city, check_in, check_out) return jsonify({'hotels': results}) @app.route('/api/weather', methods=['POST']) def api_weather(): data = request.json location = data.get('location') info = get_weather(location) return jsonify({'weather': info})
// Frontend JavaScript - API Integration async function sendMessage(message) { try { const response = await fetch('http://localhost:5000/api/chat', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ messages: [{'role': 'user', 'content': message}] }) }); if (!response.ok) { throw new Error('API request failed'); } const data = await response.json(); return data.reply; } catch (error) { console.error('Error:', error); return 'Error: ' + error.message; } } async function searchFlights(origin, destination, date) { const response = await fetch('http://localhost:5000/api/flights', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({origin, destination, date}) }); const data = await response.json(); return data.flights; }

Browser Compatibility

// Check Travel Assistant Bot API Connection async function checkHealth() { try { const response = await fetch('http://localhost:5000/api/health'); const data = await response.json(); console.log('Server Status:', data.status); return data.status === 'healthy'; } catch (error) { console.error('Health check failed:', error); return false; } } // Recommended setup: // - Backend: Python 3.8+ with Flask // - Frontend: Modern browsers (Chrome, Edge, Safari, Firefox) // - Database: SQLite (included with Python) // - APIs: OpenAI API, OpenWeather API (optional)

⚙ïļ Configuration

Configuration in this application is handled through environment variables and settings files:

Environment Variables

Create a .env file in the project root (copy from .env.example):

# .env file OPENAI_API_KEY=sk-your-openai-key-here OPENWEATHER_API_KEY=your-openweather-key-here JWT_SECRET=your-secret-key-here RATE_LIMIT_PER_MIN=120 PORT=5000

Note: Get your API keys from OpenAI Platform and OpenWeatherMap API. Never commit your .env file to version control.

Python Configuration

The application uses environment variables for configuration:

# Environment variables from .env file import os OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') OPENWEATHER_API_KEY = os.getenv('OPENWEATHER_API_KEY') JWT_SECRET = os.getenv('JWT_SECRET', 'default-secret-key') RATE_LIMIT_PER_MIN = int(os.getenv('RATE_LIMIT_PER_MIN', '120')) PORT = int(os.getenv('PORT', '5000')) # Used in app.py and services

Frontend Configuration

Edit static/js/app.js to configure API endpoints:

// static/js/app.js const API_BASE_URL = 'http://localhost:5000/api'; // API endpoints const ENDPOINTS = { chat: '/api/chat', flights: '/api/flights', hotels: '/api/hotels', weather: '/api/weather', itinerary: '/api/itineraries' };

Browser LocalStorage Settings

User settings are automatically saved to browser's local storage:

// Settings are saved automatically localStorage.setItem('travelBotSettings', JSON.stringify({ language: 'en', // 'en' or 'bn' darkMode: false, defaultOrigin: '', defaultDestination: '' })); // Load settings const settings = JSON.parse(localStorage.getItem('travelBotSettings'));

Runtime Configuration

Configure settings through the web interface:

  • Language: Select language (English/Bengali)
  • Dark Mode: Toggle between light and dark themes
  • Default Origin: Set default flight origin city
  • Default Destination: Set default flight destination city
  • Currency: Select currency for prices (USD, EUR, etc.)
  • Units: Select temperature units (Celsius/Fahrenheit)

All settings are saved automatically and persist across browser sessions.

📁 Project Structure

travel-assistant-bot
travel-assistant-bot/
├── app.py             # Flask backend server with API endpoints
├── db.py              # Database operations (SQLite)
├── auth.py            # JWT authentication and user management
├── analytics.py       # Event logging and metrics
├── requirements.txt   # Python dependencies
├── .env.example       # Environment variables template
├── .gitignore         # Git ignore rules
├── README.md          # Project overview and quick start guide
├── RELEASE_NOTES.md   # Release notes
├── LICENSE.md         # MIT License file
├── run.ps1            # PowerShell start script
├── travel.db          # SQLite database file
├── services/          # Services directory
│   ├── openai_service.py      # OpenAI API integration
│   ├── flight_service.py      # Flight search functionality
│   ├── hotel_service.py       # Hotel booking functionality
│   ├── weather_service.py     # Weather information
│   ├── recommendation_service.py # Travel recommendations
│   └── cache.py               # Caching utilities
├── templates/         # HTML templates
│   ├── index.html     # Main travel assistant interface
│   ├── admin.html     # Admin dashboard
│   ├── share.html     # Shareable itinerary page
│   ├── readme.html    # README page
│   └── license.html   # License page
└── static/            # Static assets
    ├── css/
    │   └── style.css  # CSS styling
    └── js/
        └── app.js     # JavaScript functionality

Note: Edit .env to configure API keys and settings.

📄 Detailed File Descriptions

📄 templates/index.html

Purpose: Main HTML template with travel assistant interface. Contains the complete UI structure and layout.

Key Features:

  • Chat messages container for travel assistance
  • Input area with text input
  • Quick tools panel (Flight Search, Hotel Booking, Weather, Itinerary)
  • Language selector (English/Bengali)
  • Dark mode toggle
  • Budget calculator

ðŸŽĻ static/css/style.css

Purpose: CSS styling with modern design. Contains all visual styles and animations.

Key Features:

  • Modern gradient backgrounds
  • Responsive design
  • Dark mode support
  • Smooth animations
  • Mobile-friendly layout

⚙ïļ static/js/app.js

Purpose: JavaScript functionality and API integration. Core travel assistant logic and frontend features.

Key Features:

  • OpenAI API integration
  • Flight search functionality
  • Hotel booking functionality
  • Weather information display
  • Itinerary management
  • Budget calculator
  • Multilingual support
  • Dark mode toggle

🐍 app.py

Purpose: Flask backend server with API endpoints for travel assistant features.

Key Features:

  • RESTful API endpoints
  • OpenAI API integration
  • Flight search API
  • Hotel booking API
  • Weather API integration
  • Itinerary management
  • JWT authentication
  • Rate limiting
  • CORS configuration

🗄ïļ db.py

Purpose: Database operations using SQLite for storing itineraries and user data.

Key Features:

  • Database initialization
  • Itinerary CRUD operations
  • User data management
  • Share token generation
  • Database migrations

🔐 auth.py

Purpose: JWT authentication and user management for secure access.

Key Features:

  • User registration
  • User login
  • JWT token generation
  • Authentication middleware
  • Admin authorization

📖 README.md

Purpose: Project overview and quick start guide. Provides introduction, features, installation instructions, and usage examples.

Contents:

  • Project description
  • Features list
  • Installation guide
  • Usage instructions
  • Browser compatibility
  • Support information

📝 RELEASE_NOTES.md

Purpose: Release notes. Documents features, changes, and updates in the current version.

Contents:

  • Release information
  • Feature list
  • Technical details
  • Changelog

⚖ïļ LICENSE

Purpose: License file. Contains the license text and copyright information.

License Type: MIT License

Copyright: ÂĐ 2026 RSK World

ðŸšŦ .gitignore

Purpose: Git ignore rules. Specifies files and directories that should not be tracked by version control.

Excluded Items:

  • IDE configuration files
  • OS-specific files
  • Log files
  • Build artifacts

📊 File Statistics

25+
Total Files
8
Core Files
9
Documentation Files
5000+
Lines of Code
20+
Advanced Features
200K
Context Tokens

📌 File Organization

Frontend Files: templates/index.html, static/css/style.css, static/js/app.js

Backend Files: app.py, db.py, auth.py, analytics.py

Services: services/openai_service.py, services/flight_service.py, services/hotel_service.py, services/weather_service.py, services/recommendation_service.py, services/cache.py

Documentation: README.md, RELEASE_NOTES.md, LICENSE.md

Configuration: .env.example, .gitignore, requirements.txt

Scripts: run.ps1

Full-Stack: Python Flask backend + HTML/CSS/JavaScript frontend with OpenAI API and OpenWeather API integration

🚀 Advanced Features Details

1. OpenAI API Integration

Seamless integration with OpenAI API for AI-powered travel assistance. Supports conversation memory and context-aware responses for better travel planning.

2. Flight Search

Search and compare flights by origin, destination, and date. Find the best flight options with prices, airlines, and flight times for your travel plans.

3. Hotel Booking

Find and book hotels by city, check-in, and check-out dates. Get hotel recommendations with ratings, prices, amenities, and locations.

4. Weather Information

Get real-time weather data and forecasts for any destination via OpenWeather API. Plan your trip with current weather conditions and forecasts.

5. Itinerary Management

Create, save, update, and manage travel itineraries. Organize your trip details in one place with shareable links for friends and family.

6. Budget Calculator

Calculate total trip costs including flights, hotels, and extras. Plan your travel budget effectively with automatic calculations.

7. Travel Recommendations

Get personalized travel recommendations based on your preferences and interests. Discover new destinations and plan perfect trips.

8. Shareable Links

Generate unique shareable links for your itineraries. Share your travel plans with friends and family easily.

9. Multilingual Support

Support for English and Bengali (āĶŽāĶūāĶ‚āĶēāĶū) languages. Switch between languages seamlessly for better user experience.

10. User Authentication

Register and login with JWT-based authentication. Save your itineraries and access them anytime across devices.

11. Admin Dashboard

Monitor usage metrics and analytics. Track events, system performance, and user activity with comprehensive dashboard.

12. Dark Mode & Customization

Toggle between light and dark themes. Customizable language preferences, default settings, and UI preferences with auto-save functionality.

🔧 Troubleshooting

API Key Issues

  • Ensure your .env file contains valid OPENAI_API_KEY and OPENWEATHER_API_KEY
  • Check that the API keys are correctly formatted and not expired
  • Verify your API keys have sufficient credits in OpenAI Platform and OpenWeatherMap
  • Make sure the .env file is in the project root directory
  • Restart the Flask server after updating the API keys

Flask Server Issues

  • Server not starting: Check Python version (3.8+), verify dependencies installed with pip install -r requirements.txt
  • Port 5000 in use: Change port in .env file or stop other applications using port 5000
  • Import errors: Ensure virtual environment is activated, reinstall dependencies
  • CORS errors: Verify Flask-CORS is installed and enabled in app.py
  • Connection refused: Check firewall settings, ensure server is running on correct port

Frontend Connection Issues

  • Failed to fetch: Ensure Flask server is running, check API_BASE_URL in static/js/app.js
  • CORS errors: Make sure CORS is enabled in Flask (already configured in app.py)
  • Server offline indicator: Check server status at http://localhost:5000/api/health
  • Port mismatch: Verify frontend API_BASE_URL matches backend port

Common Issues

  • API key not found: Create .env file from .env.example and add your API keys
  • Module not found: Install dependencies with pip install -r requirements.txt
  • Response errors: Check API key validity, verify credits, check OpenAI/OpenWeather API status
  • Flight/Hotel search not working: These are placeholder services - implement real API integration if needed
  • Weather not working: Verify OpenWeather API key is valid and has sufficient credits

📋 Requirements

Backend Requirements: - Python 3.8 or higher - Flask 3.0.0 web framework - OpenAI Python SDK - PyJWT for authentication - requests for HTTP calls - SQLite (included with Python) Frontend Requirements: - Modern Web Browser (Chrome, Edge, Safari, Firefox) - JavaScript ES6+ support - LocalStorage API API Requirements: - OpenAI API Key (get from platform.openai.com) - OpenWeather API Key (get from openweathermap.org) - optional - Active internet connection for API calls Python Dependencies (see requirements.txt): - flask==3.0.0 - openai==1.57.0 - requests==2.32.3 - PyJWT (for authentication) Optional Dependencies: - OpenWeather API for weather information - Additional packages as needed

Browser Compatibility: Chrome, Edge, Safari, or Firefox (all modern browsers supported).

Python Version: Python 3.8 or higher required for backend server.

Internet Connection: Required for OpenAI API calls, OpenWeather API calls, and CDN resources.

ðŸŽŊ Use Cases

✈ïļ Flight Planning

Search and compare flights for travel planning and booking

ðŸĻ Hotel Booking

Find and book hotels for your travel destinations

🗚ïļ Trip Planning

Plan complete trips with itineraries and recommendations

💰 Budget Planning

Calculate trip costs and plan travel budgets

☁ïļ Weather Checking

Check weather conditions for travel destinations

ðŸŽŊ Travel Recommendations

Get personalized destination and activity recommendations

📋 Itinerary Management

Create, save, and share travel itineraries

🌐 Travel Agency Tools

Build travel booking systems and agency applications

💎 Support

For support, questions, or more projects:

📄 License

This project is provided as-is for educational and development purposes.

MIT License - See LICENSE file for details.

📂 Demo Folder Structure

The demo/ folder contains demonstration and documentation files for this project.

demo/ ├── index.html # This comprehensive documentation page ├── demo.html # Interactive demo interface for testing Travel Assistant Bot ├── style.css # CSS styling for documentation and demo └── script.js # JavaScript for scroll, navigation, and interactions
Try Interactive Demo

📄 Demo Files Description

📄 index.html

Purpose: Comprehensive project documentation and information page. This HTML file contains all details about the Travel Assistant Bot project.

Contents:

  • Complete project overview
  • All features documentation
  • Installation instructions
  • Usage examples
  • Code examples
  • OpenAI API integration reference
  • Configuration details
  • Detailed file and folder descriptions
  • Project structure
  • Troubleshooting guide
  • Support information

Features:

  • Self-contained HTML with external CSS
  • Responsive design
  • Modern, beautiful UI
  • Well-organized sections
  • Easy navigation with smooth scrolling

ðŸŽĻ style.css

Purpose: CSS stylesheet file with modern styling for the documentation page.

Features:

  • Modern gradient backgrounds
  • Responsive design
  • Beautiful typography
  • Smooth animations
  • Sticky navigation
  • Scroll progress bar

📜 script.js

Purpose: JavaScript file with interactive features for the documentation page.

Features:

  • Scroll progress bar
  • Back to top button
  • Smooth scrolling navigation
  • Active navigation highlighting
  • Copy to clipboard functionality

ðŸŽŪ demo.html

Purpose: Interactive demo interface showcasing Travel Assistant Bot features.

Features:

  • Interactive chat interface
  • Sample travel assistant responses
  • Quick action buttons (Flight Search, Hotel Booking, Weather, Trip Planning, etc.)
  • Feature showcase panel
  • Statistics tracking
  • Beautiful, responsive UI
  • Demo message types (flight, hotel, weather, plan, recommendations, budget)

Usage: Open demo.html in your browser to try the interactive demo!

ðŸ’Ą About the Demo Folder

The demo/ folder contains demonstration and documentation files for the Travel Assistant Bot project:

  • Documentation: index.html - Comprehensive HTML documentation page explaining the entire project
  • Interactive Demo: demo.html - Live interactive demo showcasing Travel Assistant Bot features
  • Styling: style.css - CSS stylesheet with modern design
  • Scripts: script.js - JavaScript for scroll, navigation, and interactive features

Note: To view the documentation, open demo/index.html in your browser. To try the interactive demo, open demo.html. Both pages are self-contained and work independently.