How lucasraamaa/climaalert works
ClimaAlert monitors weather at fixed locations, evaluates conditions, stores measurements and alert events, and optionally notifies via Telegram. Its React dashboard reads stored data and offers location search and 24-hour forecasts. The backend calls and data transfers shown are supported by the excerpts; dashboard capabilities and component relationships are also documented or referenced in the source index. Unsampled implementation details are omitted.
Main entry points: App.jsx Dashboard state · main.py Monitoring cycle · fetcher.py Weather fetcher · db.py Backend persistence
Components 25
Weather monitoring
- Monitoring cycle
backend/main.py - Runtime config
backend/config.py - Weather fetcher
backend/fetcher.py - Alert rules
backend/analyzer.py - Weather models
backend/schemas.py - Telegram notifier
backend/notifier.py
Persistence
- Alert state
estado.json - Backend persistence
backend/db.py
Web dashboard
- Dashboard state
frontend/src/App.jsx - Supabase client
frontend/src/supabaseClient.js - Weather helpers
frontend/src/utils/weatherHelpers.jsx - Location search
frontend/src/components/SearchBar.jsx - 24-hour forecast
frontend/src/components/Forecast24h.jsx - Hourly cards
frontend/src/components/HourlyCard.jsx - Location cards
frontend/src/components/LocationCard.jsx - Dashboard header
frontend/src/components/Header.jsx - Dashboard tabs
frontend/src/components/NavTabs.jsx - Alert banners
frontend/src/components/Banners.jsx - Alert history
frontend/src/components/AlertsTable.jsx - Measurement history
frontend/src/components/HistoryTable.jsx
External services
- Supabase database
- Telegram Bot API
- Open-Meteo forecast
- Open-Meteo geocoding
Other components
- Dashboard user
Connections 33
- Dashboard user → Dashboard state: uses
README.md - Monitoring cycle → Runtime config: loads settings
backend/main.py - Monitoring cycle → Weather fetcher: fetches weather
backend/main.py - Weather fetcher → Open-Meteo forecast: requests forecast
backend/fetcher.py - Weather fetcher → Runtime config: reads timezone
backend/fetcher.py - Weather fetcher → Weather models: returns data
backend/fetcher.py - Monitoring cycle → Alert rules: evaluates conditions
backend/main.py - Alert rules → Weather models: uses models
backend/analyzer.py - Monitoring cycle → Backend persistence: saves records
backend/main.py - Backend persistence → Supabase database: inserts records
backend/db.py - Backend persistence → Weather models: uses models
backend/db.py - Backend persistence → Runtime config: reads credentials
backend/db.py - Monitoring cycle → Telegram notifier: sends alerts
backend/main.py - Telegram notifier → Telegram Bot API: sends message
backend/notifier.py - Monitoring cycle → Alert state: reads and writes
backend/main.py - Monitoring cycle → Weather models: uses alert levels
backend/main.py - Dashboard state → Supabase client: uses client
frontend/src/App.jsx - Supabase client → Supabase database: connects to
frontend/src/supabaseClient.js - Dashboard state → Supabase database: queries records
frontend/src/App.jsx - Dashboard state → Open-Meteo forecast: requests forecast
frontend/src/App.jsx - Dashboard state → Open-Meteo geocoding: searches places
frontend/src/App.jsx - Dashboard state → Weather helpers: loads locations
frontend/src/App.jsx - Dashboard state → Dashboard header: renders
frontend/src/App.jsx - Dashboard state → Location search: renders
frontend/src/App.jsx - Dashboard state → 24-hour forecast: renders
frontend/src/App.jsx - 24-hour forecast → Hourly cards: renders
frontend/src/components/Forecast24h.jsx - Dashboard state → Location cards: renders
frontend/src/App.jsx - Location cards → Weather helpers: uses wind helper
frontend/src/components/LocationCard.jsx - Hourly cards → Weather helpers: uses weather helpers
frontend/src/components/HourlyCard.jsx - Dashboard state → Dashboard tabs: renders
frontend/src/App.jsx - Dashboard state → Alert banners: renders
frontend/src/App.jsx - Dashboard state → Alert history: renders
frontend/src/App.jsx - Dashboard state → Measurement history: renders
frontend/src/App.jsx