Skip to content

ThomasLaforge/ppg-timer

Repository files navigation

PPG Timer

Goal

Yesterday, we used simple watch timers and wrote our training program on paper. Now, we can use new world possibilities to make it smarter and easier to manage.

The solution we chose is to have an app 100% autonomous in internet connection, to be sure anywhere we go, it will work as "paper and watch" combo ^^ You'll still have the possibility to get some cloud bonus.

Use cases

[x] - Create trainings easiest way but with maximum powers
[x] - Execute trainings with smooth UI and less interaction needed.
[x] - No useless pause on training
[x] - Long training possible with multi loops and repetitions
[x] - Share trainings with friends
[ ] - Add or create exercises

Developement

Publish

To publish, you have to set env GITHUB_TOKEN. $env:GITHUB_TOKEN = 'my_token'

then:
Get-ChildItem -Path Env:\
to check it worked

Data Model

You can see definitions.ts to have full informations. We are only managing training objects.

Training

{
    created_at: number,
    updated_at: number,
    note: number,
    data : { 
        defaultExerciseDuration: number,
        defaultExerciseRepetions: number,
        defaultExerciseRest: number,
        name: string
        loops: {
            repetitions: number,
            rest: number,
            warmup: number,
            exercises: {
                exerciseId: number,
                isDuration: boolean, // True = duration Else = Repetition
                value: number,
                rest: number
            }[]
        }[],
    }
}    

Training.data is the data who can be shared / imported. It's the minimum data we want to share now. So others informations are only user preferences. From this minimum amount of data we can execute a training.

Important thing to note: the only one dependancy we have are the exercises list. Is there any solution ? We could add local db for exercises and add exercises data on training object in place of exerciseId. In the local db, anybody could add erxercises and when sharing trainings, users can execute training even if they don't own the exercises included.

Updated TODO

  • Previous / Skip exercise
  • use default values on creator

Technos