This app helps you find hotels using AI and advanced search. It uses FastAPI, React, OpenAI, and Qdrant (a vector database) to give you smart, relevant hotel recommendations.
- You ask about hotels (e.g., "I want a luxury hotel in Spain with a spa").
- The backend analyzes your query, extracts what you want (location, type, amenities, etc.), and searches hotels stored in Qdrant.
- Results are ranked using both semantic meaning and structured filters.
- The frontend shows you the best matches and details for each hotel.
- Backend: FastAPI (Python), Qdrant (vector DB), OpenAI (GPT-4o for query analysis and embeddings)
- Frontend: React (TypeScript)
- Python 3.8+
- Node.js 16+
- OpenAI API key
- Qdrant Cloud account (or local Qdrant server)
- Go to the
backendfolder:cd backend - Create and activate a virtual environment:
python -m venv venv # Windows: venv\Scripts\activate # Mac/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Copy
.env.exampleto.envand fill in your Qdrant and OpenAI keys:cp .env.example .env # Edit .env and add QDRANT_URL, QDRANT_API_KEY, OPENAI_API_KEY - Start the backend:
The API runs at
python main.py
http://localhost:8001
- Go to the
frontendfolder:cd frontend - Install dependencies:
npm install
- Start the frontend:
The app runs at
npm start
http://localhost:3000
- Open the app in your browser.
- Ask about hotels using natural language.
- See the best matches and details for each hotel.
- To add or update hotels, use Qdrant (see backend code for details).
- To change query analysis, update the prompt in
main.py. - For UI tweaks, edit
frontend/src/App.tsxandApp.css.
- If you see "Server not ready" or connection errors, check your
.envfile and make sure Qdrant and OpenAI keys are correct. - Make sure Qdrant is running and accessible from your backend and that the collections that you created are accesible from your backend.
Made with ❤️ using FastAPI, React, Qdrant, and OpenAI.
