How manishkudtarkar/eco-stat works
EcoPredict takes users from sign-in and region/species selection to biodiversity risk predictions, then supports monitoring through analytics, hotspots, maps, and search; a separate document-grounded chatbot answers PDF questions. The graph preserves the documented prediction, analytics, auth, and chatbot stages and principal UI surfaces. Some backend relationships are evidenced only by README or SOURCE INDEX references; uncertain links are omitted rather than inferred.
Main entry points: App.tsx Web app routes · api.ts HTTP API client · main.py FastAPI application · predictions.py Prediction routes
Components 32
User application
- Web app routes
frontend/src/App.tsx - Auth context
frontend/src/contexts/AuthContext.tsx - Auth client
frontend/src/services/auth.ts - Dashboard
frontend/src/components/Dashboard/DashboardPage.tsx - Dashboard client
frontend/src/services/dashboard.ts - Search page
frontend/src/components/Search/SearchPage.tsx - Search client
frontend/src/services/search.ts - Risk map
frontend/src/components/RiskMap/RiskMapPage.tsx - Analytics page
frontend/src/components/Analytics/AnalyticsPage.tsx - Chatbot UI
frontend/src/components/Chatbot/ChatbotPage.tsx - HTTP API client
frontend/src/services/api.ts
API and identity
- FastAPI application
backend/main.py - Auth routes
backend/routes/auth.py - Auth service
backend/services/auth_service.py - JWT validation
backend/middleware/auth.py - MongoDB manager
backend/database.py
Risk intelligence
- Prediction routes
backend/routes/predictions.py - Data pipeline
backend/services/data_pipeline.py - GBIF client
backend/services/external_apis/gbif_client.py - NASA client
backend/services/external_apis/nasa_client.py - Weather client
backend/services/external_apis/openweather_client.py - Risk scoring
backend/services/ml_module.py - GBIF API
- NASA POWER API
- OpenWeather API
Monitoring
- Analytics routes
backend/routes/analytics.py
Document Q&A
- Chatbot routes
backend/routes/chatbot.py - PDF Q&A service
backend/services/pdf_chatbot_service.py - Website knowledge
backend/services/website_knowledge_service.py - Supabase vectors
- Groq LLM
Other components
- User
Connections 41
- User → Web app routes: uses
frontend/src/App.tsx - Web app routes → Auth context: provides auth
frontend/src/App.tsx - Web app routes → Dashboard: routes to
frontend/src/App.tsx - Web app routes → Search page: routes to
frontend/src/App.tsx - Web app routes → Risk map: routes to
frontend/src/App.tsx - Web app routes → Analytics page: routes to
frontend/src/App.tsx - Auth context → Auth client: calls
frontend/src/contexts/AuthContext.tsx - Auth client → HTTP API client: uses
frontend/src/services/auth.ts - Dashboard → Dashboard client: calls
frontend/src/components/Dashboard/DashboardPage.tsx - Dashboard client → HTTP API client: uses
- Search page → Search client: calls
frontend/src/components/Search/SearchPage.tsx - Search client → HTTP API client: uses
frontend/src/services/search.ts - Risk map → Dashboard client: loads data
frontend/src/components/RiskMap/RiskMapPage.tsx - Analytics page → HTTP API client: requests data
- Chatbot UI → HTTP API client: requests answers
- HTTP API client → FastAPI application: HTTP requests
- FastAPI application → Auth routes: registers
backend/main.py - FastAPI application → Prediction routes: registers
backend/main.py - FastAPI application → Analytics routes: registers
backend/main.py - FastAPI application → Chatbot routes: registers
backend/main.py - Auth routes → Auth service: calls
backend/routes/auth.py - Auth service → MongoDB manager: accesses users
- Auth routes → JWT validation: protects profile
backend/routes/auth.py - Prediction routes → JWT validation: requires token
backend/routes/predictions.py - Prediction routes → Data pipeline: fetches data
backend/routes/predictions.py - Data pipeline → GBIF client: fetches occurrences
backend/services/data_pipeline.py - Data pipeline → NASA client: fetches metrics
backend/services/data_pipeline.py - Data pipeline → Weather client: fetches weather
backend/services/data_pipeline.py - GBIF client → GBIF API: queries
- NASA client → NASA POWER API: queries
- Weather client → OpenWeather API: queries
- Prediction routes → Risk scoring: scores risk
backend/routes/predictions.py - Prediction routes → MongoDB manager: persists results
backend/routes/predictions.py - Analytics routes → MongoDB manager: reads analytics
backend/routes/analytics.py - Analytics routes → Weather client: uses client
backend/routes/analytics.py - Chatbot routes → JWT validation: protects queries
backend/routes/chatbot.py - Chatbot routes → PDF Q&A service: processes questions
backend/routes/chatbot.py - Chatbot routes → Website knowledge: uses knowledge
backend/routes/chatbot.py - Chatbot routes → MongoDB manager: stores history
backend/routes/chatbot.py - PDF Q&A service → Supabase vectors: retrieves chunks
- PDF Q&A service → Groq LLM: generates answer