Food Coach is a fully client-side nutrition, journaling, and daily-health tracking app with lightweight AI assistance. It runs entirely in the browser, stores data in IndexedDB, and sends model calls straight to OpenAI using the user’s own API key—no accounts or servers required.
Most food trackers only tally calories. Food Coach tries to explain trends in weight, bloating, energy, and habits by examining the past two weeks of logs. Each night at 22:00 the app creates a structured “insight” that highlights contributing factors, suggests next steps, and records caveats. Everything stays on-device except outbound LLM calls, and those are authenticated with the user’s key.
- Accepts natural-language meal descriptions.
- Calls an LLM for an initial calorie estimate that the user can confirm or edit.
- Saves the confirmed value alongside any free-form notes.
- Reviews recent sleep, stress, weight, meals, and notes.
- Generates explanations for weight changes or bloating, pattern summaries, and recommended actions.
- Stores insights in IndexedDB for later review.
- Lists meals, symptoms, and biometrics with timestamps.
- Allows expanding entries for detailed notes.
- Indicates whether a given day already has an insight.
- Shows every stored insight in chronological order.
- Supports re-running the daily insight for a past date.
- Includes a placeholder for custom time-range analysis.
- Saves the OpenAI API key locally and includes it in Drive/file backups.
- Exports all data (logs, insights, jobs) as JSON.
- Provides manual Google Drive backup/restore using
VITE_GOOGLE_CLIENT_ID(default130912411880-u34hui50kge8g4kjvc7m88slfsoutrj5.apps.googleusercontent.com). - Offers a “danger zone” action to clear local data.
- Dexie/IndexedDB persistence keeps data entirely in the browser.
- The PWA shell works offline aside from outbound AI calls.
- Static build is suitable for GitHub Pages hosting or bundling into an Android APK.
- React 18
- Vite
- TypeScript
- Tailwind CSS
- React Router
- Dexie / IndexedDB
vite-plugin-pwa
- Uses OpenAI
gpt-4.1-miniby default. - Requests originate directly from the browser.
- The user’s API key is stored in
localStorage.
dailyLogsdailyInsightsanalysisJobs
npm install
npm run devLocal dev server: http://localhost:5173/food-coach/. Add your OpenAI key in Settings before running analyses.
npm run build- In GitHub → Settings → Pages, set Build and deployment to GitHub Actions.
- Push to
main(or manually trigger the “Deploy to GitHub Pages” workflow)..github/workflows/deploy.ymlinstalls dependencies, runs the Vite build, uploadsdist/, and publishes to Pages. - GitHub serves the site from
https://<username>.github.io/food-coach/via the generatedgh-pagesbranch.
Need a one-off manual deployment instead? npm run deploy still pushes the local dist/ folder to gh-pages through the gh-pages CLI.
Prerequisites: Android SDK + Java 17, android/local.properties pointing to the SDK, and npx cap add android executed once.
# build with the Capacitor-friendly base path
npm run build:android
npx cap sync android
cd android && GRADLE_USER_HOME=../.gradle ./gradlew assembleDebug
# install on a connected device
adb install -r app/build/outputs/apk/debug/app-debug.apkOpen Android Studio with npx cap open android if you prefer the IDE. For releases, create a signed assembleRelease build with your keystore.
- Weekly/monthly analysis views are not implemented.
- Custom analysis still uses a placeholder.
- Google Drive sync is manual and unscheduled.
Food Coach aims to be local-first, privacy-respecting, actionable, and personalized. It is intentionally client-only so users keep control over their data while still benefiting from helpful explanations of their daily habits.