Skip to content
Mike Simms edited this page Jun 19, 2021 · 38 revisions

This is a workout tracking website and optional companion to the Open Workout Tracker 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 an activity tracking website when there are so many other options available?

  • I needed a companion website to the mobile app of the same name that I developed. I needed this to make the live tracking feature possible.
  • Other workout trackers do not support strength-based exercises, such as pull-ups and push-ups (press-ups).
  • I think users should have control over their own data and this is only possible with an open source application.
  • There are some analytical ideas that I have which none of the major activity tracking websites perform.
  • I want to do some experiments with automatically generating workout plans. This will serve as the platform for this idea.
  • Education. For the experience in performing full-stack software development: dealing with website deployment and scalability, and security issues.

Architecture

The software is written in python, with every attempt to have it work in both python2 and python3.

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 to allow the software to be relevant when the fashion in web frameworks changes. To this end, it currently supports cherrypy and flask with the implementation details for each being isolated in their own modules. The module App.py, contains the logic for handling each URL and is framework-agnostic.

Likewise, the file Api.py contains all of the API handlers and is also framework-agnostic. Isolating this in its own module also facilitates deploying the API as a microservice.

Computationally expensive tasks are isolated from the main web app by means of the RabbitMQ messaging service. This allows the number of analysis clients to be easily expanded to meet the needs of the application. In the future, analysis clients could also be implemented in other languages, environments, etc. as needs arise.

Architecture

How To Run Your Own Server

Requirements

  • python (either python 2.7 or greater, or python 3)
  • A WSGI solution (if intending to use the flask front end)

Installing Your Own Server

The plan is to eventually provide a docker container for this. However, in the meantime, running the python setup.py script should resolve all dependencies.

Starting the Server

Starting the server is quite straightforward. However, as the software is designed to work with multiple web frameworks as well as multiple mapping technologies, you will have to decide which ones are appropriate for your environment.

Supported Web Frameworks

  • cherrypy
  • flask

Supported Maps

  • Google Maps (requires providing an API key)
  • Open Street Maps

Options are specified in the configuration file. An example configuration file (openworkout.config) is included with the source.

To run the web service under the cherrypy framework:

python start_cherrypy.py --config openworkout.config

To run the web service under the flask framework:

python start_flask.py --config openworkout.config

How To Run Your Own Analysis Client

TODO

User Guide

Importing Data

Location-based activities can be imported if they are provided in either GPX, TCX, or FIT formats.

Tracking Aerobic Activities

TODO

Tracking Strength Activities

TODO

Tracking Live Activities

Tracking of live activities is supported when using the companion phone or watch app.

Activity View

Analyzing Data

TODO

Activity View

Generating Workout Plans

TODO

Activity View

Run Plans

The algorithm for generating run plans is built around the concept of having several core workouts each week (tempo run, interval session, and long run) while keeping the vast majority of the total weekly distance (80-90%) at an easy pace.

Bike Plans

Not yet implemented.

Swim Plans

Not yet implemented.

iCal Access

Scheduled workouts are accessible in iCal format. The Workouts page contains the URL for the iCal server.

API Access

TODO

Clone this wiki locally