Giter VIP home page Giter VIP logo

nutriguide-boilerplate's Introduction

NutriGuide

This repo contains a setup for spinning up 3 Docker containers for the NutriGuide Application:

  1. A MySQL 8 container to store data
  2. A Python Flask container to implement a REST API
  3. 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.

How to setup and start the containers

Important - you need Docker Desktop installed

  1. Clone this repository.
  2. Create a file named db_root_password.txt in the secrets/ folder and put inside of it the root password for MySQL.
  3. Create a file named db_password.txt in the secrets/ folder and put inside of it the password you want to use for the a non-root user named webapp.
  4. In a terminal or command prompt, navigate to the folder with the docker-compose.yml file.
  5. Build the images with docker compose build
  6. Start the containers with docker compose up. To run in detached mode, run docker 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

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]

nutriguide-boilerplate's People

Contributors

alinachiu avatar pratham200742 avatar symnc avatar shivam1640 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.