FoodSpotHub is a modern web application designed to help you discover the best food spots near your location. It features a Next.js frontend with dynamic routing and components, backed by a FastAPI backend that uses Google's Gemini LLM and Maps API to provide personalized food recommendations.
- AI-Powered Recommendations: Get tailored food spot suggestions based on your location and queries using CrewAI and Gemini 1.5 Flash.
- Location-Aware: Automatically fetches your geolocation to find the best spots around you.
- Modern UI: Built with Next.js and Tailwind CSS for a sleek, responsive experience.
- Frontend: Next.js (React), Tailwind CSS, Lucide React
- Backend: Python, FastAPI, CrewAI, Langchain, Google Generative AI
- APIs: Google Maps API (Places)
- Node.js (v18+)
- Python (v3.12+)
- API Keys:
GOOGLE_MAPS_API_KEYGEMINI_API_KEY
- Navigate to the
backenddirectory:cd backend - Create and activate a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile in thebackenddirectory and add your keys:GOOGLE_MAPS_API_KEY=your_google_maps_key GEMINI_API_KEY=your_gemini_key - Start the FastAPI server:
The backend will run on
python main.py
http://127.0.0.1:8000.
- From the project root, navigate to the frontend code (or stay in root if that's where
package.jsonis located):npm install
- Configure your environment variables in
.env.localif necessary. - Start the Next.js development server:
npm run dev
- Open http://localhost:3000 in your browser.
- The Next.js frontend requests the user's location via the browser's Geolocation API.
- It sends the coordinates to the Next.js API route (
/api/ai-recommendations), which acts as a proxy. - The request is forwarded to the FastAPI backend (
/api/recommendations). - CrewAI kicks off an agentic workflow:
- A custom tool fetches nearby restaurants using the Google Maps API.
- The Gemini model analyzes the data and formats a curated JSON list of recommendations.
- The frontend receives the data and renders it beautifully using
FoodSpotCardcomponents.