A NativeScript app for creating and tracking Powerlifting (and other weight training) programs. Named for the Greek god of strength and power, not necessarily the video game character.
Kratos uses a hierarchy to help you manage training prorams, mesocycles, schedules, and individual workouts.
Program: The top-level structure in Kratos is called aprogram. Aprogramis a long-term approach to training.-
Mesocyle: Eachprogramcontains one or more predefinedmesocycles,which define a specific training progression over time.Week: In Kratos, theweekis the unit of time for progression through amesocycle. Amesocycleis made up of one or more weeks, where each week is contains a series ofworkouts.Workout: Aworkoutis a specific list ofexercisesto be performed (in order) in one training session.Set: For eachexercisein a workout, there are a list of one or moresets. Asetspecifies a weight, a number of repetitions, and an RPE (rate of perceived exertion).
-
Schedule: A schedule places aprogram'smesocycle(s) into actual calendar days, defining the order and repetition ofmesocycles, as well as specific days for theworkoutswithin thosemesocycles.
-
Exercise: A single training technique executed during a workout. Anexerciseexists outside ofprograms, and is instead included in one or moreworkoutsof aprogram.
The app code is organized by a few high-level folders. Idea is to mostly fit into an MVC framework, with a couple extra bits:
components/: For general components not specific to a part of the app. A bit like base classes for view components.controller/: For classes implementing the bulk of the logic for operations in the app.fonts/: This came with the starter code, guess it's where font files go.model/: For classes representing the underlying data models in the app. Mostly dumb structs.pages/: For the different pages of the app, and navigation between them. Kind of like dumb structs wrapping view components together.view/: For components that display models, and bind functionality from controllers.utils.js: For random utility functions used across parts of the code.
Below are details of what we have in each of the model-view-controller folders.
There are classes to represent each of the key members of the hierarchy listed in App Organization:
ProgramMesocyleWeekWorkoutSetScheduleExercise
Each of these can exist as a template, or an instance. An instance can be planned, active, or completed. The state affects how the class is displayed. For example, a planned workout shows up in the future schedule. An active workout is shown in the active workout view. A completed workout shows up in the history view or in the past schedule.