AI-powered travel planner built with Model Context Protocol (MCP), LangGraph, and intelligent agents. Now with LLM-based intent detection and 10+ integrated tools!
- π§ LLM-Based Intent Detection: 90%+ accuracy vs keyword matching
- π§ 10+ Tools: Web search, distance calculation, restaurant finder, and more
- π Web Search: Real-time travel information from the web
- π Smart Routing: Calculate distances and multi-stop routes
- π½οΈ Restaurant Search: Find dining options by cuisine and location
- π Unified Tool Registry: Easy to add new capabilities
- π― Better Understanding: Handles natural language variations
tripwhat/
βββ backend/
β βββ src/
β β βββ agents/
β β β βββ travel-agent.ts # Main LangGraph agent
β β β βββ intent-detector.ts # π LLM-based intent detection
β β β βββ tool-registry.ts # π Unified tool management
β β β βββ prompts.ts
β β βββ mcp-servers/
β β β βββ places/ # OpenTripMap integration (enhanced)
β β β βββ websearch/ # π Web search tools
β β β βββ transport/ # π Distance & routing
β β βββ routes/ # Express routes
β β βββ models/ # MongoDB schemas
β β βββ services/ # Itinerary builder
β β βββ controllers/ # Request handlers
β βββ package.json
β
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Chat/ # Real-time chat interface
β β β βββ Map/ # Interactive map with pins
β β β βββ ui/ # Reusable UI components
β β βββ pages/
β β β βββ Chat.tsx # Main chat page
β β β βββ OnboardingPage.tsx
β β β βββ LoginPage.tsx
β β βββ hooks/ # Custom React hooks
β β βββ contexts/ # Auth & state management
β βββ package.json
β
βββ docs/
βββ PHASE1-COMPLETE.md
βββ PHASE1.5-COMPLETE.md
βββ GOOGLE-PLACES-SETUP.md # π Google Maps setup guide
βββ ROADMAP.md
βββ SETUP.md
## Tech Stack
**Frontend**:
- React 18 + TypeScript
- TailwindCSS for styling
- Socket.io-client for real-time updates
- Axios for API calls
**Backend**:
- Node.js + Express
- Socket.io for WebSocket
- LangGraph for agent orchestration
- MongoDB + Mongoose
- OpenAI GPT-4o-mini
**MCP Tools**:
- OpenTripMap (tourist attractions, POIs)
- OpenStreetMap (geocoding, no API key)
- DuckDuckGo (web search, no API key)
- Custom tools (distance, routing)
---
## π Quick Start
### Prerequisites
- Node.js 18+
- MongoDB (Community Edition)
- OpenAI API key
### Installation
```bash
# Clone repository
git clone https://github.com/Tanish-237/TripWhat.git
cd TripWhat
# Backend setup
cd backend
npm install
# Create .env file
cp .env.example .env
# Add your API keys (see below)
# Frontend setup
cd ../frontend
npm install
# Create frontend .env
cp .env.example .env
Backend (.env):
# Required
OPENAI_API_KEY=sk-your-openai-key
MONGODB_URI=mongodb://localhost:27017/tripwhat
JWT_SECRET=your-secret-key
# Optional but recommended
OPENTRIPMAP_API_KEY=your-key # Get free at https://opentripmap.io
# Server config
PORT=5000
FRONTEND_URL=http://localhost:5173Frontend (.env):
VITE_API_URL=http://localhost:5000
# Optional: Google Places Autocomplete
VITE_GOOGLE_MAPS_API_KEY=your-google-maps-api-keyπ Note: Google Places Autocomplete is optional. If not configured, the app will use standard text input. See setup guide
# Terminal 1: Start MongoDB
mongod
# Terminal 2: Start backend
cd backend
npm run dev
# Terminal 3: Start frontend
cd frontend
npm run devAccess the app: http://localhost:5173
- Smart City Search: Google Places Autocomplete for destination selection
- Chat-based Planning: Natural language trip planning
- AI Agent: MCP tool integration with LangGraph orchestration
- Budget-Aware Itineraries: Personalized day-by-day plans
- Interactive Maps: Destination pins and route visualization
- Multi-City Trips: Seamless multi-destination itineraries
- Saved & Upcoming Trips: Organize and track your travel plans
- Real-time Updates: WebSocket-powered live itinerary generation
See ROADMAP.md for detailed feature breakdown.