People are normally not aware of the nutritional information of the food they eat. This is especially true for non-packaged food which forms the majority of the usual food consumption. Moreover people have no way of keeping track of the nutrients they have consumed during the day and how much more they need to reach the ideal amount. Our app solves this major issue, and gives users a convenient and fun way to track the daily nutritional intake and maintain a healthy and balanced diet.
What it does
The user gets the app which has all the functionality. Now, they use their camera to take a picture of the food they are considering or about to eat. The app would then use an API model to classify the food and identify it. Subsequently, it uses the USDA database to obtain the nutritional information of the food. It then displays the information for the user. Now, the user gets to decide if they want to consume the food. Depending on their response, the app updates the nutritional intake for the day on the mongodb database. Further, the app provides functionality that compares the current intake of the day to the recommended amount and gives the users directional information on how to achieve the recommended amount.
How we built it
We used react-native to build the app and the front end. Used expo testing platform to test the environment. Used JS promises to ensure the sequentially legitimate execution of the code. The user-interface was made conventient and easy to use. Then we used node.js to communicate with the USDA database and get the nutritional information of the food item. Before, this we had to get the authentication/access key from the data.gov website. We used two endpoints for this. The first one returns unique ID given the name of a food item. We then use the ID to obtain the nutritional information of the food. We then used mongoDB as the user information database and pymongo to communicate with it via code. For this we first created the mongoDB cluster to store the user information. Then, we created an update function that takes the nutritional information from the previous step in the form of a JSON and change the information in the database. We used pymongo for this purpose.
Challenges we ran into
We wanted to train our auto ML model for the kaggle database. But we realized that there was not enough time to train the model. Hence, in hacker fashion, we found a simpler solution in the form of an API that had a pre-trained food classification model. Not having a MAC device to test forced us to use Expo for testing. USDA authentication key problems. Learning how to use flask and integrating it with the larger framework. Using JSON in pymongo. Integrating the different parts into a single larger framework.
Accomplishments that we're proud of
Building our first app with React Active. Using APIs to communicate with the USDA database. Adding 7+ nutrients to the pop-up information. The update function of the flask to change user information on the database. Making the app extremely convenient and easy to use.
What we learned
We learned how to use node.js and how to make and use APIs. We learned how to use the mongodb database and integrate it into our code. We learned how to use react-native. Also, learned about Java Script promises and testing on Expo.
What's next for Nutritio
We want to add funtionality so that users can connect with friends and share their food intake with friends and family. Also, we want to personalize the recommendations of the ideal nutritional intake per day for the user depending on lifestyle (amount of physical activity, profession, etc.), BMR etc. We also want to add an AR communication interface on the app that will communicate the recommendation to the user. We want to add several characters that the user will be able to choose from.