Commit Graph

16 Commits

Author SHA1 Message Date
Henrik Jess Nielsen
65a99d2138 feat(offers): live Lübeck offer prices with pick-to-list and deal matching
Fetch CITTI Lübeck offers from the Tjek API (German dealer 3czmZx only —
never the Danish Flensburg booklet) and surface them in the app.

- New offers + offer_meta tables; defensive hotspots parser; upsert by
  offer id, prune per re-fetched catalog while preserving picked rows
- Daily in-process refresh scheduler (data.db lives on the app's own
  Nomad alloc disk, so a separate periodic job can't share it) plus a
  manual POST /api/offers/refresh and an "Opdater" button
- /tilbud page: browse all offers by catalog, search, EUR + DKK, and tick
  offers onto the shopping list; picks appear in a Lübeck-tilbud section
  on the main list and check off as bought via the existing /api/price
- Match the fixed catalog items against current offers and show a
  "på tilbud" badge with the matched offer name (conservative word-
  boundary token match, >=2 tokens for multi-word names)
- Dockerfile: add ca-certificates for urllib HTTPS to the Tjek API
2026-10-30 10:35:43 +01:00
Henrik Jess Nielsen
cf999ae228 feat(trips): archive current list and start a fresh one
Add a "Arkivér & ny liste" button that snapshots the current trip
(checked items, prices, quantities, extras and custom categories)
into a new trips table, then clears the mutable state so the list
resets to the fresh catalog.

- New trips table in init_db() storing a self-contained JSON snapshot
  plus computed totals and item count
- POST /api/archive with a no-op guard against archiving an empty list
- /historik list view and /historik/<id> read-only detail view
- Photo files are kept so archived trips can still show them
2026-10-30 10:15:27 +01:00
Henrik Jess Nielsen
7e5ef3c4b5 fix(mobile): allow pinch-to-zoom by removing maximum-scale restriction
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 40s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:37:05 +02:00
Henrik Jess Nielsen
1570b6eceb feat(items): add German product names for in-store navigation
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 47s
Each item now shows the German name (de field) below the Danish name
so it's easier to find products on shelves in Citti Flensburg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:33:25 +02:00
Henrik Jess Nielsen
ba936424af fix(deploy): use SHA image tag instead of latest in Nomad
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 42s
Avoids stale image cache issues where Nomad re-uses the old :latest
layer. SHA is injected via nomad -var flag at deploy time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:27:57 +02:00
Henrik Jess Nielsen
7709580cef fix(qty): make quantity input visibly editable with border and tap target
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 26s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:25:05 +02:00
Henrik Jess Nielsen
6ce940759c feat(shopping): editable quantity field per item
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 26s
Each item row now has an editable qty input showing the planned amount
(e.g. "6 × ½ kg"). Changes are auto-saved via debounce to the prices
table and highlighted in accent color when modified from the default.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:18:04 +02:00
Henrik Jess Nielsen
17f39c9503 Switch to ephemeral_disk, no host_volume required
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 40s
sticky+migrate keeps data across restarts and job updates.
DATA_DIR points to NOMAD_ALLOC_DIR/data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:09:44 +02:00
Henrik Jess Nielsen
ff01f4e120 Move Nomad placement to int node (auto-creates volumes)
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:08:04 +02:00
Henrik Jess Nielsen
e92bdaf44d Add autobox constraint to Nomad job
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:07:31 +02:00
Henrik Jess Nielsen
d7ab8e02a1 Fix Dockerfile static copy, dynamic port, health endpoint
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
- Remove COPY static/ (runtime uploads live in DATA_DIR/uploads)
- Add /health endpoint
- Read PORT from env (NOMAD_PORT_http in production, 9756 local)
- citti.nomad: dynamic port, canary deploy, Consul/Traefik, health check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:04:29 +02:00
Henrik Jess Nielsen
77eed9aa50 Fix workflow: use debian-host runner and registry.i80.dk
Some checks failed
Build and Deploy citti / build-and-deploy (push) Failing after 5s
Match BlaaAi deployment pattern: debian-host runner, Harbor registry,
nomad CLI directly, NOMAD_ADDR=https://nomad.i80.dk:4646.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:00:04 +02:00
Henrik Jess Nielsen
2edb1b4cca Fix deploy workflow: remove top-level env block
Some checks failed
deploy / deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 00:57:39 +02:00
Henrik Jess Nielsen
e23e9e284b Nomad changes
Some checks failed
deploy / deploy (push) Has been cancelled
2026-06-06 00:55:31 +02:00
Henrik Jess Nielsen
1a3476c4d3 Add Flask shopping app with Nomad deployment
Some checks failed
deploy / deploy (push) Has been cancelled
Flask app serving the Citti shopping list with SQLite persistence,
per-category item addition, dynamic custom categories, photo upload,
and a post-trip price analysis page.

- Port 9756, DATA_DIR env var for persistent volume in Nomad
- Gitea Actions pipeline builds Docker image and deploys via Nomad API
- Makefile targets: run, install, build, push

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 00:54:07 +02:00
Henrik Jess Nielsen
9ef85c327f first commit 2026-06-06 00:28:17 +02:00