Skip to content

adrienchevrier/adrienchevrier-tracking_sport

Repository files navigation

Tracking_sport

This projects intends to track the user's sport activity through weeks based on garmin products

Prerequisites

Docker must be installed and running to launch the application Download here https://docs.docker.com/get-docker/

Installation

Download the project by clicking on Code => Download ZIP File : download image

Setup

The ZIP file you downloaded must be unzipped into a folder of your choice. You need to write your credentials in the configuration file to get access to your Garmin data. All the data and your credentials remain locally on your computer, nothing is sent outside of your machine. Credentials can be changed in the following file, which is located in the folder 'python' from the ZIP file that you downloaded and extracted :
/python/config.ini

Launch

To launch the application, go to the application home directory and do one of the following :

  • Windows : Double click on tracking-sport_windows.bat
  • Linux and MacOS : Double click on tracking-sport_mac_linux.sh
  • Command line : run the command line docker-compose up

To access the application, copy-paste this address on your web-browser :http://localhost:3000/

Technical documentation

The application is created using 3 docker images :

  • mongo-app is the mongo database used to store the data
  • load activities is the python script that downloads the data and writes it in the mongo-app
  • react-dash-app handles the application

Refresh data - Load-activities

This container can be used to refresh the data in the application without having to restart it. The user-friendly way to launch the refresh is to use docker dashboard here is explained how to access the docker dashboard : https://docs.docker.com/desktop/dashboard/ In the docker dashboard :

  • Expand the react container
  • click the load-activities play button

When launched, this container downloads activities from the user's account, and writes it into the mongo-app container. refresh image

Dockerfiles

load-activities
  • Location : /python
  • Image name : quanchisensei/load-activities
  • Container name : load-activities
react-dash-app
  • Location : /app
  • Image name : quanchisensei/react-dash:dev
  • Container name : react-dash-app
mongo-app
  • Location : -
  • Image name : mongo:latest
  • Container name : mongo-app