Examples
Getting started
First, clone the project:
git clone https://github.com/TheNewThinkTank/fitness-tracker.git
Upload your workouts
- Add your workout log to the
datafolder under the correct workout date - Run
./bin/fitcli.sh, optionally specify theWORKOUT_DATEandTRAINING_PROGRAMvalues - The
bin/fitcli.shscript will then insert your log(s) into the TinyDB database
Running locally
Copy the environment template and fill in your values:
With Docker Compose (recommended)
- Backend API:
http://localhost:8000 - API docs:
http://localhost:8000/docs - Frontend:
http://localhost:3000
Single container
docker build -t fitness-tracker:latest .
docker run --rm \
-p 8000:8000 \
--env-file .env \
-v "$(pwd)/local_assets/credentials.json:/code/local_assets/credentials.json:ro" \
fitness-tracker:latest
Without containers
# Start the backend
uvicorn src.main:app --reload
# Start the frontend (separate terminal)
cd frontend
npm run dev
Debugging: from the URL, open the browser's developer tools (F12 or Cmd+Shift+C)
Testing endpoints locally
Overview of endpoints: