A comprehensive iOS calorie and nutrition tracking app with AI-powered features, HealthKit integration, and beautiful Liquid Glass UI design.
Made by mpcode
- Daily Calorie Dashboard — Animated progress ring showing daily intake vs goal
- Comprehensive Macro Tracking — Protein, carbohydrates, fat, sugar, fibre, and salt
- Omega-3 Tracking — EPA and DHA tracking with AI detection for fish/seafood
- Calorie History Graph — Interactive chart showing progress over the last 14 days
- Calendar History — Calendar view with colour-coded calorie bars per day
- Supplement Tracking — Track daily vitamins, minerals, and supplement pills
- Multi-AI Provider Support — Choose between Claude (Anthropic), Gemini (Google), or ChatGPT (OpenAI)
- AI Subscription — Optional subscription for AI features via proxy server, or bring your own API key
- AI Nutrition Label Scanning — Photograph any nutrition label and AI extracts all values
- Natural Language Food Input — Type "I had a large pizza" and AI estimates full nutrition
- AI Vitamin & Mineral Analysis — Estimated vitamin/mineral intake from your daily foods
- AI Food Templates — Save AI-generated foods for quick re-logging
- One-Tap Logging — Tap the + button on any product or supplement to instantly log it
- Swipe to Log — Swipe right on any item to add it to today's log
- Dashboard Supplement Picker — Quick-add supplements directly from the Today view
- Barcode Scanning — Add products using AVFoundation barcode recognition
- Image Cropping — Crop nutrition label photos for better AI accuracy
- Manual Entry — Full manual product entry with all nutrition fields
- Quick Add — Add recent products and AI foods with one tap
- Apple HealthKit — Sync with Apple Health for steps and active calories
- Health Auto-Fill — Import height, weight, date of birth, and gender from Apple Health
- Activity-Adjusted Goals — Daily calorie target increases based on activity
- Automatic Data Refresh — HealthKit data syncs on app launch
- iCloud Sync — Automatic CloudKit sync across all your Apple devices
- Full Backup Export — Export all data including products, logs, supplements, and photos to JSON
- Backup Import — Restore data from backup with intelligent duplicate detection
- Product & Supplement Photos — Front and nutrition label photos with fullscreen zoom
- Liquid Glass UI — iOS 26 glass effect design with separated toolbar buttons
- Swipeable Dashboard — Three pages: calories, vitamins & minerals, history graph
- Animated Backgrounds — Dynamic gradient backgrounds throughout
- TipKit Tutorials — Native iOS tooltips for first-time user guidance
- Dark Mode — Full dark mode support
- Personalised Targets — Set your own calorie and macro goals
- BMR Calculator — Calculate recommended calories using Mifflin-St Jeor equation
- User Profile — Store age, gender, height, weight for accurate calculations
- Metric/Imperial Units — Choose your preferred measurement system
- mpcode Branding — Dynamic version display with branded About section
| Screen | Description |
|---|---|
| Dashboard | Main calorie ring with daily progress and macros breakdown |
| Vitamins | AI-analysed vitamins & minerals from your daily food intake |
| History | Interactive 14-day calorie history chart with calendar bars |
| Add Food | AI quick add, recent products, barcode scanning, and food search |
| Products | Saved products database with quick-add and sort options |
| Settings | Profile, daily targets, HealthKit, AI configuration, and mpcode branding |
- iOS 26.0+ (Liquid Glass UI)
- Xcode 26.0+
- iPhone 11 or later (A13 Bionic chip minimum)
- AI API Key (optional — subscription or bring your own from Claude, Gemini, or OpenAI)
git clone https://github.com/mp-c0de/CalorieTracker.git
cd CalorieTrackerFile → Open → Select CalorieTracker.xcodeproj
- Select your development team in Signing & Capabilities
- Ensure the following capabilities are enabled:
- HealthKit
- Camera
- iCloud (with CloudKit)
- Push Notifications
- Background Modes (Remote notifications)
Choose at least one AI provider, or use the in-app subscription:
| Provider | Get API Key | Cost |
|---|---|---|
| Claude | console.anthropic.com | Pay-as-you-go |
| Gemini | aistudio.google.com | Free tier available |
| OpenAI | platform.openai.com | Pay-as-you-go |
- Connect your iPhone
- Press
Cmd + Rto build and run
- Go to Settings (gear icon on Dashboard)
- Tap AI Features to add your API key or subscribe
- Optionally connect Apple Health
CalorieTracker/
├── CalorieTrackerApp.swift # App entry point with SwiftData container
├── CalorieTracker.entitlements # HealthKit permissions
│
├── Models/
│ ├── Product.swift # Product with full nutrition data
│ ├── FoodEntry.swift # Individual food consumption entries
│ ├── DailyLog.swift # Daily tracking with AI vitamin data
│ ├── AIFoodTemplate.swift # Persistent AI food templates
│ ├── AILogEntry.swift # AI estimation log entries
│ ├── Supplement.swift # Supplement/vitamin pill model
│ ├── SupplementEntry.swift # Daily supplement intake entries
│ └── NutrientDefinitions.swift # Centralised vitamin/mineral definitions
│
├── Services/
│ ├── AIServiceProtocol.swift # Unified AI service protocol
│ ├── ClaudeAPIService.swift # Anthropic Claude integration
│ ├── GeminiAPIService.swift # Google Gemini integration
│ ├── OpenAIService.swift # OpenAI ChatGPT integration
│ ├── ProxyAIService.swift # Proxy AI service for subscriptions
│ ├── SubscriptionManager.swift # StoreKit 2 subscription management
│ ├── HealthKitManager.swift # Apple Health integration
│ ├── BarcodeScannerService.swift # AVFoundation barcode scanning
│ ├── DataBackupManager.swift # Export/import backup functionality
│ └── SelectedDateManager.swift # Shared date state for navigation
│
├── Views/
│ ├── ContentView.swift # Main tab navigation
│ ├── DashboardView.swift # Swipeable dashboard (ring, vitamins, history)
│ ├── AddFoodView.swift # Food entry with AI input & quick add
│ ├── AddProductToLogSheet.swift # Log product with amount selection
│ ├── HistoryView.swift # Calendar-based history browser
│ ├── AILogView.swift # AI estimation log view
│ ├── AISettingsView.swift # AI provider configuration
│ ├── BarcodeScannerView.swift # Camera barcode scanner
│ ├── NutritionCameraView.swift # Nutrition label camera
│ ├── ImageCropperView.swift # Photo cropping tool
│ ├── ManualEntryView.swift # Manual product entry form
│ ├── ProductListView.swift # Products list with quick-add & sort
│ ├── ManualProductsView.swift # Manual products with quick-add & sort
│ ├── SupplementListView.swift # Supplements list with quick-add & sort
│ ├── AddSupplementView.swift # Add new supplements with presets
│ ├── SubscriptionPaywallView.swift # AI subscription paywall
│ └── SettingsView.swift # App settings, profile, mpcode branding
│
└── Utils/
├── AppBackground.swift # Animated gradient backgrounds
└── TipJarManager.swift # Tip jar / donations management
| Technology | Purpose |
|---|---|
| SwiftUI 6.0 | Modern declarative UI with Liquid Glass effects |
| SwiftData | Native Swift persistence framework |
| StoreKit 2 | In-app subscriptions and tip jar |
| Swift Charts | Interactive calorie history graphs |
| AVFoundation | Camera and barcode scanning |
| HealthKit | Apple Health integration |
| CloudKit | iCloud sync across devices |
| TipKit | Native tooltip tutorials |
| Claude API | AI nutrition parsing (Anthropic) |
| Gemini API | AI nutrition parsing (Google) |
| OpenAI API | AI nutrition parsing (ChatGPT) |
The app uses these reference values:
| Nutrient | Male | Female | Unit |
|---|---|---|---|
| Calories | Calculated via BMR | Calculated via BMR | kcal |
| Protein | 56 | 46 | g |
| Carbohydrates | 300 | 225 | g |
| Fat | 78 | 65 | g |
| Sugar (max) | 36 | 25 | g |
| Fibre | 38 | 25 | g |
| Salt (max) | 6 | 6 | g |
| Nutrient | Daily Target | Upper Limit | Notes |
|---|---|---|---|
| EPA | 500 mg | 3000 mg | Essential omega-3 from fatty fish |
| DHA | 500 mg | 3000 mg | Essential omega-3 from fatty fish |
| Combined | 1000 mg | 6000 mg | Optimal for cardiovascular health |
Vitamin and mineral targets follow NHS/EU reference intakes.
- Camera: Required for barcode and nutrition label scanning
- HealthKit: Optional — for steps, active calories, and profile data (read-only)
- iCloud: Optional — automatic sync via CloudKit for backup across devices
- API Keys: Stored locally in UserDefaults on your device
- Data Storage: All nutrition data stored locally using SwiftData (with optional iCloud sync)
- Network: Only AI API calls and iCloud sync (if enabled)
- No Analytics: No tracking or analytics are collected
Full privacy policy: mpcode.dev/privacy/nutritrack-ai.html
Copyright (c) 2024-2026 mpcode. All Rights Reserved.
This software is proprietary and confidential. Unauthorised copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without express written permission from the copyright holder.
For licensing enquiries, contact: mpcode@mpcode.dev
mpcode
- Website: www.mpcode.dev
- Email: mpcode@mpcode.dev
- GitHub: @mp-c0de
- LinkedIn: mpc0de
- Quick Add Everywhere — Tap + on any product or supplement to instantly log to today
- Swipe to Log — Swipe right on any list item for quick logging
- Supplement Backup — Full supplement export/import in data backup (v2 format)
- Liquid Glass Toolbars — Separated toolbar buttons with ToolbarSpacer across all views
- Sort Supplements — Sort by name or latest added
- Toolbar Actions — Products opens barcode scanner, Manual opens entry form directly
- Empty State Guides — Action buttons on all empty list views
- Dashboard Quick-Add — Supplement picker sheet on the Today view
- AI Subscription — Optional subscription for AI features with StoreKit 2
- Privacy & Terms — Links in subscription paywall for App Store compliance
- Animated Settings — Rotating orange gear icon on Dashboard
- mpcode Branding — Branded About section with dynamic version
- Apple Health Auto-Fill — Import height, weight, date of birth, and gender from Health
- Calendar Calorie Bars — Colour-coded bars on each calendar day
- Supplement Photos — Front and nutrition label photos with fullscreen viewer
- Omega-3 Editing — EPA and DHA fully visible and editable in supplement details
- Smarter AI — Updated to Gemini 2.5 Flash for faster analysis
- Critical Bug Fix — DailyLog deduplication for iCloud sync ghost logs
- Stability — Consistent data handling, API timeouts, and reliability fixes
- Initial App Store release
- Multi-AI provider support (Claude, Gemini, OpenAI)
- HealthKit integration with activity-adjusted goals
- Swipeable dashboard with calories, vitamins, and history
- Comprehensive macro tracking with salt/sodium conversion
- AI vitamin and mineral analysis
- Barcode scanning and nutrition label scanning
- Supplement and vitamin pill tracking
- iCloud sync via CloudKit
- Manual backup export/import
- Liquid Glass UI design for iOS 26
- Calendar-based history view
- AI food templates for quick re-logging
- TipKit tutorial system