Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
linenumberstrue
{
  "config": { // All clients listen here permanently
    "articleBaseUrl": "http://cloud-storage.com/articles/"
  },
  "users": {
    "user_id_01": { // Clients listen here permanently
      "username": "user",
      "email": "user@somewhere.com",
      "fitnessLevel": 10,
      "fitnessBias": 1,
      "created": 987654345, // Unix timestamp (seconds)
      "maxImpactCredit": 3,
      "impactCredit": 0.9,
      "updatedIC": 987654345, // Unix timestamp (seconds)
      "apnIds": []
    }
  },
  "visibleWorkoutDefs": { // Workout defs that are visible to the user
    "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "wktdef1": {
        "recommended": "", // Not recommended, just visible
		"locked": true,
		"lockString": "Finish 6 more workouts in the next 6 days",
        "MWI": 0.54,
        "breakdown": {
          "epoc": 0.1,
          "cardio": 0.1,
          "metabolic": 0.1,
          "strength": 0.1
        }
      },
      "wktdef2": {
        "recommended": "You need to work on your abs", // Recommended and reason for this to be shown to user
		"locked": false,
		"lockString": "",
        "MWI": 0.54,
        "breakdown": {
          "epoc": 0.1,
          "cardio": 0.1,
          "metabolic": 0.1,
          "strength": 0.1
        }
      }
    }
  },
  "workouts": {
    "activities": {
      "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
        "workout_id_01": { // Clients post new activity to here with auto id, server listens
          "workoutDefId": "wktdef1",
          "finish": 987654345, // Unix timestamp (seconds)
          "exertion": 0.5,
          "finalHeartRateBPM": 160,
          "finalHeartRateDelay": 0 // Length of delay (in secs) after the workout before the HR was measured (0 if they didn't press the 'start again' button)
        }
      }
    },
    "results": {
      "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
        "workout_id_01": { // Server posts workout results here
          "workoutDefId": "wktdef1",
          "finish": 987654345, // Unix timestamp (seconds)
          "AWI": 0.1,
          "responseDuration": 3456,
          "intensity": 0.9,
          "responses": {
            "cardio": {
              "stress": 43,
              "magnitudeProduct": 0.6,
              "halflifeProduct": 0.3,
              "duration": 5678,
              "volume": 3456
            },
            "strength": {
              "stress": 43,
              "magnitudeProduct": 0.6,
              "halflifeProduct": 0.3,
              "duration": 5678,
              "volume": 3456
            },
            "epoc": {
              "stress": 43,
              "magnitudeProduct": 0.6,
              "halflifeProduct": 0.3,
              "duration": 5678,
              "volume": 3456
            },
            "metabolic": {
              "stress": 43,
              "magnitudeProduct": 0.6,
              "halflifeProduct": 0.3,
              "duration": 5678,
              "volume": 3456
            }
          },
          "muscleGroups": {
            "upper": 0.3,
            "lower": 0.3,
            "core": 0.4
          }
        }
      }
    }
  },
  "afterburn": {
    "user_id_01": { // Clients listen here permanently
      "start": 345678987, // Unix timestamp (seconds)
      "response": {
        "resolution": 600, // Secs
        "epoc": [0.6,0.5,0.3,0.2,0.1,0.0],
        "cardio": [0.6,0.5,0.3,0.2,0.1,0.0],
        "strength": [0.6,0.5,0.3,0.2,0.1,0.0],
        "metabolic": [0.6,0.5,0.3,0.2,0.1,0.0]
      },
      "impactCredit": {
        "resolution": 600, // Secs
        "futureCredit": 0.9,
        "pending": [0.0,0.1,0.2,0.3,0.4,0.5]
      },
      "messages": [ // Messages displayed below the radar chart
        {"t":0,"body":"Restoring body temperature", "detail": ""},
        {"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
      ],
      "notifications": [
        {"t":6000,"body":"Great workout! You're still burning calories and building strength."},
        {"t":14400,"body":"Fitness test unlocked! You're ready to take another fitness test."}
      ]
    }
  },
  "timelineArticles": {
    "user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "article_id_01": {
        "date": 4567890987, // Unix timestamp (seconds)
        "title": "Post title",
        "read": false,
        "location": "post/location.html"
      }
    }
  },
  "definitions": {
	"version": 1,
    "exerciseDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "exdef1": {
        "behaviour": 1,
        "title": "Cruches",
        "video": "01-Crunches.mp4",
        "image": "abs",
        "desc": "A crunch begins with lying face up on the floor with knees bent. The movement begins by curling the shoulders towards the pelvis. The hands can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands.",
        "subtitle": "Target your abs for a balanced set of stomach muscles.",
        "calPerSec": 5,
        "skill": 0.2,
        "strength": 0.7,
        "cardio": 0.1,
        "epoc": 0.4,
        "metabolic": 0.4,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef2": {
        "behaviour": 1,
        "title": "Squats",
        "video": "02-Squats.mp4",
        "image": "abs",
        "desc": "Squats are an excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks.",
        "subtitle": "Train your lower body and core.",
        "calPerSec": 4,
        "skill": 0.2,
        "strength": 0.6,
        "cardio": 0.3,
        "epoc": 0.4,
        "metabolic": 0.6,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef3": {
        "behaviour": 1,
        "title": "Planks",
        "video": "03-Plank.mp4",
        "image": "abs",
        "desc": "The plank helps you to build strength in your core, upper and lower body so its a good full body work out. You do not need any equipment to perform this exercise all you need is a bit of space, and it really helps improve flexibility by stretching muscles and will improve posture if performed regularly.",
        "subtitle": "Work out your core muscles.",
        "calPerSec": 6,
        "skill": 0.3,
        "strength": 0.5,
        "cardio": 0.2,
        "epoc": 0.4,
        "metabolic": 0.4,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef4": {
        "behaviour": 1,
        "title": "Push Ups",
        "video": "04-PushUps.mp4",
        "image": "abs",
        "desc": "The push up is a great muscle toning exercise for the arms, chest, triceps and the front of the shoulders, whether performed on the knees or toes this is a good strength building exercise that can be performed anywhere.",
        "subtitle": "Train your upper body.",
        "calPerSec": 3,
        "skill": 0.1,
        "strength": 0.8,
        "cardio": 0.2,
        "epoc": 0.6,
        "metabolic": 0.6,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef5": {
        "behaviour": 1,
        "title": "Side Plank",
        "video": "06-SidePlank.mp4",
        "image": "abs",
        "desc": "The side plank helps you to build strength in your core, upper and lower body so its a good full body work out. It helps improve flexibility by stretching muscles and will improve posture if performed regularly.",
        "subtitle": "Target your abs for a balanced set of stomach muscles.",
        "calPerSec": 5,
        "strength": 0.7,
        "cardio": 0.2,
        "epoc": 0.5,
        "metabolic": 0.5,
        "skill": 0.2,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef6": {
        "behaviour": 1,
        "title": "Jumping Jacks",
        "video": "33-JumpingJack.mp4",
        "image": "abs",
        "desc": "Jumping Jacks are the original circuit training exercise that evenly targets your muscle groups to elicit a strong cardiovascular response.",
        "subtitle": "Get those heart muscles jumping!",
        "calPerSec": 6,
        "strength": 0.1,
        "cardio": 0.8,
        "metabolic": 0.6,
        "epoc": 0.6,
        "skill": 0.1,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      },
      "exdef7": {
        "behaviour": 1,
        "title": "Burpees",
        "video": "42-Burps.mp4",
        "image": "abs",
        "desc": "Burpees are a full body exercise which work virtually every muscle in the body, this means that you can burn more calories in a lot less time.",
        "subtitle": "Burpees are tough but well worth your time.",
        "calPerSec": 6,
        "strength": 0.2,
        "cardio": 0.9,
        "metabolic": 0.6,
        "epoc": 0.6,
        "skill": 0.3,
        "upper": 0.5,
        "core": 0.5,
        "lower": 0.5
      }
    },
    "workoutDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
      "wktdef1": {
        "type": 1,
        "title": "Aerobic",
        "image": "abs",
        "desc": "Aerobic Basic Movement",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef1",
            "duration": 20
          },
          {
            "id": "exdef2",
            "duration": 15
          },
          {
            "id": "exdef3",
            "duration": 10
          },
          {
            "id": "exdef4",
            "duration": 5
          },
          {
            "id": "exdef5",
            "duration": 10
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef2": {
        "type": 1,
        "title": "Thai Boxing",
        "image": "abs",
        "desc": "Boxing With Kicking",
        "breakDuration": 4,
        "exercises": [
          {
            "id": "exdef5",
            "duration": 15
          },
          {
            "id": "exdef3",
            "duration": 10
          },
          {
            "id": "exdef1",
            "duration": 5
          }
        ],
        "stress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef3": {
        "type": 1,
        "title": "Silat",
        "image": "abs",
        "desc": "Traditional Martial Arts",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef4",
            "duration": 5
          },
          {
            "id": "exdef5",
            "duration": 10
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef4": {
        "type": 1,
        "title": "OCD",
        "image": "abs",
        "desc": "Modern Exercise",
        "breakDuration": 6,
        "exercises": [
          {
            "id": "exdef3",
            "duration": 20
          },
          {
            "id": "exdef2",
            "duration": 15
          },
          {
            "id": "exdef4",
            "duration": 5
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef5": {
        "type": 1,
        "title": "Warming Up",
        "image": "abs",
        "desc": "Basic",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef2",
            "duration": 20
          },
          {
            "id": "exdef2",
            "duration": 15
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef6": {
        "type": 1,
        "title": "6 Min Strength",
        "image": "abs",
        "desc": "Quick workout that targets strength building, increasing your restimng metabilic rate.",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef1",
            "duration": 55
          },
          {
            "id": "exdef4",
            "duration": 55
          },
          {
            "id": "exdef5",
            "duration": 55
          },
          {
            "id": "exdef1",
            "duration": 55
          },
          {
            "id": "exdef4",
            "duration": 55
          },
          {
            "id": "exdef5",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef7": {
        "type": 1,
        "title": "6 Min Cardio",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          },
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          },
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef8": {
        "type": 1,
        "title": "2 Min Cardio Blast",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      },
      "wktdef9": {
        "type": 1,
        "title": "2 Min Cardio Blast 2x",
        "image": "abs",
        "desc": "Short workout that pushes your cardiovascular system to burn fat now and for the next 24 hours.",
        "breakDuration": 5,
        "exercises": [
          {
            "id": "exdef6",
            "duration": 55
          },
          {
            "id": "exdef7",
            "duration": 55
          }
        ],
        "adaptiveStress": {
          "strength": 0.2,
          "cardio": 0.9,
          "metabolic": 0.6,
          "epoc": 0.6
        },
        "muscleStress": {
          "upper": 10,
          "lower": 10,
          "core": 10
        }
      }
    }
  }
}

...