Skip to content

Examples Overview

Browse example files to understand how openweight data is structured.

Example Categories

CategoryDescription
Workout LogsCompleted workout sessions
TemplatesPlanned workout prescriptions
ProgramsMulti-week training programs
Personal RecordsPersonal records and 1RM exports

Progression

The examples are organized from simple to complex:

  1. Minimal — The smallest valid file, showing only required fields
  2. Simple — Typical real-world usage
  3. Full-featured — All fields and advanced features

Using Examples

Validate Locally

Clone the repository and run validation:

bash
git clone https://github.com/radupana/openweight.git
cd openweight
npm install
npm run validate-examples

Parse with SDK

typescript
import {parseWorkoutLog} from '@openweight/sdk'
import fs from 'fs'

const json = fs.readFileSync('examples/workout-logs/minimal.json', 'utf-8')
const workout = parseWorkoutLog(json)

Raw Files

All example files are available in the repository:

Released under the Apache 2.0 License.