Jailson Brito
← Home

AppPetit

A neutral meal planner that keeps everything on your device.

A meal planner and optional food diary built around Canada's Food Guide plate and Health Canada's nutrient data — in the browser, offline, with no account and no server holding your meals.

The problem

Most food-tracking tools ask for an account, keep the diary on someone else’s server, and frame eating as a target: calories left, streaks, numbers that turn red. For someone who has followed a dietitian’s plan, dropped it, and kept the proportions that worked, that is the wrong shape. What they want is closer to a spreadsheet that does its own arithmetic: plan a meal, see a few nutrients, try swapping one food for another, and look back over time, without being judged for it.

AppPetit is that, as a web app that works offline and never sends a meal anywhere.

AppPetit's diary for one day: breakfast, lunch and dinner, with the sodium, fibre and sugars the person chose to watch shown for the day and for each mealAppPetit's diary for one day: breakfast, lunch and dinner, with the sodium, fibre and sugars the person chose to watch shown for the day and for each meal

Approach and methodology

Seven product rules were written down before the first screen, and they are what the app is actually made of:

  1. No user data leaves the device. No accounts, no backend, no analytics, no remote error reporting. Anything that touches the network is opt-in and sends the minimum.
  2. Works fully offline. The food database is bundled and the service worker precaches everything.
  3. Neutral language and UI. No “goal”, “exceeded” or “failed”, no streaks, no red or green judging a value.
  4. No health claims. Nothing about diseases, treatment or results.
  5. Every reference number comes from Health Canada, and the person can override it. If a source value is missing, the answer is to stop and ask, not to invent one.
  6. Weight is opt-in and hidden by default, with no target weight.
  7. The energy reference is per day. Meals are free-form, and nothing is ever called skipped or missed.

The third rule is the one that shows in the code. The only reds in the app are the logo’s three hues and a slightly darker accent for chrome such as buttons; neither may ever colour a value, a total or a state. A nutrient the source data has no figure for is stored as null and shown as unknown, never as zero, because a zero would be a claim.

The build process is documented in the repo and worth stating plainly: AppPetit is written by AI agents working under a rulebook (CLAUDE.md), one ticket per pull request, with screens approved by the owner from a clickable prototype before they are built. The framework and layering choices are written up as decision records in the repo.

Architecture

It is a static progressive web app: Vite, TypeScript in strict mode and Svelte 5, with no server code in the repository. Three layers keep the rules out of the framework:

  • src/domain holds pure functions only: nutrient arithmetic, unit conversion, the plate shares, the swap simulator, recipe maths. It imports no framework, no database and no DOM.
  • src/app holds one view model per screen, in plain TypeScript, with a small store of its own (a few dozen lines) that both Svelte and React can read.
  • src/ui renders view models and forwards taps to their actions.

That layering is a recorded decision, not an accident: it keeps the choice of framework cheap to reverse and keeps the door open to a native app later.

The food data is Health Canada’s Canadian Nutrient File, turned by a build script from the published CSV files into one bundled JSON file: 5,894 generic foods with English and French names and values per 100 g. A logged food stores its computed grams at log time, so editing anything later never rewrites a past entry.

Everything the person creates lives in IndexedDB through Dexie, with versioned migrations. A backup is a .zip file that carries a schema version, so an older file is migrated on import by a chain of functions rather than rejected. The diary exports to CSV, and to PDF through the browser’s own print view instead of a PDF library. The interface follows three layouts, for phone, tablet and desktop widths.

Hosting is static files on a shared host. A merge to main builds a tagged release, uploads it to its own folder, swaps a current symlink atomically, and fails the deploy unless the public /version.json reports the version just built. Rolling back re-points the symlink; nothing is rebuilt.

Results

What’s real: a beta at web.apppetit.com, installable, working offline, in French and English, with 5,894 foods bundled and nothing sent to a server. A day can be planned on the Food Guide plate, logged with photos, compared food by food, and exported as a file.

What there is no number for: usage. By rule one there is no analytics, so the app cannot say how many people use it, and this page will not guess.

Limitations

  • The data lives in one browser. Clearing the site’s data erases it, and a backup is a file the person has to save themselves; the app shows a reminder but cannot do it for them. As the product spec notes, on iOS an installed web app’s storage is separate from Safari’s.
  • Estimates, from generic foods. The nutrient file describes generic foods, not the product in the cupboard. A food entered from its own label is the fix, and it is the person’s own transcription.
  • Canadian and adult by construction. The daily values are Health Canada’s table for adults, and the Food Guide plate is the Canadian one.
  • Neutral is a choice with a cost. There are no targets, so someone who wants a number to aim at will not find one here. That is the point of the app, and it will not suit everyone.
  • Optional sync sends everything. If turned on, the whole app file, photos included, goes to a WebDAV folder the person chose. The credentials stay on the device and are not part of a backup, but the server on the other end is theirs to trust.
  • Reading photos is experimental. A separate page can read scale displays and Nutrition Facts tables on the device. It downloads a model of a few hundred megabytes from third-party hosts, only after an explicit tap, and it is not part of the normal screens.
  • It is a beta. Every release is still a 0.0.x.

Work in progress

A native app is planned but not scheduled. The main reason would be reading weight directly from the phone’s health store on the device, which a web page cannot do. The layering above exists so that move would rewrite the screens and little else.

Reading scale and label photos on the device is being measured as a spike, not built as a feature: the open question is whether a model small enough to run on a phone is accurate and fast enough to be worth shipping.