Skip to content

TripMate – A JavaFX + Flask travel planner powered by LangChain + LangGraph, featuring an AI chatbot for flight search, weather insights, seasonal trends, city images, and trending destinations.

Notifications You must be signed in to change notification settings

parthj732005/tripmate-app-v2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌍✈️ TripMate

TripMate is a JavaFX + Flask travel planner with an AI chatbot powered by LangChain and OpenAI, offering:

  • 🌤 Weather updates
  • 🗓 Best months to visit
  • 🎼 City images
  • ✈️ Flight search

📌 Prerequisites

Before running TripMate, install:


🔑 API Keys Required

You'll need API keys for:

  • OpenWeather – weather data
  • Amadeus API – flight search
  • Unsplash or Pexels – image gallery
  • OpenAI API – AI chatbot (LangChain + GPT integration)

🔗 Store them in: config/api_keys.json (Refer to api_keys_example.json in the repo for format.)


📂 Project Structure

TripMate/
├── backend/ # Flask backend + AI modules
│   ├── app.py # Main Flask entry point
│   ├── chatbot_module.py # LangGraph + LangChain ReAct agent for AI chatbot
│   ├── db_module.py # SQLite database setup & logging
│   ├── gallery_module.py # Fetches city images via Unsplash/Pexels
│   ├── seasons_module.py # Provides best visiting months per city
│   ├── weather_module.py # Fetches live weather data
│   ├── requirements.txt # Backend dependencies
│   ├── install_dependencies.bat # Windows setup script
│   └── database/ # Contains SQLite DB
│       └── tripmate.db
│
├── frontend/ # JavaFX frontend
│   ├── Main.java
│   ├── resources/
│   └── ...
│
├── config/ # Contains API keys (excluded from GitHub)
│   └── api_keys.json
│
├── lib/ # External libraries for JavaFX
│   └── json-20210307.jar
│
└── README.md # Documentation

🚀 Features

  • 🔍 City Search for weather and travel data
  • 💬 AI Chatbot powered by LangChain and OpenAI GPT
  • 🌦 Live Weather using OpenWeather API
  • 🕧 Best Months to Visit from seasonal trends
  • 🎼 Photo Gallery with city images
  • 📊 Trends Tab showing visualizations of what cities users searched in the search tab**

🧠 💬 AI Chatbot — LangChain + LangGraph

TripMate includes a LangChain-powered AI assistant for travel planning.

✨ What It Does

  • Answers travel questions conversationally
  • Searches real ✈️ flight options using Amadeus API
  • Fetches 🌦 weather data via OpenWeather API
  • Integrates multiple sources (weather + flights + search data) into one intelligent response

⚙️ How It Works

The backend (chatbot_module.py) uses:

  • LangChain for reasoning, memory, and prompt management
  • LangGraph for building modular agent workflows
  • OpenAI GPT-4o-mini model for conversational replies

Example Flow:

User → "Find flights from Delhi to Zurich on June 10"
↓
LangChain Agent → Extracts origin/destination/date
↓
Tool Call → Amadeus API returns flight data
↓
TripMate → Responds with flight timings, price & weather info

🛠 Setup Instructions

1️⃣ Clone the Repository

git clone https://github.com/parthj732005/tripmate-app.git
cd tripmate-app

2️⃣ Backend Setup (Flask + Python)

cd backend
pip install -r requirements.txt
python app.py

💡 Add your API keys in config/api_keys.json.

3️⃣ Frontend Setup (JavaFX) — Windows Example

cd frontend
javac --module-path "C:\javafx-sdk-21\lib" --add-modules javafx.controls,javafx.fxml -cp "../lib/json-20210307.jar" Main.java
java --module-path "C:\javafx-sdk-21\lib" --add-modules javafx.controls,javafx.fxml -cp ".;../lib/json-20210307.jar" Main

(Mac/Linux users should adjust the JavaFX path accordingly.)


📌 Usage

1️⃣ Start the backend → python app.py
2️⃣ Run the JavaFX frontend
3️⃣ Search any city for weather, best months, and images
4️⃣ Chat with the AI assistant for flight info or trip suggestions

🤝 Contributing

Contributions, issues, and feature requests are welcome!

👨‍💻 Author

Parth Jade
GitHub: @parthj732005

About

TripMate – A JavaFX + Flask travel planner powered by LangChain + LangGraph, featuring an AI chatbot for flight search, weather insights, seasonal trends, city images, and trending destinations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published