Fix architecture and README accuracy findings from review
- Topology: show the port mapping host 8090 -> container 8080, and note that searxng is internal to the compose network with no published port. - Backend: logging is log/slog JSON. - Scheduler: only the household-configurable times live in household_settings; week_rollover and the ai_runs purge are fixed. - README: state the Node.js floor required by the committed lockfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,9 @@ single Go service with the React PWA embedded in the binary.
|
|||||||
|
|
||||||
## Quick start
|
## 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
|
```sh
|
||||||
(cd web && npm ci)
|
(cd web && npm ci)
|
||||||
|
|||||||
+12
-7
@@ -20,8 +20,9 @@ Traefik v3.6 — 10.60.1.33
|
|||||||
│
|
│
|
||||||
▼
|
▼
|
||||||
docker compose project "mealquest" — 10.60.1.14
|
docker compose project "mealquest" — 10.60.1.14
|
||||||
├── mealquest Go service + embedded PWA, port 8090
|
├── mealquest Go service + embedded PWA, host 8090 → container 8080
|
||||||
├── searxng sidecar for recipe search
|
├── searxng sidecar for recipe search; internal compose network
|
||||||
|
│ only, no published port
|
||||||
└── Litestream SQLite replication → Synology NAS 10.60.1.50
|
└── 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
|
## Backend stack and conventions
|
||||||
|
|
||||||
- Go 1.25, `CGO_ENABLED=0`, a single static binary.
|
- 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`,
|
- SQLite via `modernc.org/sqlite`, with `journal_mode=WAL`,
|
||||||
`foreign_keys=ON` and `busy_timeout`. **One writer connection plus a read
|
`foreign_keys=ON` and `busy_timeout`. **One writer connection plus a read
|
||||||
pool.** Queries generated by `sqlc`.
|
pool.** Queries generated by `sqlc`.
|
||||||
@@ -153,8 +154,12 @@ automatic** (D-021).
|
|||||||
|
|
||||||
## Scheduler
|
## Scheduler
|
||||||
|
|
||||||
Times are in the household timezone; the defaults below are set in
|
Times are in the household timezone. The times of `day_of_reminder`
|
||||||
`household_settings`.
|
(`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 |
|
| 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. |
|
| `shopping_chat_autosend` | Saturday 08:00 | Sends the Supply run to Google Chat. |
|
||||||
| `day_of_reminder` | Daily 16:30 | Tonight's dinner reminder. |
|
| `day_of_reminder` | Daily 16:30 | Tonight's dinner reminder. |
|
||||||
| `rotation_check` | Daily 09:00 | Asks "Keep it in rotation?" for tried dinners. |
|
| `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. |
|
| `week_rollover` | Monday 00:05 (fixed) | Freezes last week's Supply run into the Supply archive. |
|
||||||
| `ai_runs` purge | Daily | Deletes `ai_runs` rows past 30-day retention. |
|
| `ai_runs` purge | Daily (fixed) | Deletes `ai_runs` rows past 30-day retention. |
|
||||||
|
|
||||||
Runs are recorded in `schedule_runs` and executed through `jobs`.
|
Runs are recorded in `schedule_runs` and executed through `jobs`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user