How officialarghya29/geoshield works
GeoShield is a landslide-risk monitoring and early-warning platform for Northeast India. Users view station and risk information, inspect alerts and reports, and use mapping, satellite, and simulation features through the web/mobile interface; the frontend API client communicates with a FastAPI backend. Backend routes provide sensor, prediction, alert, reporting, weather, flood, satellite, and dashboard capabilities, with prediction models and persistent data supporting risk assessment. README capabilities are included even where implementation excerpts were unavailable; those branches are linked only where documentation or the source index supports the relationship.
Main entry points: main.py FastAPI Server · App.tsx GeoShield UI · simulator.py Simulation Routes · Dashboard.tsx Dashboard
Components 32
User Interfaces
- GeoShield UI
frontend/src/App.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Alerts View
frontend/src/pages/Alerts.tsx - Risk Map
frontend/src/pages/RiskMap.tsx - Station Views
frontend/src/pages/Stations.tsx - Citizen Reports
frontend/src/pages/Reports.tsx - Satellite View
frontend/src/pages/SatelliteData.tsx - Simulator View
frontend/src/pages/Simulator.tsx - Translations
frontend/src/i18n/translations.ts - API Client
frontend/src/services/api.ts
Backend API
- FastAPI Server
backend/app/main.py - Sensor Routes
backend/app/routers/sensors.py - Dashboard Routes
backend/app/routers/dashboard.py - Alert Routes
backend/app/routers/alerts.py - Report Routes
backend/app/routers/reports.py - Prediction Routes
backend/app/routers/predict.py - Flood Routes
backend/app/routers/flood.py - Satellite Routes
backend/app/routers/satellite.py - Simulation Routes
backend/app/routers/simulator.py - Weather Routes
backend/app/routers/weather.py - Alert Timeline
backend/app/routers/alerts_timeline.py - Enhanced ML Routes
backend/app/routers/ml_enhanced.py - Authentication
backend/app/auth.py - Alert WebSocket
backend/app/main.py
Risk and Data
- Domain Models
backend/app/models.py - Database
backend/app/database.py - Risk Predictor
backend/app/ai_engine/risk_predictor.py - Enhanced Predictor
backend/app/ai_engine/enhanced_predictor.py - Terrain Lookup
backend/app/ai_engine/terrain_lookup.py - Risk History Seed
backend/app/seed_risk_history.py
Platform Integrations
- Electron Desktop
electron/main.js
Other components
- Operator
Connections 35
- Operator → GeoShield UI: uses
- GeoShield UI → Dashboard: shows
frontend/src/pages/Dashboard.tsx - Dashboard → API Client: requests data
frontend/src/pages/Dashboard.tsx - Dashboard → Translations: uses labels
frontend/src/pages/Dashboard.tsx - API Client → Translations: reads language
frontend/src/services/api.ts - GeoShield UI → Alerts View: offers alerts
- GeoShield UI → Risk Map: offers mapping
- GeoShield UI → Station Views: offers monitoring
- GeoShield UI → Citizen Reports: offers reporting
- GeoShield UI → Satellite View: offers imagery
- GeoShield UI → Simulator View: offers simulation
- API Client → FastAPI Server: calls REST
- FastAPI Server → Sensor Routes: registers routes
backend/app/main.py - FastAPI Server → Dashboard Routes: registers routes
backend/app/main.py - FastAPI Server → Alert Routes: registers routes
backend/app/main.py - FastAPI Server → Report Routes: registers routes
backend/app/main.py - FastAPI Server → Prediction Routes: registers routes
backend/app/main.py - FastAPI Server → Flood Routes: registers routes
backend/app/main.py - FastAPI Server → Satellite Routes: registers routes
backend/app/main.py - FastAPI Server → Simulation Routes: registers routes
backend/app/main.py - FastAPI Server → Weather Routes: registers routes
backend/app/main.py - FastAPI Server → Alert Timeline: registers routes
backend/app/main.py - FastAPI Server → Enhanced ML Routes: registers routes
backend/app/main.py - FastAPI Server → Database: initializes
backend/app/main.py - FastAPI Server → Authentication: uses authentication
backend/app/main.py - Simulation Routes → Database: queries and commits
backend/app/routers/simulator.py - Simulation Routes → Domain Models: creates records
backend/app/routers/simulator.py - Simulation Routes → Risk Predictor: gets predictor
backend/app/routers/simulator.py - Simulation Routes → Enhanced Predictor: may use predictor
backend/app/routers/simulator.py - Simulation Routes → Authentication: checks roles
backend/app/routers/simulator.py - Enhanced Predictor → Terrain Lookup: uses terrain data
backend/app/ai_engine/enhanced_predictor.py - Risk History Seed → Database: seeds history
- FastAPI Server → Alert WebSocket: serves sockets
backend/app/main.py - Electron Desktop → FastAPI Server: starts backend
electron/main.js - Electron Desktop → GeoShield UI: loads interface
electron/main.js