Skip to content

davidsmonteiro/FitTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FitTracker Pro

A native Android fitness tracking app that doubles as an intelligent training assistant, powered by LLMs.

Built with Kotlin, Jetpack Compose, Room, and Hilt. Dark-only UI designed for gym use.

Features

Nutrition

  • Log meals with AI-powered macro estimation (kcal, protein, fat, carbs, fiber)
  • Daily summary with expandable detailed macros
  • Smart remaining budget — distributes leftover macros across remaining meals
  • AI meal plan suggestions based on targets and dietary preferences
  • 71+ Portuguese food database with fuzzy search for local estimation

Training

  • Log workouts with exercises, sets, reps, weight, RPE, and notes
  • AI-generated multi-week training programs with periodization
  • Progressive overload tracking with deltas vs previous session
  • Next workout suggestions with auto-calculated weight progressions
  • Pre-built plans: Push, Pull, Legs, Full Body, Padel, Volleyball

Body Composition

  • Track weight and body fat percentage over time
  • Weight trend chart with goal line overlay (1M/3M/6M/1Y periods)
  • Auto-import from Health Connect (Samsung watches, Google Fit, etc.)
  • Progress-to-goal tracking with weekly rate calculation

AI Assistant

  • Chat interface with full user context (nutrition, training, body, activity)
  • Quick actions: weekly summary, diet analysis, next workout, progress check
  • Proactive insights after meals, workouts, and weigh-ins
  • Nutrition and training trend charts as empty-state dashboard

Health Connect

  • Import workout metrics from smartwatch (HR, calories, duration)
  • Auto-detect and import body measurements
  • Steps and sleep data fed into AI assistant context

Data Management

  • Export/import all data as JSON
  • Share daily summaries
  • LLM provider configuration (Anthropic, OpenRouter, Ollama)
  • Health Connect permissions management

Architecture

com.fittracker.pro/
├── data/
│   ├── local/          # Room database, entities, DAOs, mappers
│   ├── remote/         # LLM clients (Anthropic, OpenRouter, Ollama)
│   ├── repository/     # Repository implementations
│   └── healthconnect/  # Health Connect manager and repository
├── di/                 # Hilt modules (Database, Repository, Network)
├── domain/
│   ├── model/          # Domain models (Meal, Workout, BodyEntry, etc.)
│   ├── repository/     # Repository interfaces
│   └── usecase/        # Use cases (nutrition, training, chat, insights, etc.)
├── presentation/
│   ├── nutrition/      # Nutrition screen, daily summary, meal forms
│   ├── training/       # Training screen, programs, workout forms
│   ├── body/           # Body screen, weight trend chart
│   ├── assistant/      # AI chat screen, trend charts
│   ├── more/           # Settings, data management, LLM config
│   ├── onboarding/     # First-run setup flow
│   ├── settings/       # Profile and goals configuration
│   └── common/         # Navigation, theme, shared components
└── util/               # Constants, food database, training plans, date utils

Stack: Kotlin 2.1 · Jetpack Compose (BOM 2025.02) · Room · Hilt · Ktor Client · Kotlinx Serialization · Vico Charts · Health Connect SDK · DataStore Preferences

Min SDK: 26 (Android 8.0) · Target SDK: 36

LLM Backends

The app supports three LLM providers for AI features:

Provider Use Case Config
Anthropic Cloud API (Claude) API key
OpenRouter Multi-model gateway API key
Ollama Local/self-hosted Base URL

All AI features (nutrition estimation, chat, meal plans, training programs, insights) use a generic chat() interface, so any backend works for any feature.

Setup

  1. Clone the repo
  2. Open in Android Studio
  3. Build and install: ./gradlew assembleDebug
  4. On first launch, complete the onboarding to set your profile and goals
  5. Configure an LLM provider in Mais > LLM for AI features

Database

Room database with 5 tables across 6 migrations:

Table Purpose
meals Meal entries with full macros
workouts Workout logs with exercises, RPE, notes
body_entries Weight and body fat measurements
user_profile Single-row profile with targets and preferences
chat_messages AI assistant conversation history
training_programs Multi-week AI-generated training programs

Language

All UI strings are in Portuguese (PT-PT). The app is designed for a Portuguese-speaking user.

License

Private project.

About

FitTracker Pro - Android fitness tracking app (Nutrition, Training, Body Composition, Reports)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages