dashboard/app
bashynx 4193de4262 Food, sync and warmer updates from 2026-10-26
- Food: "All products" lists what's here first (My foods, the food database, kept
  products), then Open Food Facts; the start of a barcode (4+ digits) finds the
  products starting with it (dashboard, app, server search).
- Food: My foods barcodes; entries follow edits of their food or meal, and meals
  made with a changed food are worked out again (nested meals too); a save that
  changes nothing isn't written.
- Food: the week strip shows protein / carbs / fat per day, over-target calories
  in red; the header's arrows go by week, days swap in place with prefetch on
  hover; the app's arrows go by week, a sideways swipe by day.
- Food search: stomach / žalúdok / pipotă find gizzards, kurací / pui chicken,
  morčací / curcan turkey.
- Sync: tables a plugin makes after start-up are prepared at the next sync and
  their file read from the start once.
- Warmers build pages as each admin account and wait while someone is using
  the dashboard; slow page builds are logged.
- Stations: impossible sensor readings are dropped; chart ticks never fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:45:32 +02:00
..
android dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
assets dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
lib Food, sync and warmer updates from 2026-10-26 2026-10-26 15:45:32 +02:00
packages/gb_export dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
test Food, sync and warmer updates from 2026-10-26 2026-10-26 15:45:32 +02:00
tool dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
.gitignore dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
.metadata dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
analysis_options.yaml dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
CHANGELOG.md Food, sync and warmer updates from 2026-10-26 2026-10-26 15:45:32 +02:00
pubspec.lock dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00
pubspec.yaml Food, sync and warmer updates from 2026-10-26 2026-10-26 15:45:32 +02:00
README.md dashPi: a self-hosted home dashboard, its sync server and phone app 2026-10-24 09:56:19 +02:00

The phone app

The dashboard's companion for Android (Flutter). It keeps its own copy of your data, works offline, and syncs end-to-end encrypted through your sync server with the dashboard and your other devices.

  • Health:
    • Body measurements, BMI and body fat by several formulas.
    • Sleep, heart rate and workouts as the dashboard works them out.
    • The cycle tracker.
  • Food: a diary with the bundled food database, a barcode scanner, and the server's product archive.
  • Work: book time in a week view by dragging.
  • Notes: Markdown, folders, tags, checklists.
  • Weather: your places, the dashboard's places and where you are.
  • Band relay: reads Gadgetbridge's database export on the phone and sends the band's new data to the dashboard. No Syncthing needed.
  • Updates itself from your server (optional).
Health Sleep Body Cycle
Health overview Sleep Body Cycle
Food Work Notes Weather
Food diary Work week Notes Weather

The pictures come from the demo dashboard's made-up data on an emulator: docs/screenshots/app.py.

Build and connect

cd app
flutter pub get
flutter test
flutter build apk --release        # → build/app/outputs/flutter-apk/app-release.apk

You need Flutter 3.44 (Dart 3.12+) and the Android SDK. Sign it with your own key, or your next build can't update it. Then on the dashboard go to Settings ▸ General ▸ Devices ▸ Add a device, and in the app tap Scan the code from the dashboard and type the passphrase.

Signing, optional built-in defaults (DEV_SERVER, PI_URL, HOME_PLACES), the band relay and publishing updates: ../docs/app.md. What changed in each build: CHANGELOG.md.

Layout

lib/main.dart            start, the connect screen
lib/app/                 the shell (tabs), background sync, the updater, location, the code scanner
lib/sync/                the sync: store.dart (the local copy + merge), client.dart, crypto.dart, the kick, the band relay
lib/health/ work/ notes/ weather/   the sections
packages/gb_export/      a small Android plugin: Gadgetbridge's export, the phone's time zone (works in the background too)
assets/foods.db          the food database (also the dashboard's starting one)
tool/publish.sh          build + upload an update (tool/publish.env)

The sync format is the dashboard's (../server/PROTOCOL.md); both sides merge the same way, last writer wins per row.