Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Travel-buddy: AI-Powered India Travel Chatbot

Travel-buddy is a full-stack AI travel assistant that helps users explore India with smart recommendations for places, hotels, restaurants, and travel tips.
It combines FastAPI, React, Groq LLM, and RAG (FAISS + embeddings) to deliver personalized and accurate suggestions.


✨ Features

  • πŸ€– AI Travel Guide powered by Groq API
  • πŸ—ΊοΈ Knowledge Base of Indian cities, states, attractions, hotels & restaurants
  • πŸ’¬ Conversational Chat Interface with session management
  • πŸ“ Location-aware recommendations (state/city-based filters)
  • ⚑ RAG Search using Sentence Transformers + FAISS
  • 🎨 Modern, responsive React UI

πŸ“ Project Structure

backend2/ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ backend.py # FastAPI backend β”‚ └── knowledge_base.json # Travel knowledge data └── frontend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ App.js # React main component β”‚ β”œβ”€β”€ App.css # Styles β”‚ β”œβ”€β”€ index.js # Entry point β”‚ └── services/ β”‚ └── api.js # API wrapper β”œβ”€β”€ public/ └── package.json

yaml Copy code


🧰 Prerequisites


πŸš€ Setup Instructions


πŸ”™ Backend Setup (FastAPI)

  1. Go to backend folder:
    cd backend

Install Python dependencies:

bash Copy code pip install fastapi uvicorn groq sentence-transformers faiss-cpu python-dotenv Create a .env file:

ini Copy code GROQ_API_KEY=your_groq_api_key_here Start the backend server:

bash Copy code python backend.py Backend runs at: http://localhost:8000

🎨 Frontend Setup (React) Navigate to frontend:

bash Copy code cd frontend Install React dependencies:

bash Copy code npm install Start development server:

bash Copy code npm start Frontend runs at: http://localhost:3000

πŸ§‘β€πŸ’» Usage Ensure both frontend & backend are running.

Open: http://localhost:3000

Ask anything, such as:

β€œWhat are the best places to visit in Mumbai?”

β€œSuggest good hotels in Goa.”

β€œWhat can I do in Rajasthan?”

β€œWhere should I shop in Delhi?”

πŸ”Œ API POST /chat Request Body:

json Copy code { "message": "What are the best places in Mumbai?", "session_id": "optional-session-id", "state": "optional-state", "city": "optional-city" } Response:

json Copy code { "response": "Here are some great places in Mumbai...", "sources": [ { "name": "Gateway of India", "type": "attraction", "description": "Iconic arch monument.", "location": "Mumbai", "price": "Free", "rating": 4.6, "state": "Maharashtra", "city": "Mumbai" } ], "session_id": "uuid-session-id" } 🧠 Technologies Used Backend FastAPI

Groq API

Sentence Transformers

FAISS (RAG search)

Uvicorn

Python dotenv

Frontend React

Axios

CSS3

πŸ› οΈ Development Tools CLI Mode (Backend Only) Run backend without frontend:

bash Copy code cd backend python backend.py --cli Environment Variables Backend .env:

ini Copy code GROQ_API_KEY=your_api_key_here Frontend (Production):

ini Copy code REACT_APP_API_URL=https://your-backend-url.com 🐞 Troubleshooting Issue Solution Backend not responding Ensure it runs on port 8000 Invalid API key Check .env CORS errors Verify frontend proxy in package.json Missing modules Run npm install or pip install again

#2 min demo video

2-min.demo.video.1.mp4

About

LLM powered chatbot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages