forked from utsavll0/calorieApp_server
-
Notifications
You must be signed in to change notification settings - Fork 2
Main Functions for BurnOut
rishi2019194 edited this page Nov 27, 2023
·
1 revision
- This function is used for login by the user
- Using email ID and passoword is validated and the user is directed to home
- This function is used for logout by the user
- logout() function just clears the session
- This function is used for registering new users
- Details of new users are stored in the database and the user is redirected to login page
- This function renders the home page
- This function is used to send an email to user's friends containing calorie history of user
- The user will fill a textarea with their friends email IDs (comma seperated if multiple)
- This function will add calories consumed/burned for the data selected.
- This function is used to store/display user's profile details such as height, weight and goal weight
- This function displays user's historical calorie consumption and burnout at date level. Also it helps to calculate the graph functionality features
- This function allows user to accept friend requests and display all friends
- This function allows user to enroll in different plans
- This function displays the user's enrolled plans and also a dynamic progress bar
bmi_calci()
- This function fetches the user age, weight and height to calculate the BMI and display it by rendering to the HTML page
- This function simply renders to the chatbot.html page
- This function computes the answer to the user-query using OpenAI API call and renders it to the html page
- This function populate countries in the bmi_cal.html dropdown from mongodb
- This function fetches the average bmi values from database
- Function to complete chat input using OpenAI's GPT-3.5 Turbo
- Function to handle user chat input
- Function to get a response from the chatbot
- Function that calculates BMI for a user based on age, weight and height
- Function that computes the BMI category corresponding to the found BMI value
- Function to fetch the user calories consumed and burnt over time and then returning them which can be shared via the email feature
- Function to compute total calories user need to burn/gain from start till end date
- Function to compute total calories user need to burn/gain from a given date till the end date
- This file simply transfers the food-calorie data and the BMI data to the MongoDB server
- This file has 3 test cases to check whether number of calories that need to burnt are calculated correctly or not
- This file has various test cases for email feature, chatbot feature, graph feature and the bmi feature(we have added failing cases as well)