Document Faktiska production contract
This commit is contained in:
@@ -70,7 +70,9 @@ The operator can add title/source overlays and export the rendered canvas.
|
|||||||
|
|
||||||
### Faktiskā
|
### Faktiskā
|
||||||
|
|
||||||
Faktiskā queries temperature values, then lets the operator assign bundled weather-font glyphs to selected cities. One symbol can be applied to all cities and exceptions adjusted individually. Temperature badges, symbols, title, and source are composed into the downloaded PNG.
|
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.
|
||||||
|
|
||||||
## What the repository does not provide by itself
|
## What the repository does not provide by itself
|
||||||
|
|
||||||
@@ -82,4 +84,3 @@ Faktiskā queries temperature values, then lets the operator assign bundled weat
|
|||||||
- Production monitoring, backups, incident handling, or a reviewed security boundary.
|
- Production monitoring, backups, incident handling, or a reviewed security boundary.
|
||||||
|
|
||||||
See `UPDATE_ROADMAP.md` before considering workplace deployment.
|
See `UPDATE_ROADMAP.md` before considering workplace deployment.
|
||||||
|
|
||||||
|
|||||||
@@ -76,15 +76,16 @@ Use a hard browser refresh after deployment.
|
|||||||
|
|
||||||
## Rocky full-stack deployment
|
## Rocky full-stack deployment
|
||||||
|
|
||||||
Only use a full Compose rebuild when backend, dependency, image, or Compose changes require it:
|
Only use a full backend rebuild when backend or Scala dependency changes require it. Because the repository-local PostgreSQL bind directory is container-owned, build a clean context directly from the committed Git tree:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /home/sandbox/Documents/projects/WeatherTool
|
cd /home/sandbox/Documents/projects/WeatherTool
|
||||||
docker compose up --build -d
|
git archive HEAD | docker build -t weathertool-staging-scala -f Dockerfile.local -
|
||||||
|
docker compose up -d --no-build scala
|
||||||
docker compose ps
|
docker compose ps
|
||||||
```
|
```
|
||||||
|
|
||||||
Known limitation: the repository currently contains the bind-mounted `postgres/` data directory. On Rocky, Docker BuildKit can fail while scanning that container-owned directory even when it is listed in `.dockerignore`. Do not loosen database-directory permissions. The durable fix is to move database storage outside the build context or use a named volume.
|
This archive pipeline includes committed source only, creates no temporary files, and prevents Docker from scanning the protected `postgres/` directory. Do not loosen database-directory permissions. A future durable Compose fix is to move database storage outside the build context or use a named volume.
|
||||||
|
|
||||||
## Verification
|
## Verification
|
||||||
|
|
||||||
@@ -95,7 +96,7 @@ At minimum, verify:
|
|||||||
3. The home navigation loads.
|
3. The home navigation loads.
|
||||||
4. City Analysis can query synthetic observations.
|
4. City Analysis can query synthetic observations.
|
||||||
5. Each map resolution renders and downloads.
|
5. Each map resolution renders and downloads.
|
||||||
6. Faktiskā assigns font symbols, applies one to all, supports exceptions, and downloads a PNG.
|
6. Faktiskā automatically loads the latest fixed-station temperatures, allows overrides, assigns font symbols, supports exceptions, and downloads a 3840×1440 PNG.
|
||||||
7. Browser developer tools show no new runtime errors.
|
7. Browser developer tools show no new runtime errors.
|
||||||
|
|
||||||
Known limitation: direct browser refreshes on newer client-side routes such as `/faktiska` can return 404 because the backend static-route list does not yet provide a general SPA fallback. Navigate from the home page until that backend behavior is fixed.
|
Known limitation: direct browser refreshes on newer client-side routes such as `/faktiska` can return 404 because the backend static-route list does not yet provide a general SPA fallback. Navigate from the home page until that backend behavior is fixed.
|
||||||
|
|||||||
+36
-20
@@ -28,29 +28,47 @@ Results can be viewed as grid/list data or rendered into the familiar temperatur
|
|||||||
|
|
||||||
## Faktiskā
|
## Faktiskā
|
||||||
|
|
||||||
Purpose: prepare the daily **faktiskā laika ziņu karte**—an actual-weather newsroom graphic containing:
|
Purpose: prepare the fixed daily **faktiskā laika ziņu karte**—the current-weather graphic used on air. The supplied production master images are the authoritative output specification, not visual inspiration.
|
||||||
|
|
||||||
- title;
|
The production template contains:
|
||||||
- source;
|
|
||||||
- temperatures;
|
- the fixed title/source nameplate already present in the production artwork;
|
||||||
|
- the latest available temperature for each fixed station;
|
||||||
- weather conditions represented by the bundled weather-font glyphs;
|
- weather conditions represented by the bundled weather-font glyphs;
|
||||||
- 1920×1080 or 3840×1440 output;
|
- manually entered wind direction, speed, and gust values;
|
||||||
- optional wind layout where required.
|
- a fixed 3840×1440 PNG output.
|
||||||
|
|
||||||
Current operator flow:
|
Current operator flow:
|
||||||
|
|
||||||
1. Select cities.
|
1. Open Faktiskā; the fixed station set and latest `tempAvg` observations load automatically.
|
||||||
2. Select resolution and optional wind layout.
|
2. Review the observation timestamp, missing/stale indicators, and temperatures.
|
||||||
3. Choose the temperature field, calculation, and time range.
|
3. Override any temperature manually when editorial correction is required; reset restores the fetched value.
|
||||||
4. Load map data.
|
4. Enter wind values manually.
|
||||||
5. Enter title and source.
|
5. Select a weather glyph, apply it to all stations where appropriate, and adjust exceptions.
|
||||||
6. Select a weather glyph.
|
6. Review and download `faktiska-3840x1440.png`.
|
||||||
7. Apply it to all selected cities when appropriate.
|
|
||||||
8. Assign different glyphs to the exceptions.
|
Fixed positions:
|
||||||
9. Review the canvas and download PNG.
|
|
||||||
|
| Position | Station |
|
||||||
|
|---:|---|
|
||||||
|
| 0 | Liepāja |
|
||||||
|
| 1 | Ventspils |
|
||||||
|
| 2 | Stende (temporary substitute for Talsi) |
|
||||||
|
| 3 | Saldus |
|
||||||
|
| 4 | Rīga |
|
||||||
|
| 5 | Jelgava |
|
||||||
|
| 6 | Ainaži |
|
||||||
|
| 7 | Valmiera |
|
||||||
|
| 8 | Madona |
|
||||||
|
| 9 | Alūksne |
|
||||||
|
| 10 | Zīlāni (temporary substitute for Jēkabpils) |
|
||||||
|
| 11 | Daugavpils |
|
||||||
|
| 12 | Rēzekne |
|
||||||
|
|
||||||
The weather symbols are not automatically derived from the historical temperature query. They remain editorial/manual inputs until a reliable phenomena-data mapping is designed and validated.
|
The weather symbols are not automatically derived from the historical temperature query. They remain editorial/manual inputs until a reliable phenomena-data mapping is designed and validated.
|
||||||
|
|
||||||
|
Current staging limitation: the synthetic dataset has no Valmiera row, so that position is deliberately shown as missing and remains manually editable. Monta is the production typeface; Rubik remains temporary until the authorized Monta font files are supplied. The export dimensions are locked, but final pixel-level placement must still be compared against the production masters after Monta is installed.
|
||||||
|
|
||||||
## Latvia overview
|
## Latvia overview
|
||||||
|
|
||||||
Purpose: aggregate selected fields across Latvia for a selected time range.
|
Purpose: aggregate selected fields across Latvia for a selected time range.
|
||||||
@@ -77,10 +95,8 @@ Development limitation: representative forecast CSV fixtures are not currently i
|
|||||||
|
|
||||||
## Decisions still required
|
## Decisions still required
|
||||||
|
|
||||||
- Exact workplace meaning and default query for Faktiskā temperatures.
|
|
||||||
- Which cities belong to each newsroom graphic by default.
|
|
||||||
- Default titles and source labels.
|
|
||||||
- Whether wind layouts belong to Faktiskā, City Analysis, or both.
|
|
||||||
- Whether weather conditions can eventually be populated automatically and which provider field is authoritative.
|
- Whether weather conditions can eventually be populated automatically and which provider field is authoritative.
|
||||||
|
- Whether Stende and Zīlāni remain the production feeds after users test real provider data.
|
||||||
|
- How Valmiera should be sourced when authorized provider data is available.
|
||||||
|
- Final Monta font files and a pixel-level export comparison against the production masters.
|
||||||
- Required authentication and role separation for analytical, production, and administrative workspaces.
|
- Required authentication and role separation for analytical, production, and administrative workspaces.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -4,12 +4,12 @@ This directory contains the working documentation for the WeatherTool modernizat
|
|||||||
|
|
||||||
## Current status
|
## Current status
|
||||||
|
|
||||||
- Development source is edited and tested on Windows.
|
- Development source is edited and committed on Windows; Docker builds and runtime testing are performed on Rocky.
|
||||||
- A production-like staging copy runs through Docker Compose on Rocky Linux at `http://192.168.1.101:9190`.
|
- A production-like staging copy runs through Docker Compose on Rocky Linux at `http://192.168.1.101:9190`.
|
||||||
- Staging uses deterministic synthetic station observations for all 33 stations.
|
- Staging uses deterministic synthetic station observations for all 33 stations.
|
||||||
- Scheduled external-provider jobs are disabled in development and staging.
|
- Scheduled external-provider jobs are disabled in development and staging.
|
||||||
- PostgreSQL is private to the project Compose network; only the Scala application publishes a host port.
|
- PostgreSQL is private to the project Compose network; only the Scala application publishes a host port.
|
||||||
- UI modernization is in progress. City Analysis retains temperature-map outputs, while Faktiskā is a separate temperature-and-weather-symbol production workflow.
|
- UI modernization is in progress. City Analysis retains custom analytical map outputs, while Faktiskā is a fixed 13-position, latest-temperature newsroom workflow with a locked 3840×1440 export.
|
||||||
- This is not yet approved or hardened for workplace production.
|
- This is not yet approved or hardened for workplace production.
|
||||||
|
|
||||||
## Documents
|
## Documents
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ This document tracks proposed WeatherTool improvements. Work should be delivered
|
|||||||
|
|
||||||
## Environments and workflow
|
## Environments and workflow
|
||||||
|
|
||||||
- **Windows development:** primary source-editing and UI-review workspace.
|
- **Windows development:** source editing and Git workflow only; Docker runtime testing is performed on Rocky.
|
||||||
- **Rocky staging:** production-like Docker deployment at `http://192.168.1.101:9190`.
|
- **Rocky staging:** production-like Docker deployment at `http://192.168.1.101:9190`.
|
||||||
- **Git over SSH:** Windows pushes reviewed commits to a private bare repository on Rocky; the Rocky staging checkout pulls those commits and rebuilds.
|
- **Git over SSH:** Windows pushes reviewed commits to a private bare repository on Rocky; the Rocky staging checkout pulls those commits and rebuilds.
|
||||||
- **Production:** remains separate until changes are reviewed, tested, and explicitly approved for workplace use.
|
- **Production:** remains separate until changes are reviewed, tested, and explicitly approved for workplace use.
|
||||||
@@ -16,7 +16,7 @@ Do not synchronize `.env`, database directories, generated dependencies, build o
|
|||||||
1. Make one coherent change at a time.
|
1. Make one coherent change at a time.
|
||||||
2. Record the existing behavior before intentionally changing it.
|
2. Record the existing behavior before intentionally changing it.
|
||||||
3. Keep dependency updates separate from UI redesign and functional changes.
|
3. Keep dependency updates separate from UI redesign and functional changes.
|
||||||
4. Test on Windows, then deploy the same commit to Rocky staging.
|
4. Review and commit on Windows, then deploy and test the same commit on Rocky staging.
|
||||||
5. Use synthetic or sanitized data outside the workplace environment.
|
5. Use synthetic or sanitized data outside the workplace environment.
|
||||||
6. Never enable external provider schedules with placeholder credentials.
|
6. Never enable external provider schedules with placeholder credentials.
|
||||||
7. Do not connect staging to workplace services without explicit authorization.
|
7. Do not connect staging to workplace services without explicit authorization.
|
||||||
@@ -118,6 +118,8 @@ Status: pending
|
|||||||
- [ ] Add units, legends, contextual help, and clear date semantics.
|
- [ ] Add units, legends, contextual help, and clear date semantics.
|
||||||
- [x] Establish the first responsive layout, typography, spacing, and component-system foundation.
|
- [x] Establish the first responsive layout, typography, spacing, and component-system foundation.
|
||||||
- [x] Add an explicit PNG download workflow for broadcast map assets.
|
- [x] Add an explicit PNG download workflow for broadcast map assets.
|
||||||
|
- [x] Implement the fixed Faktiskā station set, latest-temperature loading, manual overrides, and locked 3840×1440 export.
|
||||||
|
- [ ] Install the authorized Monta font and perform pixel-level comparison against the authoritative production masters.
|
||||||
- [ ] Test target resolutions and real workplace display conditions.
|
- [ ] Test target resolutions and real workplace display conditions.
|
||||||
- [ ] Check keyboard navigation, contrast, focus states, and screen-reader labeling.
|
- [ ] Check keyboard navigation, contrast, focus states, and screen-reader labeling.
|
||||||
|
|
||||||
@@ -142,6 +144,7 @@ Status: pending
|
|||||||
- Existing automated test coverage is minimal.
|
- Existing automated test coverage is minimal.
|
||||||
- Direct refreshes on newer frontend routes can return 404 until the backend gains a general SPA fallback.
|
- Direct refreshes on newer frontend routes can return 404 until the backend gains a general SPA fallback.
|
||||||
- Full Docker build context scanning on Rocky can fail on the container-owned `postgres/` bind directory; do not loosen its permissions.
|
- Full Docker build context scanning on Rocky can fail on the container-owned `postgres/` bind directory; do not loosen its permissions.
|
||||||
|
- The Faktiskā synthetic feed has no Valmiera observation; staging displays it as missing rather than substituting an unapproved station.
|
||||||
|
|
||||||
## Change log
|
## Change log
|
||||||
|
|
||||||
@@ -154,3 +157,4 @@ Record completed work here by date and commit after the Git workflow is establis
|
|||||||
| 2026-08-18 | `67decb3` | Adaptive temperature badges and title/source overlays | Yes |
|
| 2026-08-18 | `67decb3` | Adaptive temperature badges and title/source overlays | Yes |
|
||||||
| 2026-08-18 | `82199b8` | Separate City Analysis and Faktiskā workflows with direct symbol assignment | Yes |
|
| 2026-08-18 | `82199b8` | Separate City Analysis and Faktiskā workflows with direct symbol assignment | Yes |
|
||||||
| 2026-08-18 | `0c78d3c` | Optical centering for bundled weather-font glyphs | Pending Rocky verification |
|
| 2026-08-18 | `0c78d3c` | Optical centering for bundled weather-font glyphs | Pending Rocky verification |
|
||||||
|
| 2026-08-19 | `e726291` | Fixed Faktiskā workflow with latest observations, manual overrides, and production-size export | Yes |
|
||||||
|
|||||||
@@ -84,7 +84,14 @@ export const MapView: Component<{ type: MapResolution, data: () => ResultKeyVal[
|
|||||||
}
|
}
|
||||||
|
|
||||||
function downloadPng() {
|
function downloadPng() {
|
||||||
getCanvas()!.toBlob(blob => blob && download(blob, `weather-${type}.png`), 'image/png')
|
const canvas = getCanvas()!;
|
||||||
|
if (productionTemplate && (canvas.width !== 3840 || canvas.height !== 1440)) {
|
||||||
|
console.error(`Faktiskā export blocked: expected 3840 × 1440, received ${canvas.width} × ${canvas.height}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const filename = productionTemplate ? "faktiska-3840x1440.png" : `weather-${type}.png`;
|
||||||
|
canvas.toBlob(blob => blob && download(blob, filename), 'image/png')
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user