How roshni-07/weathergpt works
WeatherGPT combines a web weather interface with a FastAPI backend for conversational, location-aware weather guidance. The main flow sends a user question and location from the interface to the query API, where chat logic loads forecast data and produces an answer; separate API branches serve advisories, alerts, maps, routing, and sky features. The README documents those product capabilities, while sampled source confirms the query, deterministic weather analysis, Gemini integration, and alert-engine behavior. Some subsystem wiring is not shown in the excerpts, so uncertain links are omitted.
Main entry points: main.py API Application · api.js API Client · chat_engine.py Chat Orchestrator · query.py Query Endpoint
Components 24
Weather Interface
- Weather UI
src/app.js - API Client
src/services/api.js
Backend API
- API Application
backend/app/main.py - Query Endpoint
backend/app/routers/query.py - Weather Endpoints
backend/app/routers - Google Sign-In
backend/app/routers/auth.py
Weather Intelligence
- Chat Orchestrator
backend/app/services/chat_engine.py - Forecast Snapshot
backend/app/services/snapshot.py - Weather Decision Engine
backend/app/services/engine.py - Persona Advisories
backend/app/services/advisory.py - Confidence Scoring
backend/app/services/confidence_engine.py - Alert Engine
backend/app/services/alerts_engine.py
Location And Maps
- Location Endpoints
backend/app/routers/places.py - Geocoding Endpoint
backend/app/routers/geocode.py - Geocoding Service
backend/app/services/geocode_service.py - Weather Map Endpoint
backend/app/routers/map.py - Route Endpoint
backend/app/routers/route.py - Sky Endpoint
backend/app/routers/sky.py
External Data
- Forecast Data Service
backend/app/services/openmeteo.py - Weather Service
backend/app/services/weather_service.py - Gemini Adapter
backend/app/services/gemini_service.py - NDMA Alert Feed
Other components
- User
- Google Identity
Connections 24
- User → Weather UI: asks weather
- Weather UI → API Client: submits queries
- API Client → Query Endpoint: posts query
- API Client → Weather Endpoints: requests features
- API Client → Location Endpoints: searches places
- API Client → Weather Map Endpoint: loads map
- API Client → Google Sign-In: verifies token
- API Application → Query Endpoint: registers routes
- API Application → Weather Endpoints: registers routes
- API Application → Location Endpoints: registers routes
- API Application → Geocoding Endpoint: registers routes
- API Application → Weather Map Endpoint: registers routes
- API Application → Route Endpoint: registers routes
- API Application → Sky Endpoint: registers routes
- API Application → Google Sign-In: registers routes
- Query Endpoint → Chat Orchestrator: dispatches query
- Chat Orchestrator → Forecast Snapshot: loads forecast
- Chat Orchestrator → Weather Decision Engine: analyzes conditions
- Chat Orchestrator → Persona Advisories: builds guidance
- Chat Orchestrator → Gemini Adapter: requests language help
- Forecast Snapshot → Forecast Data Service: fetches weather
- Alert Engine → NDMA Alert Feed: fetches official alerts
- Geocoding Endpoint → Geocoding Service: resolves locations
- Google Sign-In → Google Identity: validates identity