WeatherTool is a Scala backend, SolidJS frontend, and PostgreSQL database used to inspect Latvian weather observations and prepare map-based newsroom graphics.
```text
External providers Local/staging workflow
LVGMC station FTP/CSV ----+ Synthetic SQL seed
LVGMC forecast CSV -------+ |
DMI HARMONIE APIs --------+ v
v PostgreSQL
Scala ingestion |
| |
+---------> Scala/http4s API
|
v
SolidJS web UI
|
v
Canvas preview and PNG export
```
Staging currently exercises the PostgreSQL → API → frontend path with synthetic observations. It does not emulate LVGMC forecast files or HARMONIE GRIB files.
## Components
### Scala backend
- Serves JSON API routes and the built frontend from `web/dist`.
- Queries and aggregates station observations in PostgreSQL.
- Contains ingestion/parsing code for LVGMC station and forecast data.
- Contains HARMONIE discovery, download, GRIB parsing, and rendering support.
Faktiskā has a fixed 13-position station configuration. On page entry the frontend calls `/api/query/latest-temperatures/<cities>`. The backend selects the newest row per requested city and returns `tempAvg`, the station name, and its observation timestamp. The UI highlights missing or older observations and permits an explicit manual override without changing the stored observation.
Weather-font glyphs and wind values remain manual editorial inputs. One glyph can be applied to all fixed stations and exceptions changed individually. The browser composes these values on the fixed wind-template canvas and exports exactly 3840×1440 pixels. The production master images define the required output geometry; final Monta typography and pixel-level comparison remain pending.