MyFitness is a Django project designed for university purposes, allowing users to track their meal nutrition, set goals for specific calorie, protein, carbs, and fats intake, and monitor their macros. The project utilizes the FoodData Central (FDC) database for nutritional information.
These instructions will help you set up and run the MyFitness project on your local machine.
Make sure you have the following installed on your machine:
- Python (version 3.10)
- Pip (package installer for Python)
- Clone the repository to your local machine:
git clone https://github.com/varlamzhordania/myfitness.git
-
Navigate to the project directory:
cd myfitness cd backend
-
Create a virtual environment (recommended):
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On Unix or MacOS:
source venv/bin/activate
-
-
Install project dependencies:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Create a superuser (for Django admin access):
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
The project will be accessible at http://localhost:8000.
-
Access the Django admin interface at http://localhost:8000/admin and log in with the superuser credentials created earlier.
Rename the example.env file to .env:
mv example.env .env
Open the .env file and fill in the FDC_TOKEN variable with your FoodData Central (FDC) API token.
MyFitness allows users to:
- Track meal nutrition
- Set goals for calorie, protein, carbs, and fats intake
- Monitor their macros
Note: MyFitness uses the FoodData Central (FDC) database for nutritional information.