# 92am/brishty architecture

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

- Interactive diagram: https://gitdiagram.com/92am/brishty
- Repository: https://github.com/92am/brishty

## Overview

Brishty is a weather web application: users search for a location and reach a weather page, while the home page also presents regional weather previews, a world map, and news. The weather service resolves location names or coordinates, obtains forecasts and nearby cities, and maps provider responses into application data. The tree documents additional map, autocomplete, regional forecast, and news capabilities, but their internal wiring is not sampled here; those links are omitted where uncertain.

Main entry points: [`pages/index.tsx`](https://github.com/92am/brishty/blob/master/pages/index.tsx) (Home page), [`pages/weather/[...slug].tsx`](https://github.com/92am/brishty/blob/master/pages/weather/%5B...slug%5D.tsx) (Weather pages), [`services/WeatherDetailsService.ts`](https://github.com/92am/brishty/blob/master/services/WeatherDetailsService.ts) (Weather details), [`apis/OpenWeatherMapLocationDetailsClient.ts`](https://github.com/92am/brishty/blob/master/apis/OpenWeatherMapLocationDetailsClient.ts) (Location weather API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Pages and UI"]
  node_home["Home page<br/>[index.tsx]"]
  node_weather_pages["Weather pages<br/>[&#91;...slug&#93;.tsx]"]
  node_search_ui["Search UI<br/>[SearchBox.tsx]"]
  node_forecast_ui["Forecast views"]
  node_nearby_ui["Nearby locations"]
  node_regional_ui["Regional previews"]
end

subgraph group_weather["Weather data"]
  node_weather_service["Weather details"]
  node_weather_location_api["Location weather API"]
  node_weather_forecast_api["Forecast API"]
  node_cache[("Response cache<br/>[CacheService.ts]")]
end

subgraph group_discovery["Location discovery"]
  node_search_service["Search navigation<br/>[SearchService.ts]"]
  node_nearby_service["Nearby lookup"]
  node_geo_api["GeoDB nearby API"]
  node_autocomplete_ui["Location autocomplete"]
  node_autocomplete_api["Geoapify autocomplete client"]
end

subgraph group_content["Map and news"]
  node_map_ui["Interactive map<br/>[Map.tsx]"]
  node_map_controls["Map controls"]
  node_news_service["World news"]
  node_news_api["NY Times client"]
end

node_visitor(("Visitor"))
node_openweather(("OpenWeather"))
node_geodb(("GeoDB Cities"))
node_geoapify(("Geoapify"))
node_nytimes(("NY Times"))

node_visitor -->|"opens"| node_home
node_visitor -->|"searches"| node_search_ui
node_visitor -->|"opens"| node_weather_pages
node_home -->|"loads previews"| node_weather_service
node_home -->|"loads news"| node_news_service
node_home -->|"renders map"| node_map_ui
node_home -->|"renders forecasts"| node_regional_ui
node_weather_pages -->|"loads forecast"| node_weather_service
node_weather_pages -->|"renders forecast"| node_forecast_ui
node_search_ui -->|"submits search"| node_search_service
node_search_service -->|"navigates"| node_weather_pages
node_weather_service -->|"resolves location"| node_weather_location_api
node_weather_service -->|"fetches forecast"| node_weather_forecast_api
node_weather_service -->|"gets nearby cities"| node_nearby_service
node_weather_location_api -->|"reads or writes"| node_cache
node_weather_forecast_api -->|"reads or writes"| node_cache
node_weather_location_api -->|"requests weather"| node_openweather
node_weather_forecast_api -->|"requests forecast"| node_openweather
node_nearby_service -->|"requests nearby cities"| node_geo_api
node_geo_api -->|"reads or writes"| node_cache
node_geo_api -->|"requests cities"| node_geodb
node_weather_pages -->|"renders locations"| node_nearby_ui
node_visitor -->|"enters location"| node_autocomplete_ui
node_autocomplete_ui -.->|"requests suggestions"| node_autocomplete_api
node_autocomplete_api -.->|"requests suggestions"| node_geoapify
node_map_ui -->|"uses controls"| node_map_controls
node_news_service -->|"fetches stories"| node_news_api
node_news_api -->|"requests stories"| node_nytimes

click node_home "https://github.com/92am/brishty/blob/master/pages/index.tsx"
click node_weather_pages "https://github.com/92am/brishty/blob/master/pages/weather/%5B...slug%5D.tsx"
click node_search_ui "https://github.com/92am/brishty/blob/master/components/SearchBox.tsx"
click node_forecast_ui "https://github.com/92am/brishty/blob/master/components/DetailedCurrentWeather.tsx"
click node_nearby_ui "https://github.com/92am/brishty/blob/master/components/NearbyLocations.tsx"
click node_regional_ui "https://github.com/92am/brishty/blob/master/components/TopLocationsWeatherPreviewsCarousel.tsx"
click node_search_service "https://github.com/92am/brishty/blob/master/services/SearchService.ts"
click node_weather_service "https://github.com/92am/brishty/blob/master/services/WeatherDetailsService.ts"
click node_nearby_service "https://github.com/92am/brishty/blob/master/services/NearbyLocationsService.ts"
click node_weather_location_api "https://github.com/92am/brishty/blob/master/apis/OpenWeatherMapLocationDetailsClient.ts"
click node_weather_forecast_api "https://github.com/92am/brishty/blob/master/apis/OpenWeatherMapWeatherDetailsClient.ts"
click node_geo_api "https://github.com/92am/brishty/blob/master/apis/GeoDbNearbyLocationsClient.ts"
click node_cache "https://github.com/92am/brishty/blob/master/services/CacheService.ts"
click node_autocomplete_ui "https://github.com/92am/brishty/blob/master/components/AsyncLocationSearchTypeahead.tsx"
click node_autocomplete_api "https://github.com/92am/brishty/blob/master/apis/GeoapifyAutoCompleteClient.ts"
click node_map_ui "https://github.com/92am/brishty/blob/master/components/Map.tsx"
click node_map_controls "https://github.com/92am/brishty/blob/master/components/MapControlsExecutor.tsx"
click node_news_service "https://github.com/92am/brishty/blob/master/services/WorldNewsService.ts"
click node_news_api "https://github.com/92am/brishty/blob/master/apis/NyTimesNewsClient.ts"

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_home,node_weather_pages,node_search_ui,node_forecast_ui,node_nearby_ui,node_regional_ui toneBlue
class node_weather_service,node_weather_location_api,node_weather_forecast_api,node_cache toneAmber
class node_search_service,node_nearby_service,node_geo_api,node_autocomplete_ui,node_autocomplete_api,node_geoapify toneMint
class node_map_ui,node_map_controls,node_news_service,node_news_api toneRose
class node_visitor,node_openweather,node_geodb,node_nytimes toneIndigo
```

## Components

### Pages and UI

- [Home page](https://github.com/92am/brishty/blob/master/pages/index.tsx): `pages/index.tsx`
- [Weather pages](https://github.com/92am/brishty/blob/master/pages/weather/%5B...slug%5D.tsx): `pages/weather/[...slug].tsx`
- [Search UI](https://github.com/92am/brishty/blob/master/components/SearchBox.tsx): `components/SearchBox.tsx`
- [Forecast views](https://github.com/92am/brishty/blob/master/components/DetailedCurrentWeather.tsx): `components/DetailedCurrentWeather.tsx`
- [Nearby locations](https://github.com/92am/brishty/blob/master/components/NearbyLocations.tsx): `components/NearbyLocations.tsx`
- [Regional previews](https://github.com/92am/brishty/blob/master/components/TopLocationsWeatherPreviewsCarousel.tsx): `components/TopLocationsWeatherPreviewsCarousel.tsx`

### Weather data

- [Weather details](https://github.com/92am/brishty/blob/master/services/WeatherDetailsService.ts): `services/WeatherDetailsService.ts`
- [Location weather API](https://github.com/92am/brishty/blob/master/apis/OpenWeatherMapLocationDetailsClient.ts): `apis/OpenWeatherMapLocationDetailsClient.ts`
- [Forecast API](https://github.com/92am/brishty/blob/master/apis/OpenWeatherMapWeatherDetailsClient.ts): `apis/OpenWeatherMapWeatherDetailsClient.ts`
- [Response cache](https://github.com/92am/brishty/blob/master/services/CacheService.ts): `services/CacheService.ts`

### Location discovery

- [Search navigation](https://github.com/92am/brishty/blob/master/services/SearchService.ts): `services/SearchService.ts`
- [Nearby lookup](https://github.com/92am/brishty/blob/master/services/NearbyLocationsService.ts): `services/NearbyLocationsService.ts`
- [GeoDB nearby API](https://github.com/92am/brishty/blob/master/apis/GeoDbNearbyLocationsClient.ts): `apis/GeoDbNearbyLocationsClient.ts`
- [Location autocomplete](https://github.com/92am/brishty/blob/master/components/AsyncLocationSearchTypeahead.tsx): `components/AsyncLocationSearchTypeahead.tsx`
- [Geoapify autocomplete client](https://github.com/92am/brishty/blob/master/apis/GeoapifyAutoCompleteClient.ts): `apis/GeoapifyAutoCompleteClient.ts`

### Map and news

- [Interactive map](https://github.com/92am/brishty/blob/master/components/Map.tsx): `components/Map.tsx`
- [Map controls](https://github.com/92am/brishty/blob/master/components/MapControlsExecutor.tsx): `components/MapControlsExecutor.tsx`
- [World news](https://github.com/92am/brishty/blob/master/services/WorldNewsService.ts): `services/WorldNewsService.ts`
- [NY Times client](https://github.com/92am/brishty/blob/master/apis/NyTimesNewsClient.ts): `apis/NyTimesNewsClient.ts`

### Other components

- **Visitor**
- **OpenWeather**
- **GeoDB Cities**
- **Geoapify**
- **NY Times**

## Connections

- Visitor → Home page: opens
- Visitor → Search UI: searches
- Visitor → Weather pages: opens
- Home page → Weather details: loads previews
- Home page → World news: loads news
- Home page → Interactive map: renders map
- Home page → Regional previews: renders forecasts
- Weather pages → Weather details: loads forecast
- Weather pages → Forecast views: renders forecast
- Search UI → Search navigation: submits search
- Search navigation → Weather pages: navigates
- Weather details → Location weather API: resolves location
- Weather details → Forecast API: fetches forecast
- Weather details → Nearby lookup: gets nearby cities
- Location weather API → Response cache: reads or writes
- Forecast API → Response cache: reads or writes
- Location weather API → OpenWeather: requests weather
- Forecast API → OpenWeather: requests forecast
- Nearby lookup → GeoDB nearby API: requests nearby cities
- GeoDB nearby API → Response cache: reads or writes
- GeoDB nearby API → GeoDB Cities: requests cities
- Weather pages → Nearby locations: renders locations
- Visitor → Location autocomplete: enters location
- Location autocomplete → Geoapify autocomplete client: requests suggestions
- Geoapify autocomplete client → Geoapify: requests suggestions
- Interactive map → Map controls: uses controls
- World news → NY Times client: fetches stories
- NY Times client → NY Times: requests stories
