lift-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev f9f4e37d6945
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 23e397d8a5d5bf7756362640
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
policy.json
{
  "auth": {
    "anonymous": true
  },
  "constants": {
    "AGENT_ADDRESS": "2vN1CsySQMyJtDmXccDXUHXVyNnDr2irQyacnEnVpaY2",
    "AGENT_ADDRESS_BOUND": true,
    "PROFILE_MAX": 300000,
    "ROUTINE_MAX": 50000,
    "WORKOUT_MAX": 200000
  },
  "lifters/$userId": {
    "description": "A lifter's settings (units, rest timer, sound), their own exercises and their body weight log, as one JSON string. Only that person can read or write it. The device keeps the same data, so Lift works offline.",
    "fields": {
      "data": "String"
    },
    "rules": {
      "read": "@user.id != null && @user.id == $userId",
      "create": "@user.id != null && @user.id == $userId && @StringUtils.length(@newData.data) <= @const.PROFILE_MAX",
      "update": "@user.id != null && @user.id == $userId && @StringUtils.length(@newData.data) <= @const.PROFILE_MAX",
      "delete": "false"
    }
  },
  "lifters/$userId/routines/$routineId": {
    "description": "One routine (exercises, sets, rep targets, warm-ups, rest, supersets) as a JSON string, and the server time it was written (at, never later than now), so other devices read only what changed. Only that person can read or write it. A deleted routine stays as a small marker so another device does not bring it back. Shared routine links carry the routine in the URL and never read this.",
    "fields": {
      "data": "String",
      "at": "UInt"
    },
    "rules": {
      "read": "@user.id != null && @user.id == $userId",
      "create": "@user.id != null && @user.id == $userId && @StringUtils.length($routineId) >= 6 && @StringUtils.length($routineId) <= 32 && @newData.at <= @time.now && @StringUtils.length(@newData.data) <= @const.ROUTINE_MAX",
      "update": "@user.id != null && @user.id == $userId && @newData.at <= @time.now && @StringUtils.length(@newData.data) <= @const.ROUTINE_MAX",
      "delete": "false"
    }
  },
  "lifters/$userId/workouts/$workoutId": {
    "description": "One finished workout with every set and note as a JSON string, and the server time it was written (at, never later than now), so other devices read only what changed. Only that person can read or write it. A deleted workout stays as a small marker so another device does not bring it back. The workout in progress stays on the device until it is finished.",
    "fields": {
      "data": "String",
      "at": "UInt"
    },
    "rules": {
      "read": "@user.id != null && @user.id == $userId",
      "create": "@user.id != null && @user.id == $userId && @StringUtils.length($workoutId) >= 6 && @StringUtils.length($workoutId) <= 32 && @newData.at <= @time.now && @StringUtils.length(@newData.data) <= @const.WORKOUT_MAX",
      "update": "@user.id != null && @user.id == $userId && @newData.at <= @time.now && @StringUtils.length(@newData.data) <= @const.WORKOUT_MAX",
      "delete": "false"
    }
  }
}

Change history

Point OpenApps store links to openapps.free
f9f4e37d69 · 17 hours ago
Add favicon.ico, local share image and openapi.json for links and guides
2796c0063c · 17 hours ago
Bind agent address in policy constants
cf80a3ca66 · 19 hours ago
Add OpenApp contribution strip and OpenApps source links
5e4cc2b9f3 · 19 hours ago
Bounded source sync
ca4a3d3631 · 1 day ago
Bounded source sync
7351063f4d · 1 day ago
Bounded source sync
0ce3238c46 · 1 day ago