GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - hardy-ayp/kalore: ๐Ÿ Premium Apple-grade AI Calorie & Macro Tracker with Activity Rings, Computer Vision & Offline-First Heuristics

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
kalore
kalore
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
env.json.example
env.json.example
 
 

Repository files navigation

Kalore ๐Ÿ

Premium Apple-Grade AI Calorie & Macro Tracker for Athletes & Fitness Enthusiasts

Flutter Dart License: MIT Version Tests


๐Ÿ“– Overview

Kalore is a high-performance, privacy-first calorie and macronutrient tracking application built with Flutter. Inspired by Apple Fitness and iOS design principles, Kalore combines fluid gestures, true-black OLED aesthetics, and a multi-tiered nutritional intelligence pipeline to make daily nutrition tracking effortless and accurate.

Whether you are an athlete executing an aggressive cut, preparing for a competition, or simply maintaining a healthy lifestyle, Kalore gives you medical-grade precision calculations (Mifflin-St Jeor + dynamic surplus/deficit models) paired with computer vision food analysis.


โœจ Key Features

1. ๐ŸŽ Apple Fitness-Grade UI & Motion

  • Concentric Activity Rings: Visual progress rings for Calories, Protein, Carbohydrates, and Fats with glowing endpoints and spring physics.
  • Gesture-Driven Experience: Interactive swiping between Daily Summary, AI Meal Planner, and History screens.
  • OLED Pure Black Dark Mode: High-contrast, energy-efficient true-black interface crafted per Apple Human Interface Guidelines (HIG).

2. ๐Ÿ“ธ Multimodal Computer Vision & Nutrition Pipeline

  • Direct Visual Food Recognition: Identifies culinary dishes, cooking methods (grilled, roasted, fried), visual cues, and athlete dietary advice from photos.
  • Smart Image Compression: Automatic on-device compression and byte-budgeting for camera snapshots and gallery uploads to minimize latency and bandwidth.
  • Multi-Tier Engine with Automatic Fallback:
    • Tier 1: CalorieAPI direct culinary search.
    • Tier 2: CalorieNinjas natural language processing & image text OCR.
    • Tier 3: Google Gemini Generative AI (multimodal vision & structured JSON).
    • Tier 4: On-Device Smart Nutrition Heuristics (100% offline, zero-network required).

3. โšก Dynamic Athlete Diet Engine

  • Aggressive Cutting & Bulking Formulas: Custom target calorie and macro generation tailored to specific target durations (e.g., cutting 10 kg in 4 weeks with safe minimum metabolic thresholds).
  • Medical BMR & TDEE Calculations: Accurate energy expenditure formulas based on user gender, age, height, weight, and activity multipliers.

4. ๐Ÿ’ง Water Intake & Hydration Tracker

  • Quick-tap water logging (250ml quick-add or custom manual input) with real-time hydration progress.

5. ๐Ÿ“Š Interactive Recap & History

  • Detailed transaction log of tracked meals, segmented day/week filters, and macro balance summaries.

6. ๐Ÿ›ก๏ธ Zero-Leak Open-Source Security

  • No Hardcoded Secrets: Zero API keys or private credentials in the source code.
  • Runtime Environment Injection: Full support for --dart-define and --dart-define-from-file=env.json.
  • In-App BYOK (Bring Your Own Key): Users can supply their personal API keys in settings, saved exclusively in secure local device storage.
  • Full Legal Readiness: Built-in Terms of Service, Privacy Policy, and Medical Disclaimer screens.

๐Ÿ—๏ธ Project Architecture

lib/
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ constants/       # App constants, API config, environment bindings
โ”‚   โ”œโ”€โ”€ providers/       # Riverpod dependency injection providers
โ”‚   โ”œโ”€โ”€ services/        # GeminiService (multimodal vision, NLP tiers, offline engine)
โ”‚   โ”œโ”€โ”€ storage/         # Local persistence (SharedPreferences)
โ”‚   โ””โ”€โ”€ theme/           # Apple HIG theme, OLED dark colors, typography
โ”œโ”€โ”€ features/
โ”‚   โ”œโ”€โ”€ auth/            # Guest mode & account authentication
โ”‚   โ”œโ”€โ”€ history/         # Daily recap, meal log, macro balance breakdown
โ”‚   โ”œโ”€โ”€ home/            # Dashboard, Apple Activity Rings, quick log actions
โ”‚   โ”œโ”€โ”€ legal/           # Terms of Service, Privacy Policy, Medical Disclaimer
โ”‚   โ”œโ”€โ”€ meals/           # Camera vision, manual input, portion adjustments
โ”‚   โ”œโ”€โ”€ onboarding/      # Athlete target setup, BMR/TDEE calculation
โ”‚   โ””โ”€โ”€ settings/        # Preferences, client-side API key configuration
โ””โ”€โ”€ main.dart            # Application entrypoint & initialization

๐Ÿš€ Getting Started

Prerequisites

  • Flutter SDK (^3.10.4 or newer)
  • Dart SDK ^3.10.4
  • Android Studio / Xcode / VS Code

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/kalore.git
    cd kalore/kalore
  2. Install Flutter packages:

    flutter pub get
  3. Configure API Keys (Optional): Kalore runs completely offline without any keys! If you wish to enable cloud AI features:

    Copy env.json.example to env.json:

    cp env.json.example env.json

    Edit env.json with your credentials:

    {
      "GEMINI_API_KEY": "your_gemini_api_key",
      "CALORIE_API_KEY": "your_calorie_api_key",
      "CALORIE_NINJAS_KEY": "your_calorie_ninjas_key"
    }
  4. Launch Application:

    # With env.json:
    flutter run --dart-define-from-file=env.json
    
    # Or 100% offline (no keys required):
    flutter run

๐Ÿงช Testing

Kalore includes a comprehensive automated test suite covering medical algorithms, portion scaling, MIME detection, version tracking, and UI widget rendering:

# Run static analysis
flutter analyze

# Run all automated tests
flutter test test/unit_test.dart test/gemini_service_test.dart test/widget_test.dart

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐Ÿ Premium Apple-grade AI Calorie & Macro Tracker with Activity Rings, Computer Vision & Offline-First Heuristics

Topics

apple-healthcalorie-trackercomputer-visiondartfitnessfluttermacro-trackernutritionoffline-firstopen-source

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.