How thinhinane-akriche/pa4iabd works
TravelBuddy is a full-stack conversational travel-planning assistant. Users register or sign in, then chat with a streaming LangGraph agent that can gather travel information, tailor results to a saved profile and generate itinerary PDFs; users can also manage profiles and saved voyages. The README documents the agent’s tool capabilities and PostgreSQL-backed session memory. The graph follows the documented product flow and sampled route/client references; unsampled route internals and some tool-to-provider details are not asserted.
Main entry points: agent.py LangGraph agent · api.ts API client · main.py FastAPI application · dependencies.py Database access
Components 24
Web experience
- Chat interface
frontend/src/app/chat/page.tsx - Sign-in and signup
frontend/src/app/login/page.tsx - Profile editor
frontend/src/app/profile/page.tsx - Saved voyages
frontend/src/app/voyages/page.tsx - Conversation sidebar
frontend/src/app/components/Sidebar.tsx - API client
frontend/src/app/lib/api.ts
API and identity
- FastAPI application
backend/main.py - Authentication routes
backend/api/routes/auth.py - Chat routes
backend/api/routes/chat.py - Profile routes
backend/api/routes/profile.py - Voyage routes
backend/api/routes/voyages.py - Database access
backend/api/dependencies.py
Travel agent
- LangGraph agent
backend/core/agent.py - LLM provider factory
backend/core/llm_factory.py - Request location context
backend/tools/geo_context.py - Travel search and planning tools
backend/tools - Itinerary PDF generator
backend/tools/pdf_generator.py - Travel profile tool
backend/tools/profile.py
Travel data and state
- Destination RAG
backend/tools/rag.py - Wikivoyage loader
backend/utils/wikivoyage_loader.py - PostgreSQL
- ChromaDB vector store
Other components
- Traveler
- Travel information providers
Connections 30
- Traveler → Chat interface: plans trips
- Traveler → Sign-in and signup: creates account
- Traveler → Profile editor: sets preferences
- Traveler → Saved voyages: manages voyages
- Chat interface → API client: streams chat
frontend/src/app/chat/page.tsx - Sign-in and signup → API client: authenticates
frontend/src/app/login/page.tsx - Profile editor → API client: updates profile
frontend/src/app/profile/page.tsx - Saved voyages → API client: loads voyages
frontend/src/app/voyages/page.tsx - Conversation sidebar → API client: loads history
frontend/src/app/components/Sidebar.tsx - API client → FastAPI application: calls API
- FastAPI application → Authentication routes: registers routes
backend/main.py - FastAPI application → Chat routes: registers routes
backend/main.py - FastAPI application → Profile routes: registers routes
backend/main.py - FastAPI application → Voyage routes: registers routes
backend/main.py - Authentication routes → Database access: uses connections
backend/api/routes/auth.py - Chat routes → Database access: uses dependencies
backend/api/routes/chat.py - Profile routes → Database access: uses dependencies
backend/api/routes/profile.py - Voyage routes → Database access: uses dependencies
backend/api/routes/voyages.py - Database access → PostgreSQL: reads and writes
- Chat routes → Request location context: sets location
backend/tools/geo_context.py - Chat routes → LangGraph agent: dispatches chat
- LangGraph agent → LLM provider factory: selects model
backend/core/agent.py - LangGraph agent → Destination RAG: retrieves guidance
backend/core/agent.py - Destination RAG → Wikivoyage loader: loads articles
backend/tools/rag.py - Destination RAG → ChromaDB vector store: indexes and searches
- LangGraph agent → Travel search and planning tools: calls tools
backend/core/agent.py - LangGraph agent → Itinerary PDF generator: generates itinerary PDF
backend/core/agent.py - LangGraph agent → Travel profile tool: uses preferences
backend/core/agent.py - LangGraph agent → PostgreSQL: persists session memory
- Travel search and planning tools → Travel information providers: fetches travel data