Frigo Adaptatif

Cook what you already have, throw less away, decide without thinking about it — running in production at fridge.jjoly.eu

GoSQLitePWA Web PushGDPRTOTP 2FA optional AI

the problem

Households throw away a substantial share of what they buy, simply because they don't know what is sitting at the back of the fridge or what expires next. Recipe apps suggest dishes you cannot actually make with what you have, ignore use-by dates, and expect everything to be typed in by hand without ever learning from habits.

the solution

A self-hosted kitchen assistant that starts from the real contents of the fridge and reasons about them: what to cook today, what to buy, what to rescue before it spoils. All the decision logic runs locally, with no AI; AI is an optional, clearly signposted bonus.

the stance: science in the background, never on screen

Every suggestion carries a why — never a generic tip. Plan generation never goes through a language model: it is a deterministic scoring engine (ingredient coverage, waste avoidance, habits, variety, recency) that stays explainable and reproducible. When AI is enabled, it only handles isolated creative tasks (emptying the fridge, substituting an ingredient, step-by-step cooking guidance, reading a photo), and its failure is handled cleanly — never blocking the app, never leaking a technical detail.

technical choices

a problem worth telling

SQLite in a single file means a single writer. That constraint propagates all the way up: one connection, one replica, and a Recreate deployment strategy — so a few seconds of downtime on every update. The obvious fix would have corrupted the database. The full diagnosis, including the hour I spent on the wrong lead, is written up in this note (in French).

in production

deployment   k3s + Flux CD (GitOps) — see the infrastructure case study
pipeline     push to main → tests → build → Trivy scan → GHCR → staging
             tag vX.Y.Z → production (rollback = git revert)
data         one SQLite database per household, encrypted backups, WAL
status       V3 deployed — freezer zones, recipe import, leftovers as
             first-class inventory, real spending, precision nutrition,
             predictive shopping, menu optimiser, PDF reports, event mode

The version actually running is shown, and dated, on the home page.