This repository contains my backend contributions to the Fanshawe College Capstone project Smart Travel System, an AI-powered travel planning assistant that integrates real-time Google data with generative AI for personalized travel experiences.
I developed two key backend modules — Smart Itinerary and Sentiment Insights — using FastAPI, Google Places API, and Gemini Flash 2.5.
These features enable the system to generate personalized travel itineraries and analyze user reviews dynamically.
Generates personalized, day-by-day travel itineraries using Google Places API and Gemini LLM.
- Receives user input — destination city, trip duration, and preferences
- Builds filtered Google Places queries for attractions and restaurants
- Retrieves photo references and metadata (name, rating, price, types)
- Sends the structured data + user filters to Gemini Flash 2.5
- Gemini generates a natural-language itinerary (Morning / Afternoon / Evening) with descriptions tailored to preferences
| Filter | Description | Example |
|---|---|---|
| Travel Type | Solo / Couple / Family / Friends | “Perfect for couples who enjoy peaceful escapes.” |
| Activity Theme | Adventure / Cultural / Relaxing / Shopping | “Start your morning with an exciting hike...” |
| Kid-Friendly | Boolean filter | Excludes bars, nightlife venues |
| Budget Level | 0–4 (Free → Luxury) | Controls both price level and descriptive tone |
| Days | Number of days to plan | Adjusts day count dynamically |
{
"city": "Toronto",
"days": 2,
"itinerary": [
{
"day": 1,
"morning": "Explore the CN Tower and nearby cafes.",
"afternoon": "Visit Ripley's Aquarium.",
"evening": "Enjoy dinner at a lakeside restaurant."
}
]
}Analyzes Google Maps reviews for selected places to produce concise AI-generated summaries.
- Retrieve reviews from Google Places Details API via Place ID
- Aggregate multiple review texts
- Use Gemini Flash 2.5 or a pretrained sentiment model (e.g. BERT/DistilBERT)
- Generate a structured sentiment summary
{
"place_id": "ChIJmzrzi9Y0K4gR3Y1XxJ8zN7M",
"overall_sentiment": "Positive",
"summary": "Visitors love the atmosphere and friendly staff, though parking is limited."
}- Real-time, zero-dataset review analysis using Google Places data
- Supports multiple languages and summarization styles via Gemini
- Scalable for integration with itinerary recommendations
Upcoming module for multilingual translation and conversational travel assistance using Gemini Flash 2.5 multilingual capabilities.
SmartTravelSystem_Backend_EiEiKhaing/
│
├── app.py
├── routers/
│ ├── itinerary.py # Smart Itinerary endpoint
│ ├── sentiment.py # Sentiment Insights endpoint
│
├── services/
│ ├── gemini_service.py # Handles Gemini LLM API interactions
│ ├── places_service.py # Handles Google Places API requests
│ └── sentiment_service.py # Performs review sentiment analysis
│
├── models/
│ ├── schemas.py # Pydantic request/response models
│
├── docs/
│ ├── Smart_Itinerary_filters_guide.md
│
└── requirements.txt
Framework: FastAPI
LLM Integration: Gemini Flash 2.5
External APIs: Google Places API, Google Photos API, Google Maps Reviews API
| Endpoint | Method | Description |
|---|---|---|
/itinerary/generate |
POST | Generate itinerary using city + filters |
/sentiment/{place_id} |
GET | Analyze sentiment for a Google Place |
/chatbot/query |
POST | (Coming soon) Multilingual chatbot |
- FastAPI for API framework
- Python 3.10+
- Gemini Flash 2.5 for AI-based text generation
- Google Places / Photos / Maps APIs
- SQLAlchemy & SQLite for local persistence
- Requests, Pydantic, Uvicorn
Copy .env.example and fill in your own API keys:
GEMINI_API_KEY=your_gemini_api_key_here
GOOGLE_API_KEY=your_google_places_key_here
# 1️⃣ Install dependencies
pip install -r requirements.txt
# 2️⃣ Run FastAPI server
uvicorn app:app --reload
# 3️⃣ Test endpoints
http://127.0.0.1:8000/docs| Module | Status | Description |
|---|---|---|
| Smart Itinerary | ✅ Completed | Integrated Google Places & Gemini |
| Sentiment Insights | ✅ Completed | Real-time review summarization |
| Language Buddy | 🚧 Planned | Multilingual conversational support |
- Integrate user authentication for personalized itinerary history
- Add caching layer to reduce Google API cost
- Expand Gemini prompts for richer itinerary storytelling
- Deploy on Render or AWS Lambda for public demo
Ei Ei Khaing
Graduate Certificate in Artificial Intelligence & Machine Learning
Fanshawe College | London, Ontario, Canada
FastAPI Gemini API Google Places AI Backend Travel Itinerary Sentiment Analysis Generative AI Python