Skip to content

itsJash/calorieApp_server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

walkthrough video: from phase 3

https://www.youtube.com/watch?v=kXsI3x8_JAY

walkthrough video: from phase 2

group.17.proj2.mp4


MIT license DOI made-with-python Test and Formatting contributors PEP8 last commit

GitHub issues closed issues Fork

BurnOut

WhatsApp Image 2021-09-28 at 2 48 00 PM

BurnOut is an easy to use application that keeps track of a user's daily calories gained and burnt. It can help the user to set goals such as weight loss/gain. Users can edit their profile by entering their height, weight, goal and target-weight. Users can enroll into numerous programs involving fitness such as yoga classes and workout sessions. Users can now connect with their friends by sending a friend-request and share their progress. This document provides a major perspective for the users to understand and take up the project as an Open source software and add on multiple features before releasing to the market. Also, the document aids the developers in understanding the code and acts as a reference point for continuing the project.

Table of Contents

Why use BurnOut?

  • User can keep a track of their calorie intake.
  • User just needs to input the food they've had, calories get calculated automatically.
  • Displays a record of calories in and calories burnt out day wise in History tab.
  • Helps user to figure out how much to eat/exercise according to their desired goal(weight loss/gain).
  • Users can connect with their friends and keep track of each other's progress
  • Enrollment into numerous yoga and workout sessions.
  • Accessible to everyone and easy to use.

What's new? (From Phase 2 to Phase 3)

  • 2 Factor Authorization: Implemented 2FA to verify new users when they register into the system.
  • Graphical Visualizations: Added various graphs such as bar, pie, line, radar, doughnut and bubble charts.
  • OpenAI: Implemented integration with openAI
  • Flash pending requests: Users if they have any pending requests are displayed at the top of the UI
  • Brone list Feature: The UI has a new tab where any users if they burn more than 100 calories are displayed
  • Kubernetes: Deployment for kubernetes service has been configrued
  • Dockerization: The application has been dockerized.
  • Test cases: We have increased the code coverage from 38% to 75% and fixed all failing test cases.
  • CI/CD - There is a new pipeline which now checks for code coverage and fails if it is under 60%
  • Email notifications - For every entry/burn out the user does they receive an email
  • UI - UI is more responsive and has validators for forms such as correct email, password requirements,etc.
  • Google Captcha - The sign up form now tests for users using v2 captcha
  • Autopopulate user Profile data!

TechStack Used for the Development of Project

python Python
mongo MongoDB
html CSS3
css HTML 5

Help by using our Software

  • With the help of our application, users will get to know the proper analysis of their diet and workout plan.
  • The registration form contains the target weight and target date. By filling that, the user will get an analysis in the form of a bar graph based on their past meal intake and burnout. In addition, it also shows how many more calories does the user has to intake or burn.

Core Functionalities of the Application

Register

This is the page where a new user can register to use our application. It contains fields like username, email, password, current weight, current height, target weight which the user wants to achieve and the target date. All these fields, once entered, will store in the MongoDB database.

Login

This is the login page wherein the user can access the functionalities of our application.

Set User Profile

This is the page where the user can update his profile. The updated profile will update in the MongoDB database and display it in the frontend.

Enter Calories in

This is the page where the user can enter the calories taken. The dropdown contains various food items and its calories. Once selected, it will update it in the database.

Check Your Plan

This is the page where the user can see their history in the form of a bar graph. This graph contains the data from last 7 days. The user can see their progress and can keep a track of how much calories the user needs to burn or intake to achieve their goal within the target date. The x-axis contains the date from last 7 days to the current date and y-axis contains the calories.

Adding Friends

- This page contains the list of "My Friends" and "Add friends". Add friends contains all the users who have registered to our application. By selecting the users, they will showup in "My friends" section. The main purpose of this is to share the calories data via email.

Enter burnout

- This is the page where a user can enter the calories burnt. The value will be updated to the database.

Steps for execution

Step 1: Install MongoDB using the following link:

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows

Step 2: Git Clone the Repository

git clone https://github.com/deekay2310/calorieApp_server.git

(OR) Download the .zip file on your local machine

https://github.com/deekay2310/calorieApp_server.git

Step 3: Install the required packages by running the following command in the terminal

pip install -r requirements.txt
pip install openai==0.28.0

Step 4: Go to https://platform.openai.com/ and create an API key for openai and paste it in application.py(in -> openai.api_key = '').

Step 5: If it's for the first time you're running the application you need to run this script once to populate data for food select field

`python insert_food_data.py`
(Just once)

Run the following command in the terminal

`python application.py`

Step 6: Open the URL in your browser:
http://127.0.0.1:5000/

OR if you prefer to run it on docker, follow till step 2 and then do

Step 3: Run docker compose up -d (with and optional --build option at the end if you have already done the build and to build again)

No need to manually populate the data as in the steps above. The docker config takes care of that :)

Step 4: Open the URL in your browser:
http://127.0.0.1:5000/ or http://localhost:5000/

Kubernetes

  • Navigate to the project directory.

  • Apply Kubernetes deployment and service YAML files:

    kubectl apply -f app-deployment.yaml
    kubectl apply -f app-service.yaml
    • Access Your Application

    Retrieve the external IP (LoadBalancer) or Cluster IP of the service:

    kubectl get service flask-mongo-service

Source Code

Link to the repository: https://github.com/deekay2310/calorieApp_server

Enhancements from version 2

  1. Make the website view port adaptable - the website should look good on phone, tablet and computer.
  2. Chatbot to guide through the application.
  3. Share workout plans with friends via email.
  4. Bug Fixes

Contributers


Anuj Naresh Chetwani


Bhavesh Ittadwar


Jash Shah


Vaibhavi Sangawar


Utsavkumar Lal


Neha Patil

Ojas Kulkarni


Vighnesh Hegde


Dev Kumar


Prakruthi Somashekar

Radhika Raman


Rohan Sinha


Sunidhi Hegde

Contribution

Please refer the CONTRIBUTING.md file for instructions on how to contribute to our repository.

Report Bug / Request Feature

License

This project is licensed under the MIT License.

About

Source code for 'BurnOut' project by Group 49 as part of CSC510 Fall 2023 project 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 54.3%
  • HTML 42.2%
  • JavaScript 1.6%
  • CSS 1.5%
  • Other 0.4%