# evanputra1/periksa-cuaca architecture

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

- Interactive diagram: https://gitdiagram.com/evanputra1/periksa-cuaca
- Repository: https://github.com/evanputra1/periksa-cuaca

## Overview

This is a browser-based weather forecast app. Users search by city or request their current location; the app resolves coordinates, fetches a forecast, selects one entry per day, and renders a current-weather panel plus forecast cards. The sampled JavaScript shows these flows and their OpenWeatherMap and browser geolocation calls. The HTML structure is represented by the tree, but its contents were not sampled.

Main entry points: [`index.html`](https://github.com/evanputra1/periksa-cuaca/blob/main/index.html) (Weather Page), [`script.js`](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js) (Forecast Fetch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["User Inputs"]
  node_page["Weather Page<br/>[index.html]"]
  node_city_search["City Search<br/>[script.js]"]
  node_location_lookup["Location Lookup<br/>[script.js]"]
end

subgraph group_weather["Forecast Workflow"]
  node_forecast_fetch["Forecast Fetch<br/>[script.js]"]
  node_daily_selection["Daily Selection<br/>[script.js]"]
  node_card_formatter["Weather Cards<br/>[script.js]"]
end

subgraph group_services["External Services"]
  node_geolocation["Browser Geolocation"]
  node_city_geocoding["City Geocoding"]
  node_reverse_geocoding["Reverse Geocoding"]
  node_forecast_api["Forecast API"]
end

node_user(("User"))

node_user -->|"uses"| node_page
node_page -->|"searches"| node_city_search
node_page -->|"requests location"| node_location_lookup
node_city_search -->|"looks up city"| node_city_geocoding
node_city_geocoding -->|"passes coordinates"| node_forecast_fetch
node_location_lookup -->|"gets position"| node_geolocation
node_location_lookup -->|"resolves city"| node_reverse_geocoding
node_reverse_geocoding -->|"passes coordinates"| node_forecast_fetch
node_forecast_fetch -->|"requests forecast"| node_forecast_api
node_forecast_fetch -->|"filters days"| node_daily_selection
node_daily_selection -->|"formats entries"| node_card_formatter
node_card_formatter -->|"renders panels"| node_page

click node_page "https://github.com/evanputra1/periksa-cuaca/blob/main/index.html"
click node_city_search "https://github.com/evanputra1/periksa-cuaca/blob/main/script.js"
click node_location_lookup "https://github.com/evanputra1/periksa-cuaca/blob/main/script.js"
click node_forecast_fetch "https://github.com/evanputra1/periksa-cuaca/blob/main/script.js"
click node_daily_selection "https://github.com/evanputra1/periksa-cuaca/blob/main/script.js"
click node_card_formatter "https://github.com/evanputra1/periksa-cuaca/blob/main/script.js"

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_page,node_city_search,node_location_lookup,node_user toneBlue
class node_forecast_fetch,node_daily_selection,node_card_formatter toneAmber
class node_geolocation,node_city_geocoding,node_reverse_geocoding,node_forecast_api toneMint
```

## Components

### User Inputs

- [Weather Page](https://github.com/evanputra1/periksa-cuaca/blob/main/index.html): `index.html`
- [City Search](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js): `script.js`
- [Location Lookup](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js): `script.js`

### Forecast Workflow

- [Forecast Fetch](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js): `script.js`
- [Daily Selection](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js): `script.js`
- [Weather Cards](https://github.com/evanputra1/periksa-cuaca/blob/main/script.js): `script.js`

### External Services

- **Browser Geolocation**
- **City Geocoding**
- **Reverse Geocoding**
- **Forecast API**

### Other components

- **User**

## Connections

- User → Weather Page: uses
- Weather Page → City Search: searches (evidence: `script.js`)
- Weather Page → Location Lookup: requests location (evidence: `script.js`)
- City Search → City Geocoding: looks up city (evidence: `script.js`)
- City Geocoding → Forecast Fetch: passes coordinates (evidence: `script.js`)
- Location Lookup → Browser Geolocation: gets position (evidence: `script.js`)
- Location Lookup → Reverse Geocoding: resolves city (evidence: `script.js`)
- Reverse Geocoding → Forecast Fetch: passes coordinates (evidence: `script.js`)
- Forecast Fetch → Forecast API: requests forecast (evidence: `script.js`)
- Forecast Fetch → Daily Selection: filters days (evidence: `script.js`)
- Daily Selection → Weather Cards: formats entries (evidence: `script.js`)
- Weather Cards → Weather Page: renders panels (evidence: `script.js`)
