gergohrubo / food-footprint-server

Backend side repository of the Food diary app. ExpressJS | MongoDB | AWS | Docker
0 stars 0 forks source link

Development v2.0 #8

Closed gergohrubo closed 4 years ago

gergohrubo commented 4 years ago

This is the second pull request from development to master branch and marks the second viable product.

At this stage there are two complex endpoints as well as some minor ones. The backend supports login and signup, and authorization middleware is added to all the endpoints.

Images are now uploaded to AWS S3 with their unique name and kept there. Spoonacular API was added to acquire nutrition data for the ingredients. MongoDB and Mongoose is used to store our data, and a new Nutrition model is defined, which is responsible for keeping track of users meals. Every instance corresponds to a single users entries on a single day, and stores all the meals (with ingredients and recipe names) as well as the compound nutritional data for that day.

In the complex /image and /ingredients POST endpoints database is always updated on the fly, right after receiving data from either the frontend or one of the APIs.

This backend is also dockerized and run as an image in a container with a volume assigned to it.