Notes
Backend
Need way to efficiently convert the ingredient unit (e.g. ounces) into the specified calorie density, (e.g. 100kcal per 50g).
- Each ingredient can have multiple calorie densities, e.g. a weight one, a volume one, and a skip unit one (e.g. 1 egg).
- This poses a problem of at recipe creation time, there won't necessarily be the correct conversions for all ingredients and units. Should handle this somehow, my best guess is to send an email to the unit owner (or ingredient owner if the conversion in question involves no unit, e.g. 1 egg) stating the ingredients / units that don't have a valid conversion for a given recipe so that it can be created. This would be sent post save.
Frontend
- Calorie counting calculation is done front end so that recipes don't need resaving and then each recipe ingredient that does not have a valid conversion can be highlighted. Also items that don't contribute to the calorie counting, e.g. ingredients without a quantity and unit, can be highlighted. This can happen either inline (with a star or something) or by hovering over the calculated amount.
Notes
Backend
Need way to efficiently convert the ingredient unit (e.g. ounces) into the specified calorie density, (e.g. 100kcal per 50g).
Frontend