How siddith31/weathergpt_frontend works
WeatherGPT is a location-aware weather application with authenticated dashboards, alerts, conversational weather assistance, and intelligence views. Users sign in, enter the protected app, and can view local weather or use chat and other weather features; chat responses are saved as conversation history. The graph reflects documented routes and sampled calls. Several feature implementations were not excerpted, so their internal data flows are omitted rather than inferred.
Main entry points: App.tsx Application Router · useChat.ts Chat State & Requests · SmartCity.tsx Smart City · Settings.tsx Settings
Components 22
Access & Accounts
- Auth Context
src/context/AuthContext.tsx - Sign In
src/pages/SignIn.tsx - Sign Up
src/pages/SignUp.tsx - Supabase
src/lib/supabase.ts
Weather & Alerts
- Weather Dashboard
src/components/dashboard/Dashboard.tsx - Geolocation
src/hooks/useGeolocation.ts - Weather Data
src/services/openMeteo.ts - Weather Alerts
src/components/alerts/WeatherAlerts.tsx - SACHET Alerts
src/services/sachetAlerts.ts
Conversation
- Chat Interface
src/components/chat/ConversationAI.tsx - Chat State & Requests
src/hooks/useChat.ts - WeatherGPT Service
src/services/weatherGPT.ts - Saved Conversations
src/components/utility/SavedConversations.tsx - Conversation Storage
src/utils/storage.ts
Intelligence
- Personal Intelligence
src/components/intelligence/PersonalIntelligence.tsx - Smart City
src/components/intelligence/SmartCity.tsx - Climate Analysis
src/components/intelligence/ClimateAnalysis.tsx
Application Shell
- Application Router
src/App.tsx - App Layout
src/components/layout/AppLayout.tsx - Settings
src/components/settings/Settings.tsx - Local Preferences
src/hooks/useLocalStorage.ts
Other components
- User
Connections 32
- User → Sign In: signs in
- User → Sign Up: registers
- Sign In → Supabase: authenticates
src/pages/SignIn.tsx - Sign Up → Auth Context: uses signup
src/pages/SignUp.tsx - Auth Context → Supabase: loads profile
src/context/AuthContext.tsx - Application Router → Auth Context: provides auth
src/App.tsx - Application Router → Sign In: routes to
src/App.tsx - Application Router → Sign Up: routes to
src/App.tsx - Application Router → App Layout: wraps routes
src/App.tsx - Application Router → Weather Dashboard: routes to
src/App.tsx - Application Router → Chat Interface: routes to
src/App.tsx - Application Router → Weather Alerts: routes to
src/App.tsx - Application Router → Personal Intelligence: routes to
src/App.tsx - Application Router → Smart City: routes to
src/App.tsx - Application Router → Climate Analysis: routes to
src/App.tsx - Application Router → Saved Conversations: routes to
src/App.tsx - Application Router → Settings: routes to
src/App.tsx - Weather Dashboard → Geolocation: gets location
src/components/dashboard/Dashboard.tsx - Weather Dashboard → Weather Data: fetches weather
src/components/dashboard/Dashboard.tsx - Weather Alerts → Geolocation: gets location
src/components/alerts/WeatherAlerts.tsx - Weather Alerts → SACHET Alerts: fetches alerts
src/components/alerts/WeatherAlerts.tsx - Chat Interface → Chat State & Requests: uses chat state
src/components/chat/ConversationAI.tsx - Chat State & Requests → Geolocation: gets location
src/hooks/useChat.ts - Chat State & Requests → WeatherGPT Service: sends message
src/hooks/useChat.ts - Chat State & Requests → Conversation Storage: saves conversations
src/hooks/useChat.ts - Saved Conversations → Conversation Storage: loads and deletes
src/components/utility/SavedConversations.tsx - Smart City → Geolocation: uses location
src/components/intelligence/SmartCity.tsx - Smart City → Weather Data: fetches weather
src/components/intelligence/SmartCity.tsx - Smart City → SACHET Alerts: fetches alerts
src/components/intelligence/SmartCity.tsx - Settings → Auth Context: reads account
src/components/settings/Settings.tsx - Settings → Supabase: updates profile
src/components/settings/Settings.tsx - Settings → Local Preferences: persists preferences
src/components/settings/Settings.tsx