How praveen-devarakota/gee-indexing-backend works
This Flask API serves satellite imagery and vegetation time-series data, then offers RAG-based analysis and question answering over supplied time-series records. The main workflow is a client request through registered routes to satellite processing or RAG services; analysis chunks records and indexes embeddings, while chat retrieves relevant context and asks Groq to generate an answer. The sampled source establishes these flows, but not the internals of chunking, prompting, or vector-store persistence beyond their pipeline interfaces.
Main entry points: satellite_controller.py Request controller · pipeline.py RAG pipeline · rag_service.py RAG service · satellite_model.py Sentinel-2 collection
Components 20
API layer
- Flask app
app.py - Satellite routes
routes/satellite_routes.py - Request controller
controllers/satellite_controller.py
Satellite processing
- Date validation
utils/helpers.py - Sentinel-2 collection
models/satellite_model.py - Image composites
controllers/satellite_controller.py - Weekly composites
controllers/satellite_controller.py - NDVI extraction
controllers/satellite_controller.py - Series cleanup
controllers/satellite_controller.py - NDVI smoothing
controllers/satellite_controller.py
RAG workflows
- RAG service
services/rag_service.py - RAG pipeline
rag/pipeline.py - Time-series chunking
rag/chunking.py - Text embeddings
rag/embedder.py - Vector index
rag/vector_store.py - Chat prompt builder
rag/prompt_builder.py
External integrations
- Google Earth Engine
- Jina embeddings API
- Groq chat API
Other components
- API client
Connections 23
- API client → Flask app: sends requests
- Flask app → Satellite routes: registers routes
- Satellite routes → Request controller: dispatches requests
- Request controller → Date validation: validates dates
- Request controller → Sentinel-2 collection: requests imagery
- Request controller → Google Earth Engine: queries imagery
- Sentinel-2 collection → Google Earth Engine: filters imagery
- Request controller → Image composites: builds composite
- Request controller → Weekly composites: creates intervals
- Weekly composites → Sentinel-2 collection: composites scenes
- Request controller → NDVI extraction: extracts NDVI
- NDVI extraction → Series cleanup: filters values
- Series cleanup → NDVI smoothing: smooths values
- Request controller → RAG service: requests RAG
- RAG service → RAG pipeline: runs workflow
- RAG pipeline → Time-series chunking: chunks records
- RAG pipeline → Text embeddings: embeds chunks
- Text embeddings → Jina embeddings API: requests vectors
- RAG pipeline → Vector index: builds and saves index
- RAG pipeline → Vector index: loads and searches
- RAG pipeline → Text embeddings: embeds question
- RAG service → Chat prompt builder: builds chat prompt
- RAG service → Groq chat API: generates answer