# Product Planning
This is essentially a calories counter app. It generates nutrition info from users' input. Users can create their own recipes or browse and save other users' recipes. Users can also group recipes into a meal and save them.
## 1. Fundamental Features
- [ ] User can register/login/logout
- [ ] User can see a list of system recipes and recipes by other users
## 2. Core features
### Nutrition Info Generator
- [ ] User can input a recipe, the app will return a nutrition info for that recipe.
- [ ] User can save a recipe with the generated nutrition info.
- [ ] User can create meals from different recipes and save them. App will calculate the total nutrition for each meal.
- [ ] User can browse other users' recipes and save to their Favorite collection.
## 3. Cool stuff
### Food Intake Tracker
- [ ] User can update their information (nutrition goal, age)
- [ ] User can set daily goal: total calories, %fat, %protein, %carbs
- [ ] User can track daily food intake by adding food items (from database), recipe, or meal from their collections
- [ ] User can see progress circles for their food intake compared to their set goal
### Customize recipe
- [ ] User can adjust the serving of the original recipe (1/2, 1/3, 1/4, x2, x3), app will calculate and return a new recipe and new nutrition label.
### Diet plans
- [ ] Each recipe can belong to one or more diets (example: keto, paleo, high protein...)
- [ ] Users can browse recipe by diet category
### Fitness Tracker
- [ ] User can update body measurements (height, weight, body fat percentage, muscle mass)
- [ ] User can see history of their measurements visualized by line charts: BMI, body fat percentage, muscle mass
## 4. ERD
*Diagram to be updated*
### Schemas draft
*(only for core features)*
#### User
- Name: string
- Email: string
- Password:string
- avatarUrl: string
- Goal: {calories: number, protein: number, fat, carbs}
> Which is better? Saving recipes and meals inside User OR query recipes/meals owned by User from Meals/Recipe collection?
#### Food
USDA dataset, to be confirmed.
#### Recipe
- Owner: ObjectId - ref: User
- Name: string
- Ingredients: [
{id: ObjectId - ref: Food,
amount: number,
unit: string}
]
- instruction: string
- Calories: number
- MacroProfile: {protein: num, carbs: num, fat: num } *(in percent. Need to store for filters function???)*
---
> aggregation during query
- Protein: number (in gram) *(pulled from each ingredient matched in Food)
- Carbs: number (in gram)
- Fat: number (in gram)
- Diet(category): [string]
---
#### Meal
- Owner: ObjectId - ref: User
- Name: string
- dishes: [ObjectId - ref: Recipe]
- Calories: number
#### Favorite
- User: ObjectId - ref: User
- Recipe: ObjectId - ref: Recipe
## 5. Future Development
Future development will aim to transform this into an all-in-one health and fitness app that involves:
- tracking users' food intake and fitness measurements (like weight, BMI, BMR, TDEE, muscle mass, body fat percentage)
- storing history of such data
- displaying them in a dashboard visualization (charts and graphs)
- connecting to fitness tracking devices (Fit bit, Mi fit, Galaxy fit, EMS workout techonology) to get personal real time data on calories expenditure.