Examples Overview
Browse example files to understand how openweight data is structured.
Example Categories
| Category | Description |
|---|---|
| Workout Logs | Completed workout sessions |
| Templates | Planned workout prescriptions |
| Programs | Multi-week training programs |
| Personal Records | Personal records and 1RM exports |
Progression
The examples are organized from simple to complex:
- Minimal — The smallest valid file, showing only required fields
- Simple — Typical real-world usage
- 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-examplesParse 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: