Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/adrianaarang/climapp/llms.txt

Use this file to discover all available pages before exploring further.

The ClimApp dashboard is the main entry point of the application, available at the root / route. It automatically detects your location using the browser’s Geolocation API and retrieves live weather data from the nearest AEMET (Spain’s official meteorological agency) observation station — no manual configuration needed.

What it shows

Once location permission is granted, the dashboard displays a full set of current conditions sourced directly from AEMET:

Temperature

Current air temperature in degrees Celsius, shown prominently as the hero metric.

Humidity

Relative humidity expressed as a percentage.

Wind speed

Wind speed in km/h, displayed in the conditions panel.

Rainfall

Accumulated rainfall in millimetres (mm).

Station name

The identifier of the AEMET observation station supplying the data.

Municipality

The municipality name resolved from the nearest station’s metadata.

Last updated

Timestamp showing when the data was last fetched from AEMET.

How geolocation works

ClimApp uses the browser’s native Geolocation API to determine your position, then finds the closest AEMET station using the Haversine formula to calculate great-circle distances between your coordinates and every known station.
1

Request location permission

On first load the browser prompts you to allow location access. ClimApp cannot determine the nearest station without this permission.
2

Send coordinates to the API

Your latitude and longitude are sent to the /api/clima endpoint via an AJAX request from index.js.
3

Find the nearest AEMET station

The backend fetches all live conventional observations from AEMET and iterates over them. For each station it computes the Haversine distance between your coordinates and the station’s lat/lon fields. The station with the smallest distance is selected.
4

Fetch and display live data

ClimApp queries the AEMET API for that station, normalises the response, and updates the dashboard metrics in real time.

Weather alerts

ClimApp’s AlertService continuously evaluates incoming weather data against defined thresholds and surfaces active alerts on the dashboard. Alerts are not mutually exclusive — multiple alerts can be active at the same time, except for the temperature alerts, which follow a hierarchy (only the highest-severity temperature condition is raised).
Alert labelConditionDescription
ROJATemperature ≥ 40 °CExtreme heat warning
NARANJATemperature ≥ 35 °CHigh heat advisory
HELADATemperature ≤ 0 °CFrost warning
VIENTO_FUERTEWind speed > 70 km/hStrong wind warning
LLUVIA_INTENSARainfall > 30 mmHeavy rainfall warning
HUMEDAD_ALTAHumidity ≥ 90%High humidity advisory
Temperature alerts are mutually exclusive. If the temperature reaches 40 °C, only ROJA is raised — NARANJA is suppressed. HELADA is only raised when temperature is at or below 0 °C.
The dashboard navigation bar provides quick access to all sections of ClimApp:

Registro

Log your own climate observation manually.

API

Inspect the raw AEMET API response for the current station.

Histórico

Browse and filter previously saved climate records.

Comparar

Compare a manual reading against live AEMET data for the same station.
The dashboard requires browser location permission to function. If you deny or block location access, the page will remain in a loading state and no weather data will be shown. You can re-enable location access in your browser’s site settings and then refresh the page.

Build docs developers (and LLMs) love