Skip to content
chilldanilPublic

About

iOS nutrition, workout, and body tracker built with SwiftUI, SwiftData, HealthKit, and Live Activities.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

NutriSnap — SwiftUI Macro Rings, Dynamic Island Live Activity & Tracking

License: MIT

Native SwiftUI iOS app for tracking daily nutrition, workouts, and body measurements — with Claude AI food/label recognition, OpenFoodFacts barcode scanning, Apple HealthKit sync, and Dynamic Island Live Activities.

Features

  • Meal logging (4 input paths)
    • Photo recognition: snap a meal to identify the food and estimate portion weight via Claude vision (AIService).
    • Nutrition label OCR: photograph package labels in English or German (Eiweiß/Fett/Kohlenhydrate), auto-normalising kJ → kcal and per-serving → per-100g.
    • Free-text parsing: enter descriptions like "3 eggs, 2 tomatoes, splash of olive oil" to split into macro-scored items.
    • Barcode & search: camera barcode scanner backed by OpenFoodFacts (3M+ EU/DE products), Edamam search, and a Saved Products library.
  • Daily dashboard: calorie ring, tap-to-inspect Protein / Fat / Carbs macro rings with per-food breakdown sheets, Apple Watch TDEE energy balance, and hydration tracking.
  • Gym & body tracking: active workout timer, sets/reps/weights with formatted clipboard export, body measurements (weight, body fat %, chest/waist/hips/neck/bicep/thigh), and weekly history charts.
  • Apple ecosystem:
    • ActivityKit Dynamic Island & Lock Screen Live Activity showing live calories, macros, and water.
    • WidgetKit Home Screen widgets sharing the SwiftData store via App Groups.
    • AppIntents Siri Shortcuts ("Log food in NutriSnap").
    • Bidirectional HealthKit sync (writes nutrition, water, weight, body fat; reads active + basal calories burned).
  • Cloud sync: optional multi-user persistence with Supabase (profiles, daily_logs, saved_products, body_measurements, gym_sessions).

Project Structure

NutriSnap/                  Main SwiftUI app (Views, ViewModels, Services, AppIntents)
NutriSnapShared/            Shared SwiftData models, NutritionCalculator, ActivityAttributes
NutriSnapWidget/            WidgetKit + Dynamic Island Live Activity extension
Config.swift.example        API keys template (copy to NutriSnap/Config.swift)

Setup

Requires macOS with Xcode.

git clone https://github.com/chilldanil/NutriSnap.git
cd NutriSnap
cp Config.swift.example NutriSnap/Config.swift
open NutriSnap.xcodeproj
  1. Fill in your Claude, Edamam, and Supabase keys in NutriSnap/Config.swift (gitignored). Barcode scanning via OpenFoodFacts and local SwiftData tracking work without API keys.
  2. Select your Development Team under Signing & Capabilities for NutriSnap and NutriSnapWidget (and update the App Group identifier if needed).
  3. Build and run (⌘R) on Simulator or device.

License

MIT

About

iOS nutrition, workout, and body tracker built with SwiftUI, SwiftData, HealthKit, and Live Activities.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages