This project is an AI-powered travel planning app. It features a chatbot that helps users plan their trips and generates personalized itineraries using OpenAI's GPT models.
backend/— FastAPI backend (Python)- Handles chatbot and itinerary generation using OpenAI
- Expects an
.envfile with your OpenAI API key
frontend/— React frontend (JavaScript)- User interface for chat, itinerary form, and results
- Python 3.11+
- Node.js (v16 or newer recommended)
- npm (comes with Node.js)
cd /Users/pratyushaduvvuri/Desktop/trip_planner
python -m venv venv
source venv/bin/activatecd backend
pip install -r requirements.txtEdit backend/.env and add:
OPENAI_API_KEY=sk-... # Your OpenAI API key
pip install uvicornFrom the backend directory:
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
In a new terminal:
cd /Users/pratyushaduvvuri/Desktop/trip_planner/frontend
npm installnpm startThe app will be available at http://localhost:3000
- If you see
zsh: command not found: uvicorn, install it withpip install uvicornin your virtual environment. - Make sure your virtual environment is activated (
source venv/bin/activate). - If you see missing files in the frontend, ensure
frontend/public/index.htmlexists (it should now).
- Open http://localhost:3000 in your browser.
- Use the chatbot to get travel ideas or go directly to the itinerary form to generate a trip plan.
Enjoy your trip planning!