wger icon indicating copy to clipboard operation
wger copied to clipboard

Add “Calories burned” as an acceptable measure unit for cardio (UI + API)

Open mxm-hardy opened this issue 4 months ago • 4 comments

Use case

Thank you for a wonderful and useful app! The Nutritional plan section tracks calories consumed, but the Workout logs have no way to record calories burned. Most treadmills and cardio machines display this, and many wearables track it.

Proposal

Please add kcal as an acceptable measure unit for cardio entries in both the UI and API, alongside existing units like kg, lb, miles, m.

Benefits

  • Completes energy balance tracking (intake vs. expenditure).
  • Allows logging of treadmill/machine values or wearable data.
  • Field is optional, so no estimate is required.

Additional Context

Acceptance criteria

  • UI + API accept calories (integer/float, ≥ 0).
  • Display in workout details and exports.

mxm-hardy avatar Aug 09 '25 21:08 mxm-hardy

I’d like to take this week’s “Calories burned” feature a bit further: ideally we log a workout → automatically calculate the calories → and immediately sync that into the nutrition plan.

Rough flow: workout is logged → system looks up a calorie database → calculates the calories burned → pops up a small window for the user → writes the value into the nutrition plan automatically.

Planned pieces:

set up a public calorie database (something like an ExerciseCalorieData model) that stores burn rates for different intensities; build an auto-calculation service that runs when a workout log is submitted, with support for user preferences; add a UI pop-up so users can confirm the calculated calories; integrate with the nutrition plan so these values show up as a new calorie entry. Just checking whether there are any red flags, or if you’d prefer we ship a smaller slice first?

liebeziv avatar Sep 26 '25 03:09 liebeziv

@rolandgeider

liebeziv avatar Sep 26 '25 10:09 liebeziv

hey! adding kcal as units for workouts is a good idea, like you said specially for cardio.

@liebeziv However I'm not sure about adding automatic calculations. You would need to add that data for each exercise in the database and ask users to fill in this when submitting new ones, and I'm not sure how accurate the data would be. There is an issue about synchronizing data from smart watches, https://github.com/wger-project/flutter/issues/618. This would be more precise and would even allow us to handle additional entries like heart rate. Also note that adding this sync still comes with a lot of questions but if you want to start with it, I'll be more than happy to help you!

rolandgeider avatar Sep 26 '25 11:09 rolandgeider

I'd like to work on this issue. Please assign it to me.

Anand0295 avatar Oct 28 '25 16:10 Anand0295