How phanindra798/tripgen-ai works
TripGen AI turns a natural-language trip request into a researched, day-by-day travel plan. The main workflow accepts a request through FastAPI, researches flights and hotels in parallel, composes an itinerary, structures it for the dashboard, and summarizes the result; the service can return it at once or stream agent progress. The browser presents the plan and supports timeline and budget views, saved trips, and PDF export. README documents these capabilities; some frontend and graph wiring is only partially sampled, so uncertain implementation links are omitted.
Main entry points: script.js Dashboard interface · graph.py Planning API · app.py FastAPI routes · flights.py Flight lookup
Components 22
API service
- FastAPI routes
app.py
Trip planning
- Planning API
src/graph.py - Itinerary composition
src/graph.py - Schedule structuring
src/graph.py - Trip summary
src/graph.py - Thread checkpoint
src/graph.py
Travel research
- Flight research
src/graph.py - Airport resolver
src/tools/flights.py - Flight lookup
src/tools/flights.py - Hotel research
src/graph.py - Hotel search
src/tools/search.py
Trip dashboard
- Page template
templates/index.html - Dashboard interface
static/script.js - Dashboard styling
static/style.css - Saved trips
static/script.js - Plan views
static/script.js - PDF export
static/script.js
Other components
- Traveler
- Web browser
- AviationStack
- Tavily search
- Groq LLM
Connections 27
- Traveler → Web browser: enters request
- Web browser → Dashboard interface: uses
- Dashboard interface → FastAPI routes: posts request
- FastAPI routes → Page template: serves page
- FastAPI routes → Planning API: invokes
- Planning API → Flight research: dispatches
- Planning API → Hotel research: dispatches
- Flight research → Airport resolver: resolves route
- Flight research → Flight lookup: requests flights
- Flight lookup → AviationStack: fetches schedules
- Flight research → Itinerary composition: supplies flight results
- Hotel research → Hotel search: searches hotels
- Hotel search → Tavily search: queries
- Hotel research → Itinerary composition: supplies hotel results
- Itinerary composition → Groq LLM: generates prose
- Schedule structuring → Groq LLM: generates JSON
- Trip summary → Groq LLM: generates summary
- Planning API → Itinerary composition: composes after research
- Itinerary composition → Schedule structuring: structures plan
- Schedule structuring → Trip summary: passes schedule
- Planning API → Thread checkpoint: checkpoints thread
- FastAPI routes → Dashboard interface: returns or streams plan
- Dashboard interface → Plan views: renders results
- Dashboard interface → Saved trips: reads and writes
- Dashboard interface → PDF export: exports plan
- Plan views → Dashboard styling: uses styles
- Dashboard interface → Web browser: displays plan