GeoQuery Documentation Index
Welcome to the GeoQuery technical documentation.
π Getting Started
New to GeoQuery? Start here:
- README.md - Project overview and quick start
- SETUP.md - Development environment setup
- ARCHITECTURE.md - System architecture and design
π Available Documentation
System Overview
- ARCHITECTURE.md - High-level system design, components, and data flow
- DATA_FLOW.md - End-to-end request processing walkthrough
- SETUP.md - Local development setup and troubleshooting
Backend
- Core Services - LLMGateway, GeoEngine, DataCatalog, QueryExecutor, and all backend services
- API Endpoints - REST API reference with SSE streaming
- LLM Integration - Prompt engineering and Gemini API integration
- Data Ingestion Scripts - Scripts for downloading and processing datasets
Frontend
- Component Architecture - React components (ChatPanel, MapViewer, DataExplorer)
Data
- Dataset Sources - Complete dataset catalog with sources and licenses
π― Common Tasks
"I want to add a new dataset"
- Download or create GeoJSON file
- Place in
backend/data/subdirectory - Add entry to
backend/data/catalog.json - Regenerate embeddings:
rm backend/data/embeddings.npy && python -c "from backend.core.semantic_search import get_semantic_search; get_semantic_search()" - See backend/SCRIPTS.md for detailed guide
"I want to understand how queries work"
- Read DATA_FLOW.md - Step-by-step walkthrough from user query to map rendering
- Read backend/CORE_SERVICES.md - Service interactions and methods
- Read backend/LLM_INTEGRATION.md - Prompt system and LLM calls
"I want to modify the frontend"
- Read frontend/COMPONENTS.md - Component structure and state management
- Check component files in
frontend/src/components/for implementation details - See backend/API_ENDPOINTS.md for backend integration
"I want to extend the LLM capabilities"
- Read backend/LLM_INTEGRATION.md - Prompt engineering guide
- Edit prompts in
backend/core/prompts.py - Add new methods to
backend/core/llm_gateway.pyif needed
π Quick Reference
File Structure
GeoQuery/
βββ README.md # Project overview
βββ ARCHITECTURE.md # System design
βββ SETUP.md # Dev setup
βββ docs/
β βββ INDEX.md # This file
β βββ DATA_FLOW.md # Request pipeline
β βββ backend/ # Backend docs
β β βββ CORE_SERVICES.md
β β βββ API_ENDPOINTS.md
β β βββ LLM_INTEGRATION.md
β β βββ SCRIPTS.md
β βββ frontend/ # Frontend docs
β β βββ COMPONENTS.md
β βββ data/ # Data docs
β βββ DATASET_SOURCES.md
βββ backend/ # Python backend
β βββ api/ # FastAPI endpoints
β βββ core/ # Core services
β βββ services/ # Business logic
β βββ data/ # GeoJSON datasets + catalog.json
β βββ scripts/ # Data ingestion
βββ frontend/ # Next.js frontend
βββ src/
βββ app/ # Next.js pages
βββ components/ # React components
Key Concepts
- Intent Detection: Classifying user queries (MAP_REQUEST, SPATIAL_OP, etc.)
- Semantic Search: Finding relevant datasets via vector embeddings
- Text-to-SQL: Generating DuckDB queries from natural language
- Lazy Loading: Loading GeoJSON tables on-demand
- SSE Streaming: Real-time response streaming to frontend
- Choropleth: Auto-generated color gradients for polygons
- Point Styles: Icon markers (π₯) vs circle points (β)
External Links
- DuckDB Spatial: https://duckdb.org/docs/extensions/spatial
- Gemini API: https://ai.google.dev/
- Leaflet Docs: https://leafletjs.com/reference.html
- Next.js Docs: https://nextjs.org/docs
- FastAPI Docs: https://fastapi.tiangolo.com/
π License
This project is licensed under the MIT License - see LICENSE for details.
Last Updated: 2026-01-10