# brianaryansyah/weathcionz architecture

> Architecture diagram of the GitHub repository brianaryansyah/weathcionz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/brianaryansyah/weathcionz
- Repository: https://github.com/brianaryansyah/weathcionz

## Overview

This is a weather application with a dashboard and an interactive map experience. The main workflow enters through the React app, loads weather for the active location (using live data or generated demo data), and presents current conditions, forecasts, city comparisons, air quality, and map visualizations. Location selection and geolocation update shared weather state. The tree also contains a landing-page preview; its route wiring is not shown in the excerpts, so it is represented as a separate capability. Some component internals and API integrations were not sampled.

Main entry points: [`src/WeatherApp.jsx`](https://github.com/brianaryansyah/weathcionz/blob/main/src/WeatherApp.jsx) (Weather App), [`src/hooks/useWeatherData.js`](https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useWeatherData.js) (Weather Queries), [`src/store/useWeatherStore.js`](https://github.com/brianaryansyah/weathcionz/blob/main/src/store/useWeatherStore.js) (Weather State), [`src/components/FloatingSidebar.jsx`](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/FloatingSidebar.jsx) (Map Sidebar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app_entry["App Router<br/>[App.jsx]"]
  node_weather_app["Weather App<br/>[WeatherApp.jsx]"]
end

subgraph group_weather["Weather Data"]
  node_weather_store["Weather State<br/>[useWeatherStore.js]"]
  node_weather_hook["Weather Queries<br/>[useWeatherData.js]"]
  node_weather_api["Weather API<br/>[weatherApi.js]"]
  node_demo_data["Demo Weather<br/>[demoWeather.js]"]
  node_geo_hook["Geolocation Hook<br/>[useGeolocation.js]"]
  node_geo_service["Geolocation Service<br/>[geolocation.js]"]
  node_city_search["City Search<br/>[useSearchCities.js]"]
  node_weather_utils["Weather Formatting<br/>[weatherUtils.js]"]
end

subgraph group_map["Map Experience"]
  node_map_card["Dashboard Map<br/>[MapCard.jsx]"]
  node_map_canvas["Interactive Map<br/>[MapCanvas.jsx]"]
  node_heatmap["Weather Grid"]
  node_floating_sidebar["Map Sidebar"]
  node_map_legend["Map Legend<br/>[MapLegend.jsx]"]
  node_daily_forecast["Daily Forecast<br/>[DailyForecast.jsx]"]
  node_timeline["Forecast Timeline<br/>[TimelineSlider.jsx]"]
end

subgraph group_presentation["Views and UI"]
  node_dashboard["Dashboard Layout"]
  node_dashboard_header["Dashboard Header<br/>[Header.jsx]"]
  node_weather_now["Current Conditions<br/>[WeatherNowCard.jsx]"]
  node_city_cards["City Comparisons<br/>[CityCards.jsx]"]
  node_air_quality["Air Quality<br/>[AirQualityCard.jsx]"]
  node_temperature_chart["Temperature Chart"]
  node_tomorrow_card["Tomorrow Forecast<br/>[TomorrowCard.jsx]"]
  node_forecast_table["Forecast Table"]
  node_landing_preview["Landing Preview<br/>[Preview.jsx]"]
  node_landing_hero["Landing Hero<br/>[Hero.jsx]"]
  node_weather_icon["Weather Icons<br/>[WeatherIcon.jsx]"]
end

node_user(("Visitor"))

node_user -->|"opens"| node_app_entry
node_app_entry -->|"routes to"| node_weather_app
node_weather_app -->|"renders"| node_dashboard
node_weather_app -->|"reads state"| node_weather_store
node_weather_app -->|"loads weather"| node_weather_hook
node_weather_app -->|"uses location"| node_geo_hook
node_weather_app -->|"renders"| node_dashboard_header
node_weather_app -->|"renders"| node_weather_now
node_weather_app -->|"renders"| node_map_card
node_weather_app -->|"renders"| node_city_cards
node_weather_app -->|"renders"| node_air_quality
node_weather_app -->|"renders"| node_temperature_chart
node_weather_app -->|"renders"| node_tomorrow_card
node_weather_app -->|"renders"| node_forecast_table
node_weather_hook -->|"fetches live data"| node_weather_api
node_weather_hook -->|"falls back to"| node_demo_data
node_weather_hook -->|"reads location"| node_weather_store
node_geo_hook -->|"updates state"| node_weather_store
node_weather_store -->|"locates user"| node_geo_service
node_weather_store -->|"reverse geocodes"| node_weather_api
node_city_search -->|"geocodes query"| node_weather_api
node_city_search -->|"uses demo cities"| node_demo_data
node_map_card -->|"renders"| node_map_canvas
node_map_canvas -->|"reads map state"| node_weather_store
node_map_canvas -->|"loads conditions"| node_weather_hook
node_map_canvas -->|"generates grid"| node_heatmap
node_map_canvas -->|"formats values"| node_weather_utils
node_floating_sidebar -->|"loads conditions"| node_weather_hook
node_floating_sidebar -->|"reads map state"| node_weather_store
node_floating_sidebar -->|"searches cities"| node_city_search
node_floating_sidebar -->|"renders"| node_map_legend
node_floating_sidebar -->|"renders"| node_daily_forecast
node_floating_sidebar -->|"renders"| node_timeline
node_landing_preview -->|"reads location"| node_weather_store
node_landing_preview -->|"loads preview data"| node_weather_hook
node_landing_preview -->|"embeds map"| node_map_canvas
node_landing_preview -->|"renders"| node_weather_icon
node_landing_hero -->|"presents entry"| node_user
node_city_cards -->|"fetches city weather"| node_weather_api
node_city_cards -->|"renders"| node_weather_icon
node_weather_now -->|"renders"| node_weather_icon
node_tomorrow_card -->|"renders"| node_weather_icon
node_forecast_table -->|"loads forecast"| node_weather_hook
node_forecast_table -->|"formats forecast"| node_weather_utils

click node_app_entry "https://github.com/brianaryansyah/weathcionz/blob/main/src/App.jsx"
click node_weather_app "https://github.com/brianaryansyah/weathcionz/blob/main/src/WeatherApp.jsx"
click node_weather_store "https://github.com/brianaryansyah/weathcionz/blob/main/src/store/useWeatherStore.js"
click node_weather_hook "https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useWeatherData.js"
click node_weather_api "https://github.com/brianaryansyah/weathcionz/blob/main/src/services/weatherApi.js"
click node_demo_data "https://github.com/brianaryansyah/weathcionz/blob/main/src/data/demoWeather.js"
click node_geo_hook "https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useGeolocation.js"
click node_geo_service "https://github.com/brianaryansyah/weathcionz/blob/main/src/services/geolocation.js"
click node_city_search "https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useSearchCities.js"
click node_dashboard "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/DashboardLayout.jsx"
click node_dashboard_header "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/Header.jsx"
click node_weather_now "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/WeatherNowCard.jsx"
click node_city_cards "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/CityCards.jsx"
click node_air_quality "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/AirQualityCard.jsx"
click node_temperature_chart "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/TemperatureChart.jsx"
click node_tomorrow_card "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/TomorrowCard.jsx"
click node_forecast_table "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/ExpandedForecastTable.jsx"
click node_map_card "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/MapCard.jsx"
click node_map_canvas "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/MapCanvas.jsx"
click node_heatmap "https://github.com/brianaryansyah/weathcionz/blob/main/src/utils/heatmapGenerator.js"
click node_floating_sidebar "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/FloatingSidebar.jsx"
click node_map_legend "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/MapLegend.jsx"
click node_daily_forecast "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/DailyForecast.jsx"
click node_timeline "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/TimelineSlider.jsx"
click node_weather_utils "https://github.com/brianaryansyah/weathcionz/blob/main/src/utils/weatherUtils.js"
click node_landing_preview "https://github.com/brianaryansyah/weathcionz/blob/main/src/pages/LandingPage/Preview.jsx"
click node_landing_hero "https://github.com/brianaryansyah/weathcionz/blob/main/src/pages/LandingPage/Hero.jsx"
click node_weather_icon "https://github.com/brianaryansyah/weathcionz/blob/main/src/components/WeatherIcon.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_entry,node_weather_app toneBlue
class node_weather_store,node_weather_hook,node_weather_api,node_demo_data,node_geo_hook,node_geo_service,node_city_search,node_weather_utils toneAmber
class node_map_card,node_map_canvas,node_heatmap,node_floating_sidebar,node_map_legend,node_daily_forecast,node_timeline toneMint
class node_dashboard,node_dashboard_header,node_weather_now,node_city_cards,node_air_quality,node_temperature_chart,node_tomorrow_card,node_forecast_table,node_landing_preview,node_landing_hero,node_weather_icon toneRose
class node_user toneIndigo
```

## Components

### Application

- [App Router](https://github.com/brianaryansyah/weathcionz/blob/main/src/App.jsx): `src/App.jsx`
- [Weather App](https://github.com/brianaryansyah/weathcionz/blob/main/src/WeatherApp.jsx): `src/WeatherApp.jsx`

### Weather Data

- [Weather State](https://github.com/brianaryansyah/weathcionz/blob/main/src/store/useWeatherStore.js): `src/store/useWeatherStore.js`
- [Weather Queries](https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useWeatherData.js): `src/hooks/useWeatherData.js`
- [Weather API](https://github.com/brianaryansyah/weathcionz/blob/main/src/services/weatherApi.js): `src/services/weatherApi.js`
- [Demo Weather](https://github.com/brianaryansyah/weathcionz/blob/main/src/data/demoWeather.js): `src/data/demoWeather.js`
- [Geolocation Hook](https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useGeolocation.js): `src/hooks/useGeolocation.js`
- [Geolocation Service](https://github.com/brianaryansyah/weathcionz/blob/main/src/services/geolocation.js): `src/services/geolocation.js`
- [City Search](https://github.com/brianaryansyah/weathcionz/blob/main/src/hooks/useSearchCities.js): `src/hooks/useSearchCities.js`
- [Weather Formatting](https://github.com/brianaryansyah/weathcionz/blob/main/src/utils/weatherUtils.js): `src/utils/weatherUtils.js`

### Map Experience

- [Dashboard Map](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/MapCard.jsx): `src/components/dashboard/MapCard.jsx`
- [Interactive Map](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/MapCanvas.jsx): `src/components/MapCanvas.jsx`
- [Weather Grid](https://github.com/brianaryansyah/weathcionz/blob/main/src/utils/heatmapGenerator.js): `src/utils/heatmapGenerator.js`
- [Map Sidebar](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/FloatingSidebar.jsx): `src/components/FloatingSidebar.jsx`
- [Map Legend](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/MapLegend.jsx): `src/components/MapLegend.jsx`
- [Daily Forecast](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/DailyForecast.jsx): `src/components/DailyForecast.jsx`
- [Forecast Timeline](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/TimelineSlider.jsx): `src/components/TimelineSlider.jsx`

### Views and UI

- [Dashboard Layout](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/DashboardLayout.jsx): `src/components/dashboard/DashboardLayout.jsx`
- [Dashboard Header](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/Header.jsx): `src/components/dashboard/Header.jsx`
- [Current Conditions](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/WeatherNowCard.jsx): `src/components/dashboard/WeatherNowCard.jsx`
- [City Comparisons](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/CityCards.jsx): `src/components/dashboard/CityCards.jsx`
- [Air Quality](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/AirQualityCard.jsx): `src/components/dashboard/AirQualityCard.jsx`
- [Temperature Chart](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/TemperatureChart.jsx): `src/components/dashboard/TemperatureChart.jsx`
- [Tomorrow Forecast](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/dashboard/TomorrowCard.jsx): `src/components/dashboard/TomorrowCard.jsx`
- [Forecast Table](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/ExpandedForecastTable.jsx): `src/components/ExpandedForecastTable.jsx`
- [Landing Preview](https://github.com/brianaryansyah/weathcionz/blob/main/src/pages/LandingPage/Preview.jsx): `src/pages/LandingPage/Preview.jsx`
- [Landing Hero](https://github.com/brianaryansyah/weathcionz/blob/main/src/pages/LandingPage/Hero.jsx): `src/pages/LandingPage/Hero.jsx`
- [Weather Icons](https://github.com/brianaryansyah/weathcionz/blob/main/src/components/WeatherIcon.jsx): `src/components/WeatherIcon.jsx`

### Other components

- **Visitor**

## Connections

- Visitor → App Router: opens
- App Router → Weather App: routes to (evidence: `src/App.jsx`)
- Weather App → Dashboard Layout: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Weather State: reads state (evidence: `src/WeatherApp.jsx`)
- Weather App → Weather Queries: loads weather (evidence: `src/WeatherApp.jsx`)
- Weather App → Geolocation Hook: uses location (evidence: `src/WeatherApp.jsx`)
- Weather App → Dashboard Header: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Current Conditions: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Dashboard Map: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → City Comparisons: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Air Quality: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Temperature Chart: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Tomorrow Forecast: renders (evidence: `src/WeatherApp.jsx`)
- Weather App → Forecast Table: renders (evidence: `src/WeatherApp.jsx`)
- Weather Queries → Weather API: fetches live data (evidence: `src/hooks/useWeatherData.js`)
- Weather Queries → Demo Weather: falls back to (evidence: `src/hooks/useWeatherData.js`)
- Weather Queries → Weather State: reads location (evidence: `src/hooks/useWeatherData.js`)
- Geolocation Hook → Weather State: updates state (evidence: `src/hooks/useGeolocation.js`)
- Weather State → Geolocation Service: locates user (evidence: `src/store/useWeatherStore.js`)
- Weather State → Weather API: reverse geocodes (evidence: `src/store/useWeatherStore.js`)
- City Search → Weather API: geocodes query (evidence: `src/hooks/useSearchCities.js`)
- City Search → Demo Weather: uses demo cities (evidence: `src/hooks/useSearchCities.js`)
- Dashboard Map → Interactive Map: renders (evidence: `src/components/dashboard/MapCard.jsx`)
- Interactive Map → Weather State: reads map state (evidence: `src/components/MapCanvas.jsx`)
- Interactive Map → Weather Queries: loads conditions (evidence: `src/components/MapCanvas.jsx`)
- Interactive Map → Weather Grid: generates grid (evidence: `src/components/MapCanvas.jsx`)
- Interactive Map → Weather Formatting: formats values (evidence: `src/components/MapCanvas.jsx`)
- Map Sidebar → Weather Queries: loads conditions (evidence: `src/components/FloatingSidebar.jsx`)
- Map Sidebar → Weather State: reads map state (evidence: `src/components/FloatingSidebar.jsx`)
- Map Sidebar → City Search: searches cities (evidence: `src/components/FloatingSidebar.jsx`)
- Map Sidebar → Map Legend: renders (evidence: `src/components/FloatingSidebar.jsx`)
- Map Sidebar → Daily Forecast: renders (evidence: `src/components/FloatingSidebar.jsx`)
- Map Sidebar → Forecast Timeline: renders (evidence: `src/components/FloatingSidebar.jsx`)
- Landing Preview → Weather State: reads location (evidence: `src/pages/LandingPage/Preview.jsx`)
- Landing Preview → Weather Queries: loads preview data (evidence: `src/pages/LandingPage/Preview.jsx`)
- Landing Preview → Interactive Map: embeds map (evidence: `src/pages/LandingPage/Preview.jsx`)
- Landing Preview → Weather Icons: renders (evidence: `src/pages/LandingPage/Preview.jsx`)
- Landing Hero → Visitor: presents entry (evidence: `src/pages/LandingPage/Hero.jsx`)
- City Comparisons → Weather API: fetches city weather (evidence: `src/components/dashboard/CityCards.jsx`)
- City Comparisons → Weather Icons: renders (evidence: `src/components/dashboard/CityCards.jsx`)
- Current Conditions → Weather Icons: renders (evidence: `src/components/dashboard/WeatherNowCard.jsx`)
- Tomorrow Forecast → Weather Icons: renders (evidence: `src/components/dashboard/TomorrowCard.jsx`)
- Forecast Table → Weather Queries: loads forecast (evidence: `src/components/ExpandedForecastTable.jsx`)
- Forecast Table → Weather Formatting: formats forecast (evidence: `src/components/ExpandedForecastTable.jsx`)
