Skip to content

tran4code/calorieApp_server

 
 

Repository files navigation

GitHub license DOI made-with-python PEP8 codecov

github workflow github workflow github workflow github workflow github workflow

calorieApp_server forks calorieApp_server stars calorieApp_server issues calorieApp_server issues closed cheapBuy pull-requests

BurnOut: Fuel Your Fitness Journey !

2023-11-27.21.42.35.mp4

BurnOut is your ultimate fitness companion, designed to make tracking your daily calorie intake and workouts a breeze. Whether you're aiming to shed some pounds or bulk up, BurnOut has got you covered. Here's what you can expect:

  • Personalized Profiles: Create your unique profile by entering your height, weight, fitness goals, and target weight. BurnOut tailors your fitness journey just for you.

  • Calorie Tracking: Calorie mindfulness is the best way to achieve your goals. BurnOut provides a comprehensive calorie logbook as the best tool for a healthier lifestyle.

  • Goal Setting: Set your health and wellness goals with ease. Whether it's weight loss or muscle gain, BurnOut provides the roadmap to get you there.

  • ChatGPT4 generated WorkOut plan Now you can get customized and more accurate work out plan.

  • ChatGPT4 generated diet plan Now you can get customized and more accurate diet plan.

and more:

  • User can keep a track of their calorie intake and output.
  • User just needs to input the food they've eaten or an activity they've done,and 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).
  • Enrollment into a variety of workout programs.
  • Accessible to everyone and easy to use.

Table of Contents

Demo Video

[Demo video showcasing the most recent updates and features of Burnout]

Burn Out 4 new features and improvements

Please refer to Demo video, Documentation.md and Changelog.md for checking out the new features and improvements in BurnOut 4.0.0.

Successful usecases

🎉️ Successful Use Case: Fitness Journey with BurnOut - Emma

Background: Emma, a Computer Science professional with a busy schedule.

Scenario:

Emma decided to prioritize her health and fitness but found it challenging to keep track of her diet and exercise routine due to her demanding job.

She started using BurnOut to create a personalized profile, set achievable fitness goals, and track her daily calorie intake and workouts effortlessly.

Result: Emma experienced a positive transformation in her overall well-being. The detailed calorie logbook in BurnOut helped her make informed decisions about her diet. With the goal-setting feature, Emma successfully maintained a balance between weight loss and muscle gain. Additionally, she connected with her colleagues using BurnOut, creating a supportive fitness community. Emma now enjoys a healthier lifestyle while excelling in her computer science career.

🎉️ Successful Use Case: BurnOut for Busy Professionals - Alex

Background: Alex, Marketing professional with a hectic work schedule.

Scenario:

Alex, driven by the need to stay fit despite a demanding job, started using BurnOut to manage his fitness routine efficiently.

He used the app to quickly input his meals and workouts, relying on the automatic calorie calculations to stay on top of his health goals.

Result: Alex successfully integrated BurnOut into his busy lifestyle. The app's accessible and user-friendly interface allowed him to effortlessly track his calorie intake and output. The personalized profiles and goal-setting features streamlined his fitness journey, and the app's history tab provided a clear overview of his progress. Despite a busy schedule, Alex achieved his fitness goals and maintained a healthy work-life balance.

Tech Stack

python Python
mongo MongoDB
html CSS3
css HTML 5

Environment Setup

Prerequisites:

  • Python 3.10

Step 1: Install the MongoDB Community Edition:

The Community Edition lets you run MongoDB locally on your computer. If you want to work with MongoDB on the cloud, use MongoDB's Atlas managed database service.
Optionally, install MongoDB Compass as a GUI for MongoDB databases, using connection string mongodb://localhost:27017 for local development.

Then, make sure that MongoDB is running: brew services start mongodb on macOS and mongod on Windows

Step 2: Clone the repository: git clone https://github.com/1360119047/calorieApp_server.git

Step 3:

Note

It is best practice to use a virtual environment. We have been using venv, which comes bundled with Python. To activate the venv virtual environment, navigate to the root of the project directory and run: source ./venv/Scripts/activate on macOS. To deactivate, run deactivate.

Alternatively, use pipenv virtual environment: pipenv shell

Install the required packages by running the following command in the terminal: pip install -r requirements.txt. There is a separate requirements-dev.txt for installing dev dependencies: pip install -r requirements-dev.txt.

Step 4: Run the following command in the terminal: python src/application.py

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

Step 6: Run python src/insert_data.py to create a food collection and exercise collection in the test database. This food data is used for the Calories form.

Alternatively, deploy using Docker Compose:

Prerequisites:

Step 1: Clone the repository: git clone https://github.com/1360119047/calorieApp_server.git

Step 2: Run with Docker: docker compose up --build

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

Testing

We primarily test the application.py module, the Flask API interface for which the client side interacts. If HTTP requests to application.py endpoints return expected values, then we can reasonably assume that other backend code that is customer-facing is working. That is what we most care about.

Unit tests are located in tests/test_application.py. To run tests and generate a code coverage report:

pytest --cov=application --cov-report=html

Note that coverage HTML is written to directory htmlcov in the same location the command is run. Navigate to htmlcov and open index.html in a browser.

Code Coverage Report

Quick start guide(Core Functionalities)

Register

Login

Set User Profile

AI Generated Workout Plan

Daily Goal

Roadmap and Future Ideas

  1. Improve frontend even more.
  2. Improve user profile with more information and customizable options. Make profiles viewable to friends and other users.
  3. Provide user stats and trends for diet and activity.
  4. Improve the food and activity selection forms with a more efficient search tool for a better experience.
  5. Make goals more customizable. Add profile badges and other rewards for hitting goals.
  6. Add functionality to workout enrollment feature. Incorporate workout planner and other progress metrics.
  7. Implement a recommendation system for foods, activities, calorie goals, etc.

How to Contribute

Please refer to CONTRIBUTING.md for instructions on how to contribute to BurnOut.

Report Bug / Request Feature

Team Members


Benyamin Tabarsi

Keith Tran

Kimia Fazeli

Mohammed Faizan

Contact us(Contributors):

We are here to support you. Feel free to email us with any question or bug reports. We try our best to reply as soon as possible.

Project's funding

Our project is currently not funded, and we operate on a volunteer and open-source basis , and currently,improvement of the project solely relies on the dedication of our team and contributions from the open-source community.

Acknowledgements

We have built this code on top of the stack from the project BurnOut 3

Recommended citation

You can cite us like this:

BurnOut with ChatGPT. Version 4.0. Keith Tran,Benyamin Tabarsi, Kimia Fazeli, Mohammed Fazian. 2023. BurnOut

License

This project is licensed under the MIT License.

Other important links:

About

Source code for 'BurnOut' project by Group 6 as part of CSC510

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 50.8%
  • HTML 44.9%
  • JavaScript 2.1%
  • CSS 1.5%
  • Other 0.7%