The calorie counter app is a great way to keep track of all the calories you are burning every day. The user can add all the food they are eating, and the app will count the calories. We can further add a function for users to add their daily workout sessions, running and jogging to calculate how many calories they have burned.
This project was made before by me, but I decided to do a better version of it, with clean code and better functionality. You can check it here: HealthGain.
git clone https://github.com/amssdias/calorie_counter
cd calorie_counter
Fill up the ".env.example" file, so users can receive activation links and to reset passwords. Rename it as well to ".env".
-
Pipenv (make sure you have Python installed):
pip install pipenv # For Windows brew install pipenv # For MacOs sudo apt install pipenv # For Debian Buster+ sudo dnf install pipenv # For Fedora
-
Install packages:
pipenv install # will create a virtual environment with all the modules needed
-
Activate virtualenv and apply migrations:
pipenv shell # To activate the virtual environment python manage.py makemigrations python manage.py migrate
If any doubts, here's a link to some more explanations: Pipenv
Install Docker here.
Once installed, all you have to do is open your terminal on the project folder and run
docker-compose up
This will run the project with a PostGres database already prefilled with some data. Paste this link on your browser: http://127.0.0.1:8000/accounts/login
On a terminal window:
pipenv shell
python manage.py runserver
Paste this link on your browser: http://127.0.0.1:8000/accounts/login
On a new terminal window run:
pipenv shell
celery -A calourie_counter.celery worker -l info
celery -A calorie_counter.celery worker --pool=solo -l info # For windows
- Create an account
- Send email to activate account async
- Log in
- Via email and password
- Resend activation link async
- Reset password
- Add foods
- Register foods
- Check details of registered foods (days, time, grams)
- Delete foods
- Check up table of nutrition value of the current day