Skip to content

Latest commit

 

History

History
142 lines (110 loc) · 7.46 KB

File metadata and controls

142 lines (110 loc) · 7.46 KB

Dietinator

CI Android APK TypeScript Expo SDK 57 License: MIT

Dietinator is a local-first calorie tracker. Diary entries live in SQLite on your device. Food search and optional sync use the unofficial YAZIO API. You need no account. The diary works offline.

Live Demo - Try in browser

No install, no account. Tap Explore the demo on the login screen.

Download

Android. Install the latest signed APK:

Download Dietinator for Android

Every v* tag builds a signed APK via .github/workflows/release.yml. On first install, allow Install unknown apps for your browser. Updates keep your local SQLite data. The app checks GitHub releases on start and shows an update prompt in Settings.

Preview

Daily dashboard, Stats and trends, AI assistant

Daily dashboard with calorie ring, macro progress, meal breakdown and water tracking    Consistency streaks, weight trends with BMI and goal progress, calorie history, and macro split    AI assistant with on-device tools and one-tap presets

Food search and favorites, Food and portion details, Meal builder

Food search with category icons, recents, and one-tap favorites    Serving sizes, amount steppers and live daily budget impact    Compose reusable meals with amount steppers and nutrition facts

Meal slot tracking and Goals and settings

Meal slot budget overview and logged entries with quick edit    Daily goals and nutrition settings with quick-adjust steppers

Features

  • Local-first diary. The app writes to diary_entries in expo-sqlite with WAL. The diary works fully offline. The food cache keeps past searches.
  • Dashboard. The dashboard shows a calorie ring, macro bars, and meal sections. It supports water and weight quick-add, copy of the previous day, and pull to refresh from YAZIO when you are online.
  • Food search. The search debounces YAZIO lookups. It shows category icons, favorites, and recents. It remembers serving sizes and amounts. Steppers support hold repeat. You see live budget impact before you save.
  • Meals. The builder stores reusable combos with auto nutrition math. Quick Add stores direct kcal and macros. Each meal has a budget and inline entry edit.
  • Barcode. The camera scans EAN and UPC on device with cache lookup. The scan is limited on web.
  • Weight and water. You log water with presets. You track weight with BMI and trend charts.
  • Micronutrients. The dashboard and food detail show fiber, sugar, saturated fat, sodium, potassium, calcium, and iron.
  • AI assistant. Turn it on in Settings. It supports OpenAI, OpenRouter, Ollama, and any OpenAI-compatible endpoint. It streams answers. It runs tools against your local SQLite. It asks before destructive writes. It keeps history in SQLite. Read Dietinator architecture for the MCP endpoint at /mcp.
  • Backup and export. Export JSON or CSV. Back up and restore the full SQLite file. You start every export and restore.
  • Demo mode. /?demo=1 loads sample data. You need no account. Themes follow the system, or you pick light or dark manually.

Tech stack

Area Choice
Runtime Node 22, see .nvmrc, packageManager is pnpm@11.22.0
Framework Expo SDK 57, React 19.2, React Native 0.86, expo-router in app/
DB expo-sqlite WAL, migrations in src/db/database.ts
UI gluestack-ui v3 and NativeWind v4, global.css
Sync yazio npm client, withRetry on 5xx and 429, offline-first
Tests Jest and jest-expo, Playwright on the web build

Get started

nvm use            # 22, see .nvmrc
pnpm install
pnpm start         # Metro on port 9082, scan QR with Expo Go
pnpm run web       # or run in the browser

The start script uses port 9082. Port 9082 avoids Windows Hyper-V collisions on 8081. To use another port, run pnpm start -- --port 9090.

Other commands:

pnpm run typecheck
pnpm run lint
pnpm run format:check
pnpm test
pnpm run test:e2e  # builds dist/ and runs Playwright at phone size
pnpm run build:web # writes dist/

More

Note. Dietinator uses an unofficial, reverse-engineered YAZIO API. Use Dietinator for yourself only. The API can change without notice. The local-first design keeps the diary and cache working when the API changes.