Ollama + Google Maps
Application thats show place using AI recommend + Google Maps
pythonflaskreactaigoogle-cloudgoogle-maps
Share this project:
Project Overview
π Ollama + Google Maps AI Finder
A modern full-stack application that combines local LLM (Ollama) and Google Maps Places API to help users find places (restaurants, cafΓ©s, etc.) using natural language.
The interface uses a dark, modern Chat-AI style, built with React + Vite + Tailwind CSS, and the backend is powered by Flask (Python) with rate-limiting, caching, and secure API communication.
π Features
- π AI-enhanced searching (Ollama refines user query)
- π Google Maps Text Search integration
- πΊοΈ Live embedded map preview
- π Open Google Maps directions
- π Dark AI-chat themed UI
- β‘ Fast thanks to Vite + Tailwind CSS
- π Secure backend with:
- Flask rate limiter
- Environment variable secrets
- CORS protection
- API key masking
- Request caching
ποΈ Tech Stack
Frontend
- React (JavaScript)
- Vite
- Tailwind CSS
- Modern Dark UI
Backend
- Python Flask
- httpx
- Flask-Limiter
- Flask-Caching
- Dotenv
AI
- Local LLM using Ollama
(Recommended models:llama3,llama3.1,mistral, etc.)
Maps
- Google Maps Places API
- Google Maps Embed API
π Project Structure
maps-ollama-projects/
β
βββ backend/
β βββ app.py
β βββ requirements.txt
β βββ .env
β βββ .venv/
β
βββ frontend/
βββ index.html
βββ postcss.config.js
βββ tailwind.config.js
βββ src/
β βββ App.js
β βββ main.js
β βββ SearchForm.js
β βββ MapEmbed.js
βββ package.json
π§ 1. Backend Setup (Flask)
π Install dependencies
cd backend
python -m venv .venv
.\.venv\Scripts\activate # Windows
pip install -r requirements.txt
π Create .env file
GOOGLE_MAPS_API_KEY=YOUR_GOOGLE_CLOUD_API_KEY
PORT=5000
OLLAMA_URL=http://localhost:11434/api/generate
β Make sure Places API is enabled β Restrict key using IP (127.0.0.1 or your local network IP)
π Run backend
python app.py
Backend available at:
http://localhost:5000
π¨ 2. Frontend Setup (React + Vite + Tailwind)
cd frontend
npm install
npm run dev
Frontend available at:
http://localhost:5173
βΆοΈ 3. Running the Application
Start Ollama:
ollama serve
Start backend:
cd backend
.\.venv\Scripts\activate
python app.py
Start frontend:
cd frontend
npm run dev
Open browser:
http://localhost:5173
π§ͺ Example Query
Try searching:
"24h cafΓ© in Depok"
"best sushi near Surabaya"
"romantic dinner place in Jakarta"
"cheap coffee shop near UI"
Ollama will refine the query β backend sends to Google β results display with map.