diff --git a/README.md b/README.md index 771740c..6c5c3ca 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ single Go service with the React PWA embedded in the binary. ## Quick start -Requirements: Go 1.25 and Node.js 22. +Requirements: Go 1.25 and Node.js 22.22.2 or newer (or 24.15 or newer). +Vite and Vitest need at least 22.12; jsdom in the committed lockfile needs +22.22.2 on the 22 line. ```sh (cd web && npm ci) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 41ee40e..4beae8c 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -20,8 +20,9 @@ Traefik v3.6 — 10.60.1.33 │ ▼ docker compose project "mealquest" — 10.60.1.14 - ├── mealquest Go service + embedded PWA, port 8090 - ├── searxng sidecar for recipe search + ├── mealquest Go service + embedded PWA, host 8090 → container 8080 + ├── searxng sidecar for recipe search; internal compose network + │ only, no published port └── Litestream SQLite replication → Synology NAS 10.60.1.50 ``` @@ -53,7 +54,7 @@ database is replicated by Litestream to the NAS. ## Backend stack and conventions - Go 1.25, `CGO_ENABLED=0`, a single static binary. -- Router: `go-chi/chi/v5`. Logging: `log/slog` (structured). +- Router: `go-chi/chi/v5`. Logging: `log/slog` JSON. - SQLite via `modernc.org/sqlite`, with `journal_mode=WAL`, `foreign_keys=ON` and `busy_timeout`. **One writer connection plus a read pool.** Queries generated by `sqlc`. @@ -153,8 +154,12 @@ automatic** (D-021). ## Scheduler -Times are in the household timezone; the defaults below are set in -`household_settings`. +Times are in the household timezone. The times of `day_of_reminder` +(`reminder_time`) and `rotation_check` (`review_time`), and the day and time +of `suggestions_weekly`, `plan_draft` and `shopping_chat_autosend`, are +household settings in `household_settings` (`dinner_time` is also stored +there); the table shows their defaults. `week_rollover` and the `ai_runs` +purge are fixed and not configurable. | Schedule | When | Does | | --- | --- | --- | @@ -163,8 +168,8 @@ Times are in the household timezone; the defaults below are set in | `shopping_chat_autosend` | Saturday 08:00 | Sends the Supply run to Google Chat. | | `day_of_reminder` | Daily 16:30 | Tonight's dinner reminder. | | `rotation_check` | Daily 09:00 | Asks "Keep it in rotation?" for tried dinners. | -| `week_rollover` | Monday 00:05 | Freezes last week's Supply run into the Supply archive. | -| `ai_runs` purge | Daily | Deletes `ai_runs` rows past 30-day retention. | +| `week_rollover` | Monday 00:05 (fixed) | Freezes last week's Supply run into the Supply archive. | +| `ai_runs` purge | Daily (fixed) | Deletes `ai_runs` rows past 30-day retention. | Runs are recorded in `schedule_runs` and executed through `jobs`.