This repo contains a setup for spinning up 3 Docker containers for the NutriGuide Application:
- A MySQL 8 container to store data
- A Python Flask container to implement a REST API
- A Local AppSmith Server
NutriGuide is a nutrition-focused application that helps users find and create healthy recipes that fit their specific dietary needs and goals. With a database of thousands of recipes, the application allows users to filter their search based on ingredients, cuisine, dietary restrictions, or meal type. The service provides nutritional information for each recipe, including calories, macronutrients, and micronutrients, to help users make informed choices. It also gives the opportunities for dietitians and nutritionists to provide guidance and advice on the type of diet to follow based on your goals. Nutritionists can give general advice, or refer to a specific diet. The problems that Nutriguide aims to solve are primarily to provide a comprehensive and customizable solution for users who want to eat healthily, save time, and achieve their dietary goals. Additionally, allow users to be connected to experts in the subject who can provide a unique solution for users who want to track their nutritional intake and ensure they are meeting their daily nutritional needs.
Important - you need Docker Desktop installed
- Clone this repository.
- Create a file named
db_root_password.txt
in thesecrets/
folder and put inside of it the root password for MySQL. - Create a file named
db_password.txt
in thesecrets/
folder and put inside of it the password you want to use for the a non-root user named webapp. - In a terminal or command prompt, navigate to the folder with the
docker-compose.yml
file. - Build the images with
docker compose build
- Start the containers with
docker compose up
. To run in detached mode, rundocker compose up -d
.
Access the webserver through http://localhost:8001/. Access Appsmith via our appsmith repo (linked for convenience: https://github.com/alinachiu/appsmith-repo) or via http://localhost:8080/
RESTful API matrix based on user personas Dr. Rebecca Goldberg, a certified nutrition specialist; Anthony Jones, a professional boxer looking to gain muscle mass; and Arlo Allen, a vegetarian with specific dietary restrictions.
Resource | GET | POST | PUT | DELETE |
---|---|---|---|---|
/nutritionaladviceposts | Return a list of all nutritional advice with their titles and their author [Arlo-4] [Rebecca-4] |
Creates a new nutritional advice post [Rebecca-1] |
n/a | n/a |
/nutritionaladviceposts/{author_id} | Return a list of all nutritional advice from a particular health expert {author_id} [Arlo-4] [Rebecca-4] [Anthony-4] |
n/a | n/a | n/a |
/nutritionaladviceposts/{author_id}/{post_id} | Return all the detailed information for a particular nutritional advice post {post_id} including their title, text body, author, and timestamp [Arlo-4] [Rebecca-4] |
n/a | Update the text body of the post {post_id} from an expert {author_id} [Rebecca-1] |
Remove a nutritional advice blog post {post_id} [Rebecca-1] |
/recommendedrecipes/{expert_id} | Return a list of a particular health expert’s {expert_id} recommended recipes [Anthony-4] |
n/a | n/a | n/a |
/recommendedrecipes/{expert_id}/{recipe_id} | Return all the detailed information for a particular expert’s {expert_id} recommended recipe {recipe_id} [[Anthony-4] |
Expert {expert_id} recommends a new recipe {recipe_id} [Rebecca-2] |
n/a | Unrecommends a recipe by removing it from an expert {expert_id}’s recommended list [Rebecca-2] |
/recipes | Return a list of all recipes with their titles and short descriptions [Arlo-3] |
n/a | n/a | n/a |
/recipes/{recipe_id} | Return all the detailed information for a particular recipe {recipe_id} [Arlo-3] |
n/a | n/a | n/a |
/recipes/{restriction_id} | Return a filtered list of recipes that people with dietary restriction {restriction_id} can eat [Arlo-1] [Anthony-1] |
n/a | n/a | n/a |
/recipes/{ingredient_id} | Return a filtered list of recipes that include the ingredient {ingredient_id} [Arlo-1] [Anthony-1] |
n/a | n/a | n/a |
/mealplans/{expert_id}/{user_id} | Return all meal plans that a user {user_id} has been assigned by their health expert {expert_id} [Anthony-3] [Arlo-2] |
Recommend a new meal plan for user {user_id} from expert {expert_id} [Rebecca-3] |
n/a | n/a |
/mealplans/{user_id}/{meal_plan_id} | Return all the detailed information for a user {user_id}’s personalized meal plan {meal_plan_id} [Anthony-3] [Arlo-2] |
Updates mutable attributes (start and end dates) of user {user_id}’s meal plan {meal_plan_id} [Anthony-3] [Rebecca-3] |
Remove a user {user_id}’s meal plan {meal_plan_id} from their list of recommended meal plans [Anthony-3] [Arlo-2] [Rebecca-3] |
|
/usergoals/{user_id} | Return a list of all a user {user_id}’s user goals [Anthony-2] |
Generates a new user goal for user {user_id} [Anthony-2] |
n/a | n/a |
/usergoals/{user_id}/{goal_id} | Return all the detailed information for a particular user {user_id} goal (all the goals within that goal) {goal_id} [Anthony-2] |
n/a | Edits mutable attributes (adding, removing, editing, goals in a user goal) in a user {user_id}’s user goal {goal_id} [Anthony-2] |
Remove a user {user_id}’s user goal plan {goal_id} [Anthony-2] |