Compare commits

..
36 Commits
Author SHA1 Message Date
overseer 561f2490d6 Merge pull request 'Release: Feature 24 (Automated deploys)' (#211) from release/2026-10-12b into main
CI / ci (push) Successful in 8m27s
Reviewed-on: #211
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-12 08:37:35 -04:00
dev_agent 6d3312045d Merge remote-tracking branch 'origin/main' into HEAD
CI / ci (push) Successful in 10m44s
CI / ci (pull_request) Successful in 10m36s
2026-10-12 07:33:57 -04:00
overseer 88209638cd Merge pull request 'Release: Feature 23 (Meal photos for manually added dinners)' (#209) from release/2026-10-12 into main
CI / ci (push) Successful in 8m20s
Reviewed-on: #209
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-12 06:44:31 -04:00
dev_agent e43df7f165 Merge remote-tracking branch 'origin/main' into HEAD
CI / ci (push) Successful in 9m51s
CI / ci (pull_request) Successful in 9m52s
2026-10-11 23:59:18 -04:00
overseer 743a1555d3 Merge pull request 'Release: Features 15, 19, 20 and 21' (#185) from release/2026-10-10 into main
CI / ci (push) Successful in 8m44s
Reviewed-on: #185
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-10 21:28:49 -04:00
dev_agentandClaude Opus 5.5 3be3c9b968 Merge origin/main into release/2026-10-10
CI / ci (pull_request) Successful in 8m9s
CI / ci (push) Successful in 8m16s
Resolve the Feature 18 placeholder Home against Feature 21's real Home
screen: keep the Feature 21 Home route and App tests, and drop the
placeholder web/src/pages/HomePage so / renders only the real Home.
Quick dinner and Cook from what I have links are covered by
web/src/home/HomePage.test.tsx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:35:46 -04:00
overseer 540ea4ddd7 Merge pull request 'Release: Feature 18 (Cook From What I Have and Quick Dinners)' (#158) from release/2026-10-09 into main
CI / ci (push) Successful in 6m13s
Reviewed-on: #158
2026-10-10 14:53:01 -04:00
dev_agentandClaude Opus 5.5 2bc412ae06 Add Quick dinner and Cook from what I have shortcuts to Home
CI / ci (push) Successful in 5m39s
CI / ci (pull_request) Successful in 5m43s
The placeholder Home now links to /quick and /cook-from-pantry, so
Cook from what I have has an in-app entry point. App tests click each
link and check the destination screen renders.

Task: ab589dee-4cdc-4a17-aff9-7b3cba975548

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:14:33 -04:00
orchestrator-agent 01038b376a Feature 18 release-review fixes: true Quest-log state and Find ideas with a draft (#160)
Co-authored-by: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com>
(cherry picked from commit 14f7141e44)
2026-10-10 14:13:05 -04:00
dev_agent d1be28467c Merge remote-tracking branch 'origin/main' into HEAD
CI / ci (push) Successful in 5m44s
CI / ci (pull_request) Successful in 5m40s
2026-10-09 10:45:52 -04:00
overseer d7c7a3314d Merge pull request 'Release: Feature 17 (Shopping List and Supply Archive)' (#142) from release/2026-10-08b into main
CI / ci (push) Successful in 4m50s
Reviewed-on: #142
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-08 18:15:48 -04:00
dev_agent e0574b1511 Merge remote-tracking branch 'origin/main' into release/2026-10-08b
CI / ci (push) Successful in 5m15s
CI / ci (pull_request) Successful in 5m8s
2026-10-08 17:15:21 -04:00
overseer e9b7593d3c Merge pull request 'Promote dev to main: Feature 16 (Google Calendar Sync) + release corrections' (#131) from release/2026-10-08 into main
CI / ci (push) Failing after 3m39s
Reviewed-on: #131
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-08 12:01:31 -04:00
dev_agent 8e33b7b824 Merge remote-tracking branch 'origin/main' into release/2026-10-08
CI / ci (push) Successful in 4m52s
CI / ci (pull_request) Successful in 4m22s
2026-10-08 03:14:36 -04:00
overseer 75b8d64f74 Merge pull request 'Promote dev to main: Feature 14 (Weekly Plan Builder)' (#123) from release/2026-10-07c into main
CI / ci (push) Successful in 3m19s
Reviewed-on: #123
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-07 19:29:54 -04:00
dev_agent fd225b9f90 Merge remote-tracking branch 'origin/main' into release/2026-10-07c
CI / ci (pull_request) Successful in 3m16s
CI / ci (push) Successful in 3m39s
2026-10-07 16:54:33 -04:00
overseer 66fc292166 Merge pull request 'Promote dev to main: Feature 13 (Discover - Side Quest Suggestions)' (#115) from release/2026-10-07b into main
CI / ci (push) Successful in 2m45s
Reviewed-on: #115
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-07 08:07:10 -04:00
dev_agent fa62813bb7 Merge remote-tracking branch 'origin/main' into release/2026-10-07b
CI / ci (push) Successful in 3m5s
CI / ci (pull_request) Successful in 2m45s
2026-10-07 07:05:10 -04:00
overseer 1bbacf2df5 Merge pull request 'Promote dev to main: Feature 12 (regular dinners and onboarding)' (#98) from release/2026-10-07 into main
CI / ci (push) Successful in 2m49s
Reviewed-on: #98
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-07 06:54:05 -04:00
dev_agent 372424e2f5 Merge remote-tracking branch 'origin/dev' into release/2026-10-07
CI / ci (push) Successful in 2m28s
CI / ci (pull_request) Successful in 2m26s
2026-10-07 00:41:03 -04:00
dev_agent a27ef6a4c4 Merge remote-tracking branch 'origin/dev' into release/2026-10-07
CI / ci (push) Successful in 2m28s
CI / ci (pull_request) Successful in 2m25s
2026-10-07 00:14:42 -04:00
dev_agent 7138721a28 Merge remote-tracking branch 'origin/dev' into release/2026-10-07
CI / ci (push) Successful in 2m26s
CI / ci (pull_request) Successful in 2m35s
2026-10-06 23:13:06 -04:00
dev_agent c54af1656c Merge remote-tracking branch 'origin/main' into release/2026-10-07
CI / ci (push) Successful in 2m24s
CI / ci (pull_request) Successful in 2m37s
2026-10-06 22:00:58 -04:00
overseer b0a6d896ef Merge pull request 'Promote dev to main: Feature 11 (settings home and Admin AI assistant)' (#87) from release/2026-10-06c into main
CI / ci (push) Successful in 2m2s
Reviewed-on: #87
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-06 13:46:37 -04:00
dev_agent 2fe439cdcd Merge dev into release/2026-10-06c: incorporate the deflake correction
CI / ci (push) Successful in 2m9s
CI / ci (pull_request) Successful in 2m4s
2026-10-06 13:19:22 -04:00
dev_agent cc6c1f9cf9 Merge main into release/2026-10-06c before promotion review
CI / ci (push) Successful in 2m1s
CI / ci (pull_request) Failing after 1m2s
2026-10-06 12:46:00 -04:00
overseer 768bb48b21 Merge pull request 'Promote dev to main: Feature 10 (recipe grounding and photos)' (#79) from release/2026-10-06b into main
CI / ci (push) Successful in 1m49s
Reviewed-on: #79
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-06 07:39:40 -04:00
dev_agent a6a32b8426 Merge main into release/2026-10-06b before promotion review
CI / ci (push) Successful in 1m53s
CI / ci (pull_request) Successful in 1m52s
2026-10-06 07:28:53 -04:00
overseer d4be6212bc Merge pull request 'Promote dev to main: Feature 07 (deployment, identity and backups)' (#76) from release/2026-10-06 into main
CI / ci (push) Successful in 1m40s
Reviewed-on: #76
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-05 21:19:34 -04:00
dev_agent 2dbfc74f3e Merge main into release/2026-10-06 before promotion review
CI / ci (push) Successful in 1m42s
CI / ci (pull_request) Successful in 1m43s
2026-10-05 21:01:02 -04:00
overseer 9cddbbb8a9 Merge pull request 'Promote dev to main: Feature 06 (PWA shell and offline)' (#71) from release/2026-10-05b into main
CI / ci (push) Successful in 1m40s
Reviewed-on: #71
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-05 16:02:03 -04:00
dev_agent a2f3143ac2 Merge main into release/2026-10-05b before promotion review
CI / ci (push) Successful in 1m42s
CI / ci (pull_request) Successful in 1m40s
2026-10-05 15:27:27 -04:00
overseer 6e134968cc Merge pull request 'Promote dev to main: Features 08-09' (#63) from release/2026-10-05 into main
CI / ci (push) Successful in 1m35s
Reviewed-on: #63
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-05 12:19:09 -04:00
dev_agent 86e7cc63c2 Merge dev into release/2026-10-05: incorporate cancelled-backoff correction
CI / ci (push) Successful in 1m35s
CI / ci (pull_request) Successful in 1m35s
2026-10-05 11:42:11 -04:00
dev_agent 37315c7821 Merge main into release/2026-10-05 before promotion review
CI / ci (push) Successful in 1m37s
CI / ci (pull_request) Successful in 1m36s
2026-10-05 11:21:47 -04:00
overseer 084350cb03 Merge pull request 'Promote dev to main: Features 01–05' (#47) from release/2026-10-04 into main
CI / ci (push) Successful in 1m30s
Reviewed-on: #47
Reviewed-by: The Reviewer <18+review_agent@code.cubecraftcreations.com>
2026-10-04 10:35:01 -04:00
3 changed files with 22 additions and 104 deletions
+4 -8
View File
@@ -78,18 +78,17 @@ behaviour, exercise it (hit the endpoint, render the page).
| Path | Purpose |
| --- | --- |
| `cmd/server` | Entry point. Wiring only — no business logic. |
| `cmd/vapidgen` | Prints a new VAPID key pair for Web Push. |
| `internal/config` | `MEALQUEST_*` environment config; secrets from `*_FILE`. |
| `internal/server` | HTTP server, routes, `/health`. |
| `internal/frontend` | `go:embed` of the built PWA with SPA fallback. |
| `internal/*` | `auth`, `forwarded`, `secureurl`, `db`, `store`, `secretbox`, `household`, `dinners`, `recipes`, `ai/llm`, `ai/harness`, `ai/skills`, `ai/aisettings`, `suggest`, `plan`, `shopping`, `ideas`, `home`, `gcal`, `notify`, `push`, `chat`, `vapid`, `jobs`, `scheduler` — one line each in [ARCHITECTURE.md](docs/ARCHITECTURE.md#repository-layout). |
| `migrations/` | SQL migrations, embedded and applied at boot by `internal/store`; sqlc queries in `migrations/queries/`. |
| `internal/*` (planned) | `auth`, `db`, `store`, `secretbox`, `household`, `dinners`, `recipes`, `ai/llm`, `ai/harness`, `ai/skills`, `suggest`, `plan`, `shopping`, `ideas`, `gcal`, `notify`, `push`, `chat`, `jobs`, `scheduler`. |
| `migrations/` | SQL migrations (planned). |
| `web/` | React PWA source. |
| `deploy/` | Deployment files: compose stack, systemd units, [deploy runbook](deploy/RUNBOOK.md) and the automated deploy (`auto-deploy.sh` with `systemd/mealquest-auto-deploy.*`). |
| `docs/` | Project documentation, including [ARCHITECTURE.md](docs/ARCHITECTURE.md). |
| `design/` | Requirements and UI handoff. **Read-only reference** — do not edit. |
| `Dockerfile` | Multi-stage image build, at the repository root. |
| `Makefile` | `dev`, `test`, `build`, `docker`; `sqlc` and `sqlc-check` regenerate and check `internal/db`. |
| `Makefile` | `dev`, `test`, `build`, `docker`. |
| `.gitea/workflows/ci.yml` | CI quality floor. |
Design references:
@@ -105,10 +104,7 @@ Design references:
- **Task branches:** `task/<slug>_<task-uuid>`, branched from the feature branch.
- Task pull requests **squash-merge into the feature branch**.
- The feature pull request merges into `dev`.
- **Only `overseer` merges `dev` → `main`** (a release). On the production
host, `mealquest-auto-deploy.timer` then deploys the new `main` once its
CI passes ([deploy/RUNBOOK.md](deploy/RUNBOOK.md) "Automated deploys");
nothing deploys `dev` or a feature branch.
- **Only `overseer` merges `dev` → `main`** (a release).
- Never push directly to `dev` or `main`.
- Authors never review, approve, merge or close their own work.
- Never store credentials in the repository; environment or ignored files only.
+3 -30
View File
@@ -7,27 +7,9 @@ builds a weekly plan, pushes it to Google Calendar, and generates a shopping
list grouped by dinner, kept as a browsable weekly history. It ships as a
single Go service with the React PWA embedded in the binary.
Production runs at <https://mealquest.cubecraftlabs.com> for one household,
signed in through Authentik.
## Stack
- **Backend:** Go 1.25 (`CGO_ENABLED=0`, one static binary), chi router,
SQLite through `modernc.org/sqlite` with sqlc queries and embedded
migrations, Authentik OIDC, `log/slog`. AI calls go to an
OpenAI-compatible, Anthropic or Ollama endpoint over plain HTTP; recipes
come from SearXNG or Brave search and the recipe page's schema.org data.
Google Calendar, Google Chat and Web Push are the integrations.
- **Frontend:** React 19, TypeScript, Vite, React Router 7, TanStack Query 5,
`vite-plugin-pwa`, CSS Modules over the design tokens; tests with Vitest,
Testing Library and jsdom.
- **Deployment:** a Docker Compose stack (the service, Litestream
replication to the NAS, a SearXNG sidecar) behind Traefik, with systemd
units for the firewall, nightly media backup and the automated deploy of
`main`.
The approved dependency list is in [AGENTS.md](AGENTS.md); nothing else is
added without the owner's approval.
> Status: this repository is the Feature 01 scaffold (Go service with
> `/health`, embedded PWA skeleton, Makefile, Dockerfile, CI). The planned
> application is described in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
## Running it locally
@@ -46,15 +28,6 @@ invalid variable.
| `make test` | `gofmt` check, `go vet`, `go test -race`, web typecheck and tests. |
| `make build` | Build the PWA, embed it, build the static binary `bin/mealquest`. |
| `make docker` | Build the container image from the root `Dockerfile`. |
| `make sqlc-check` | Regenerate `internal/db` with sqlc and fail if it drifted. |
## Deploying and operating
[deploy/RUNBOOK.md](deploy/RUNBOOK.md) is the deploy runbook: build, ship and
restart, verifying the deployed version, rollback and the automated deploy.
Database restore, the boot configuration and other host procedures are in
CTXD: project `mealquest`, file `RUNBOOKS.MD`. Only `overseer` releases, by
merging `dev` into `main`.
## Where to read next
+15 -66
View File
@@ -2,8 +2,10 @@
This mirrors the architecture section of `CONTEXT.MD` in the CTXD project
`mealquest`, which is the source of record; if the two disagree, CTXD wins and
this file should be updated. It describes the application as built; nothing
it names is still only planned.
this file should be updated. It describes the **planned** application. The
repository today is the Feature 01 scaffold: `cmd/server`, `internal/config`,
`internal/server` (`/health`), `internal/frontend` (embedded PWA with SPA
fallback), the `web/` skeleton, `Makefile`, `Dockerfile` and CI.
Decision numbers (D-NNN) refer to `DECISIONS.MD` in CTXD.
@@ -44,22 +46,20 @@ headers, so sign-in works whichever peer the request arrives from.
| `cmd/vapidgen` | Prints a new VAPID key pair for Web Push. |
| `internal/config` | Env-only `MEALQUEST_*` config; secrets from `*_FILE`. |
| `internal/server` | HTTP server, router, middleware. |
| `internal/forwarded` | Client IP and scheme from `X-Forwarded-*`, trusted only from `MEALQUEST_TRUSTED_PROXY`. |
| `internal/secureurl` | The transport rule for URLs that carry credentials (`secureurl.Check`). |
| `internal/frontend` | Embedded PWA, SPA fallback. |
| `internal/auth` | Authentik OIDC, sessions, CSRF. |
| `internal/db`, `internal/store` | sqlc-generated queries; SQLite connections, migrations at boot, transactions. |
| `internal/db`, `internal/store` | SQLite connections, sqlc queries. |
| `internal/secretbox` | AES-256-GCM encryption for `_ct` columns. |
| `internal/household`, `internal/dinners`, `internal/recipes` | Domain: household settings and local time, dinners (grounding, photo backfill), recipe search, fetch and grounding. |
| `internal/ai/llm`, `internal/ai/harness`, `internal/ai/skills`, `internal/ai/aisettings` | AI provider adapters, skill harness, skills, AI settings. |
| `internal/suggest`, `internal/plan`, `internal/shopping`, `internal/ideas`, `internal/home` | Feature services. |
| `internal/household`, `internal/dinners`, `internal/recipes` | Domain. |
| `internal/ai/llm`, `internal/ai/harness`, `internal/ai/skills` | AI provider adapters, skill harness, skills. |
| `internal/suggest`, `internal/plan`, `internal/shopping`, `internal/ideas` | Feature services. |
| `internal/gcal`, `internal/notify`, `internal/push`, `internal/chat` | Integrations. |
| `internal/vapid` | VAPID key generation and validation. |
| `internal/jobs`, `internal/scheduler` | Background jobs and schedules. |
| `migrations/` | SQL migrations, embedded and applied at boot by `internal/store` (no goose or golang-migrate); sqlc queries in `migrations/queries/`. |
| `migrations/` | SQL migrations (no goose or golang-migrate). |
| `web/` | React PWA. |
| `deploy/` | Production compose stack, systemd units, the [deploy runbook](../deploy/RUNBOOK.md) and the automated deploy (see Deployment). |
| `docs/` | Documentation (this file). |
| `deploy/` | Deployment files. |
| `docs/` | Documentation. |
| `design/` | Requirements and UI handoff (read-only reference). |
## Backend stack and conventions
@@ -811,20 +811,6 @@ purge are fixed and not configurable.
Runs are recorded in `schedule_runs` and executed through `jobs`.
Job kinds (`internal/jobs`; each registered when `cmd/server` builds the
service named, before the runner starts). `POST /api/v1/jobs` refuses a
service-only kind; `GET /api/v1/jobs/{id}` reports any job.
| Kind | Registered by | Enqueued by | Service-only |
| --- | --- | --- | --- |
| `noop` | `jobs.RegisterBuiltins` | `POST /api/v1/jobs` (does nothing; proves the runner works) | no |
| `ground_dinner` | `dinners.Service` | Adding or renaming a `pending` dinner | no |
| `backfill_dinner_photos` | `dinners.Service` | `POST /api/v1/settings/photo-backfill` | yes |
| `suggestion_batch` | `suggest.Service` | `POST /api/v1/suggestions/batches`, a deck decision (replenish), `suggestions_weekly` | no |
| `draft_week` | `plan.Service` | `POST /api/v1/plans/{weekStart}/draft`, `plan_draft` | yes |
| `title_supply_run` | `shopping.Service` | Generating an untitled Supply run | yes |
| `ideas_from_ingredients`, `quick_ideas` | `ideas.Service` | `POST /api/v1/ideas/from-ingredients`, `POST /api/v1/ideas/quick` | yes |
`internal/scheduler` runs them. A schedule registers a name, a rule read
from the settings (`scheduler.Daily`, `Weekly` or `WeeklyForNextWeek`, or `DailyAt` for a time read from data) and a
run function; settings changes reach it through `SettingsService.Subscribe`
@@ -1333,12 +1319,10 @@ fewer the server answers 400 `invalid_settings` naming
`onboarding_completed` and changes nothing. Step 3 can be reached with
fewer — by its URL, or after another member removes a Regular — so it then
shows the server's reason with an "Add Regulars" button back to step 2.
Notification permission is never asked for on page load. "Turn on
notifications" subscribes this device to Web Push from the tap and says
how it ended — on, blocked by the browser, or unsupported (on iPhone and
iPad, until MealQuest is on the Home Screen) — then offers only "Finish
setting up" (which completes onboarding as above); a dismissed permission
prompt can be asked again. Offline on the
Notification permission is never asked for on page load; until Feature 19
wires Web Push, "Turn on notifications" asks for nothing and says plainly
that notifications are not on yet, offering "Finish setting up" (which
completes onboarding as above) instead of a silent success. Offline on the
saved pages the settings cannot be read (the service worker never caches `/api/v1/settings`),
so the saved pages open as they are.
@@ -1355,41 +1339,6 @@ are undone if the server refuses them. While any Regular is `pending`, the
list is read again every 3 seconds (not while a change is in flight), and
polling stops once none is.
## Deployment
Production is the compose project `mealquest` on 10.60.1.14
([`deploy/compose.yaml`](../deploy/compose.yaml)): the `mealquest` image built
from the root `Dockerfile`, `litestream` replicating the database to the
NAS over SFTP, and `searxng` on the internal network only. Configuration is
`deploy/.env` and file secrets in `deploy/secrets/`, neither committed. The
services never restart themselves; systemd units in `deploy/systemd/` own
the host:
| Unit | Does |
| --- | --- |
| `mealquest-firewall.service` | Restricts port 8090 to Traefik in `DOCKER-USER`; required before the stack starts. |
| `mealquest.service` | Starts and stops the compose stack. |
| `mealquest-media-backup.timer` / `.service` | Backs up cached photos to the NAS nightly at 03:30. |
| `mealquest-auto-deploy.timer` / `.service` | Automated deploy of `main` (below). |
Releases: only `overseer` merges `dev` into `main`. The image carries its
version (`git describe`: a release tag, else the short SHA), which
`/health` reports. A deploy follows
[`deploy/RUNBOOK.md`](../deploy/RUNBOOK.md) — build, pre-deploy restore
point, boot-config check, ship and restart, verify the deployed SHA and a
real screen — with rollback to the previous release. The automated deploy
([`deploy/auto-deploy.sh`](../deploy/auto-deploy.sh), installed as
`/usr/local/sbin/mealquest-auto-deploy`) runs those same steps unattended:
its timer checks every quarter hour (plus up to 5 minutes' random delay),
and deploys `refs/remotes/origin/main` only when it differs from the last
SHA in the deploy record `/home/overseer/mealquest-auto-deploy.log`, its
Gitea CI status is `success`, its last attempt did not fail, and
`mealquest.service` is active. It stops at the first failure and never
retries a failed SHA; `--ref <ref>` is the manual override. Installing,
seeding the record and enabling the timer are host steps in the runbook's
"Automated deploys". Database restore and the boot configuration are in
CTXD `RUNBOOKS.MD`.
## Boundaries and gotchas
- **Secrets never reach the client** — API keys, OAuth tokens and the Chat