How akhmadov-360/weather-nuu works
Weather NUU is a React weather dashboard for room and street sensor data. Users enter a routed dashboard, load current and historical readings, inspect metric summaries and interactive charts, and optionally select ranges or export data. The dashboard combines REST-query state with a WebSocket update path; the socket explicitly writes readings into the same query cache. The graph also preserves documented chart selection, export, localization, and theme capabilities. Some chart/export and API internals are unsampled, so their less-certain links are omitted.
Main entry points: DashboardLayout.tsx Dashboard layout · SensorCharts.tsx Sensor charts · useWeatherSocket.ts Weather socket · router.tsx Route dispatch
Components 23
Application shell
- React entry
src/app/main.tsx - Route dispatch
src/app/providers/router/router.tsx
Dashboard experience
- Room page
src/pages/dashboard-room/ui/DashboardRoomPage.tsx - Street page
src/pages/dashboard-street/ui/DashboardStreetPage.tsx - Dashboard layout
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Top bar
src/widgets/topbar/ui/TopBar.tsx - Language switcher
src/widgets/language-switcher/ui/LanguageSwitcher.tsx - Weather summary
src/widgets/weather-summary/ui/MetricCard.tsx - Temperature card
src/widgets/weather-summary/ui/TempHeroCard.tsx - Live streams
src/components/LiveStreams.tsx
Weather data
- Weather queries
src/entities/weather/api/weather.queries.ts - Weather API
src/entities/weather/api/weather.api.ts - Query cache
- Weather socket
src/entities/weather/api/useWeatherSocket.ts - Weather model
src/entities/weather/model/weather.mapper.ts - History append
src/entities/weather/model/append-history-point.ts
Charts and export
- Sensor charts
src/widgets/sensor-charts/ui/SensorCharts.tsx - Chart selector
src/features/chart-selector/ui/ChartSelector.tsx - Range controls
src/features/time-range-selector/ui/TimeRangeSelector.tsx - Date picker
src/features/date-range-picker/ui/DateRangePicker.tsx - Export menu
src/features/export-data/ui/ExportMenu.tsx - Export service
src/entities/weather/api/weather-export.ts
Other components
- Dashboard user
Connections 24
- Dashboard user → React entry: opens dashboard
src/app/main.tsx - React entry → Route dispatch: renders app
- Route dispatch → Room page: routes to
src/app/providers/router/router.tsx - Route dispatch → Street page: routes to
src/app/providers/router/router.tsx - Room page → Dashboard layout: configures
src/pages/dashboard-room/ui/DashboardRoomPage.tsx - Street page → Dashboard layout: configures
src/pages/dashboard-street/ui/DashboardStreetPage.tsx - Dashboard layout → Weather queries: loads readings
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Dashboard layout → Weather socket: subscribes
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Weather queries → Weather API: requests data
src/entities/weather/api/weather.queries.ts - Weather API → Query cache: provides query data
- Weather socket → Weather model: maps updates
src/entities/weather/api/useWeatherSocket.ts - Weather socket → Query cache: writes updates
src/entities/weather/api/useWeatherSocket.ts - Weather socket → History append: appends history
src/entities/weather/api/useWeatherSocket.ts - Dashboard layout → Weather summary: renders metrics
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Dashboard layout → Temperature card: renders temperature
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Dashboard layout → Sensor charts: renders charts
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Dashboard layout → Top bar: renders navigation
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Dashboard layout → Live streams: renders streams
src/widgets/dashboard-layout/ui/DashboardLayout.tsx - Top bar → Language switcher: renders switcher
src/widgets/topbar/ui/TopBar.tsx - Sensor charts → Chart selector: renders selector
src/widgets/sensor-charts/ui/SensorCharts.tsx - Sensor charts → Range controls: renders ranges
src/widgets/sensor-charts/ui/SensorCharts.tsx - Sensor charts → Date picker: renders date picker
src/widgets/sensor-charts/ui/SensorCharts.tsx - Sensor charts → Export menu: renders export
src/widgets/sensor-charts/ui/SensorCharts.tsx - Export menu → Export service: exports data
src/features/export-data/ui/ExportMenu.tsx