Rewrite the root README as a short, non-technical project overview
The old file was a confusing mix of eras: an accurate current Windows/Rocky/VPS environment section sitting alongside stale leftovers from before this project's current setup existed -- a wrong port (9090, staging is actually 9190), old docker-compose v1 syntax, a podman-compose three-terminal dev loop nobody uses, an nginx config for laikazinas.lsm.lv (the real current LSM production site, unrelated to and confusable with this project's actual temporary test domain), Fly.io commands from a hosting platform no longer in use, and an example command that happens to run one of the files this session's security review flagged as a mislabeled test script capable of touching a live database. Replaced with a short landing page: what the tool does, how it's built, current status (Rocky-only development now that Windows is retired from the workflow, laikapstak.li as the temporary test environment ahead of eventually replacing the live laikazinas.lsm.lv service), and a security summary -- all pointing to docs/ for actual technical depth rather than duplicating half-true instructions. Updated docs/README.md's own description of the root README to match.
This commit is contained in:
@@ -1,77 +1,51 @@
|
||||
# WeatherTool
|
||||
|
||||
Tool for downloading historical and real-time data from weather stations in Latvia. It aggregates and displays data for different time periods, cities, and weather parameters.
|
||||
WeatherTool prepares the weather graphics used on air: current temperatures,
|
||||
water temperatures, and severe-weather warnings, rendered as fixed-size PNG
|
||||
exports ready to drop into a broadcast. It's a large update to the tool
|
||||
currently running in production at `laikazinas.lsm.lv`.
|
||||
|
||||
## Setup
|
||||
Rename `.env-sample` to `.env` and fill in credentials
|
||||
## What it does
|
||||
|
||||
## Environment boundary
|
||||
- Pulls real observation data from LVĢMC (Latvia's national weather
|
||||
service) — current station temperatures, water temperatures, and active
|
||||
warnings — from their public open-data feed.
|
||||
- Lets an operator review and, where needed, correct individual values
|
||||
before export, without touching the underlying data.
|
||||
- Renders that data onto fixed newsroom map templates and exports
|
||||
broadcast-ready PNGs at the station's required resolutions.
|
||||
- Also includes analytical tools (historical station comparisons, a full
|
||||
data archive) for exploring the underlying weather data beyond what goes
|
||||
on air.
|
||||
|
||||
- **Windows:** source editing, review, and Git operations only. Do not compile, build, run containers, install project dependencies, or test the application here.
|
||||
- **Rocky Linux:** the only development runtime; compile, build, run, seed, and test WeatherTool here.
|
||||
- **Ubuntu VPS:** deployment target only. It receives the reviewed release artifact built and verified on Rocky; it is not a development or build host.
|
||||
## How it's built
|
||||
|
||||
## Run
|
||||
```
|
||||
docker-compose up --build --no-cache --force-recreate
|
||||
```
|
||||
A Scala backend (cats-effect, http4s, PostgreSQL) ingests and serves the
|
||||
data; a SolidJS frontend is where operators build the graphics. Both are
|
||||
described in full under [`docs/`](docs/README.md).
|
||||
|
||||
## Web
|
||||
[http://0.0.0.0:9090/](http://0.0.0.0:9090/)
|
||||
## Status
|
||||
|
||||
## nginx proxy config
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name laikazinas.lsm.lv;
|
||||
Actively in development. All development, testing, and staging currently
|
||||
happens on a single Rocky Linux machine; a temporary public test
|
||||
environment for the new version is at `laikapstak.li`, gated behind
|
||||
authentication, separate from the live `laikazinas.lsm.lv` service it will
|
||||
eventually replace. Continuous integration runs automatically on every
|
||||
push via Gitea Actions.
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:9090; # Forward requests to the Scala app
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
}
|
||||
```
|
||||
## Security
|
||||
|
||||
## Rocky development runtime
|
||||
```
|
||||
// 1st terminal
|
||||
podman-compose up postgres
|
||||
The application has been through an independent security review, with
|
||||
findings (including a critical one) found and fixed — see
|
||||
[`docs/UPDATE_ROADMAP.md`](docs/UPDATE_ROADMAP.md) for the full history.
|
||||
The public test environment sits behind Cloudflare, an authentication
|
||||
gate, and a private database with no public port. Deployments are manual,
|
||||
checksummed, and smoke-tested before going live — see
|
||||
[`docs/VPS_RELEASE_RUNBOOK.md`](docs/VPS_RELEASE_RUNBOOK.md).
|
||||
|
||||
// 2nd terminal
|
||||
sbt run
|
||||
## Getting started
|
||||
|
||||
// 3rd terminal
|
||||
cd web/
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Run one file
|
||||
```sbt "runMain grib.GribParserTest"```
|
||||
|
||||
## Backend Tech:
|
||||
- scala: cats-effects, http4s, fs2, circe, scalatest
|
||||
- postgres
|
||||
|
||||
## Frontend Tech:
|
||||
- SolidJS
|
||||
- Vite
|
||||
|
||||
## Fly commands
|
||||
```
|
||||
// suspend instance
|
||||
fly scale count 0
|
||||
```
|
||||
|
||||
```
|
||||
// check display
|
||||
fly ssh console
|
||||
df -h
|
||||
```
|
||||
|
||||
```
|
||||
fly scale memory 512
|
||||
```
|
||||
See [`docs/README.md`](docs/README.md) for current status, architecture,
|
||||
and the full documentation set, and [`docs/DEVELOPMENT_AND_STAGING.md`](docs/DEVELOPMENT_AND_STAGING.md)
|
||||
for exact build, run, and deployment commands. For local setup, copy
|
||||
`.env-sample` to `.env` and fill in real values.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# WeatherTool project documentation
|
||||
|
||||
This directory contains the working documentation for the WeatherTool modernization effort. The repository-root `README.md` is preserved as the original project overview; these documents describe the reviewed code, current staging environment, and changes being developed.
|
||||
This directory contains the working documentation for the WeatherTool modernization effort. The repository-root `README.md` is a short, non-technical overview for anyone landing on the repo (purpose, status, security posture); these documents describe the reviewed code, current staging environment, and changes being developed in full technical depth.
|
||||
|
||||
## Current status
|
||||
|
||||
|
||||
Reference in New Issue
Block a user