Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

🧭 Dream Destiny β€” AI Travel Planner

Python FastAPI Docker Gemini

An intelligent, multi-service travel planning platform that orchestrates real-time tourism, accommodation, transport, and routing data to generate grounded, optimized, day-by-day itineraries.


πŸ›οΈ Architecture & Services

The platform follows a modular microservice architecture. Specialized domain services fetch verified provider data, while the Planner Service coordinates data aggregation and invokes a constrained AI planning agent.

graph TD
 Client[Client / test_plan.py] -->|POST /plan| Planner[planner-service :8000]
 Planner -->|GET /tourism| Tourism[tourism-service :8001]
 Planner -->|GET /hotels| Hotel[hotel-service :8002]
 Planner -->|GET /route| Route[route-service :8003]
 Planner -->|GET /api/v1/buses| Bus[bus-service :8004]
 Planner -->|GET /api/v1/trains| Train[train-service :8005]
 Planner -->|Structured Prompt| Gemini[Google Gemini 2.5 Flash]
 Hotel -->|SQLite Cache| HotelVol[(hotel-cache-data)]
Loading
Service Port Responsibility Data Source / Engine
planner-service 8000 Orchestrates all services, builds TripContext, and executes Gemini Planning Agent FastAPI, Google GenAI SDK
tourism-service 8001 Discovers verified attractions and points of interest Google Places API (New)
hotel-service 8002 Fetches bookable accommodations with SQLite persistent caching SerpApi (Google Hotels)
route-service 8003 Computes transit & driving distances and travel times Google Routes API
bus-service 8004 Resolves routes and searches real-time bus schedules & fares RedBus Provider
train-service 8005 Searches Indian Railways trains, schedules, classes & live seat status Ixigo / ConfirmTkt API

πŸ“¦ Prerequisites


βš™οΈ Configuration

  1. Copy .env.example to create .env at the project root:

    cp .env.example .env
  2. Configure your API keys in .env:

    # API Keys
    GOOGLE_MAPS_API_KEY=your_google_maps_key
    SERPAPI_API_KEY=your_serpapi_key
    GEMINI_API_KEY=your_gemini_api_key
    # Service Configuration
    FRONTEND_ORIGIN=http://localhost:3000
    HOTEL_CACHE_TTL_HOURS=24
    HTTP_TIMEOUT=20.0
    LLM_TIMEOUT=60.0

πŸš€ Running the Project

Start All Services

# Build and start all 6 containers in the background
docker compose up -d --build

Monitor & View Logs

# View aggregated live logs
docker compose logs -f
# View logs for a specific service
docker compose logs -f planner-service

Check Service Health & Status

docker compose ps

Restart or Stop

# Restart all containers
docker compose restart
# Stop all containers
docker compose down
# Stop and delete persistent cache volumes
docker compose down -v

🌐 Service Access & Endpoints

Service Base URL Health Check Interactive Docs
Planner Service http://localhost:8000 GET /health /docs
Tourism Service http://localhost:8001 GET /health /docs
Hotel Service http://localhost:8002 GET /health /docs
Route Service http://localhost:8003 GET /health /docs
Bus Service http://localhost:8004 GET /health /docs
Train Service http://localhost:8005 GET /health /docs

πŸ§ͺ Development & Testing

Once the Docker stack is running, test the complete end-to-end trip planning workflow:

# Run the test client against http://localhost:8000/plan
python test_plan.py

Example API Request

curl -X POST http://localhost:8000/plan \
 -H "Content-Type: application/json" \
 -d '{
 "origin": "Chennai",
 "destination": "Coimbatore",
 "start_date": "2026-08-29",
 "end_date": "2026-08-31",
 "travelers": 2,
 "preferences": {
 "budget": { "level": "medium" },
 "transport": { "mode": "train", "berth_preference": "3A" },
 "hotel": { "category": "mid_range" },
 "activities": { "pace": "moderate", "interests": ["history", "nature"] }
 }
 }'

πŸ“ Project Structure

Dream-Destiny/
β”œβ”€β”€ docker-compose.yml # Multi-container orchestration
β”œβ”€β”€ .env.example # Template for environment variables
β”œβ”€β”€ test_plan.py # Standalone test runner for planning endpoints
β”œβ”€β”€ planner-service/ # Core orchestrator & AI planning agent (Port 8000)
β”‚ β”œβ”€β”€ app/
β”‚ β”‚ β”œβ”€β”€ agents/ # Planning agent implementation
β”‚ β”‚ β”œβ”€β”€ api/ # FastAPI routes (/plan, /plan/context)
β”‚ β”‚ β”œβ”€β”€ business/ # Preference mapping & pre-filtering
β”‚ β”‚ β”œβ”€β”€ clients/ # Downstream HTTP service clients
β”‚ β”‚ β”œβ”€β”€ orchestration/ # Async data gathering pipeline
β”‚ β”‚ β”œβ”€β”€ schemas/ # Pydantic schemas (Request, Context, Itinerary)
β”‚ β”‚ └── services/llm/ # Gemini GenAI client & structured prompts
β”‚ └── Dockerfile
β”œβ”€β”€ tourism-service/ # Google Places attractions service (Port 8001)
β”‚ └── Dockerfile
β”œβ”€β”€ hotel-service/ # Google Hotels & SQLite cache service (Port 8002)
β”‚ └── Dockerfile
β”œβ”€β”€ route-service/ # Google Routes distance & time service (Port 8003)
β”‚ └── Dockerfile
β”œβ”€β”€ transport-service/
β”‚ β”œβ”€β”€ bus/ # RedBus bus search & city resolver (Port 8004)
β”‚ β”‚ └── Dockerfile
β”‚ └── train/ # Ixigo Indian rail search & live seats (Port 8005)
β”‚ └── Dockerfile
└── shared/ # Reference shared Pydantic data schemas

About

An AI-powered travel planner platform built with FastAPI, Google Gemini 2.5 Flash & Docker. Generates real-time, grounded day-by-day itineraries with live trains, buses, hotels & route optimization.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /