API Docs API Docs

OpenWorkoutWeb

Workout tracking website and optional companion to the Open Workout mobile app. This is very much a work-in-progress and is being done as a spare-time project, so set your expectations appropriately.

Rationale

Why develop a workout tracker when there are so many closed-source options available?

Major Features

Major Todos

Software Design Goals

Full bug and feature tracking.

Creating a Docker Image

Step 1. Clone the source code:

git clone https://github.com/msimms/OpenWorkoutWeb

Step 2. Build the docker image:

cd OpenWorkoutWeb
docker build -t openworkout -f docker/Dockerfile .

Manual Installation

Step 1. Clone the source code:

git clone https://github.com/msimms/OpenWorkoutWeb

Step 2. Install the python dependencies:

cd OpenWorkoutWeb
python setup.py

Step 3. Install other package dependencies, specifically mongodb and rabbitmq, which are services the application depends on:

#
# Example for macOS:
#

# Install mongod and start the service.
brew tap mongodb/brew
brew install mongodb-community@5.0
brew services start mongodb/brew/mongodb-community

# Install rabbitmq and start the service.
brew install rabbitmq
brew services restart rabbitmq

#
# Example for Ubuntu Linux:
#

# Install mongo.
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt update
sudo apt install mongodb-org
sudo systemctl start mongod.service
sudo systemctl status mongod

# Install rabbitmq.
sudo apt install rabbitmq-server
sudo rabbitmqctl add_user openworkout <password>
sudo rabbitmqctl add_vhost openworkout_vhost
sudo rabbitmqctl set_user_tags openworkout openworkout_tag
sudo rabbitmqctl set_permissions -p openworkout_vhost openworkout ".*" ".*" ".*"
sudo rabbitmqctl delete_user guest
sudo service rabbitmq-server start

Execution

The software is designed to work within multiple frameworks. Currently, cherrypy and flask are supported.

Option 1 To run the web service under the cherrypy framework, the wsgi option is the preferred option if the app is sitting behind a proper web server, such as ngnix:

python start_cherrypy.py --config openworkout.config
or
python start_cherrypy_wsgi.py --config openworkout.config

Option 2 To run the web service under the flask framework:

python start_flask.py --config openworkout.config

If a Google Maps key is not provided in the configuration file, OpenStreetMap will be used instead.

Architecture

The software architecture makes it possible to use this system with different front-end technologies. Also, computationally expensive analysis tasks are kept separate from the main application, communicating via RabbitMQ.

Being a web app, it requires a web framework. I have tried to keep the design flexible enough to support multiple frameworks, to both appease different audiences and also allow the software to be relevant when the fashion in web frameworks inevitably changes. To this end, it currently supports cherrypy and flask with the implementation details for each being isolated in their own modules. A wsgi front end for cherrypy is also provided.

Notable modules:

The software is written in python. It was started in python2 and later converted to python3.

Architecture Diagram

Workout Plans

This feature is very much under development and will go through several iterations before being ready for general use. The idea is to use the athlete’s existing data to generate workouts to help in reaching future goals.

User Guide

For instructional material, consult the Wiki

Version History

0.1

0.2

0.3

0.4

0.5

0.6

0.6

0.7

0.8

0.9

0.10

0.11

0.12

0.13

0.14

0.15

0.16

0.17

0.18

0.19

0.20

0.21

0.22

0.23

0.24

0.25

0.26

0.27

0.28

0.29

0.30

0.31

0.32

0.33

0.34

0.35

0.36

0.37

0.38

0.38

0.39

0.40

0.41

0.42

0.43

0.44

0.45

0.46

0.47

0.48

0.49

0.50

0.51

0.52

0.53

0.54

0.55

0.56

0.57

Tech

This software uses several other source projects to work properly:

The app is written in a combination of Python, HTML, and JavaScript.

License

Currently proprietary (though many of the source files are under the MIT license). However I am considering moving the remainder of the source code to either an MIT or MPL license.

Source Code

The source code is stored on GitHub at this location.