Portable fitness, nutrition, and health data.
FitData is a vendor-neutral specification, JSON Schema family, and TypeScript SDK for training, wearables, sleep, nutrition, and laboratory records. One uniform domain.noun entity model—built for apps, pipelines, and AI agents.
{
"kind": "training.routine",
"id": "example:five-minute-climb",
"version": "1",
"sport": "fitdata:indoor_cycling",
"name": "Five-minute climb",
"structure": {
"kind": "timeline",
"durationSeconds": 300,
"segments": [
{
"id": "climb",
"startSeconds": 0,
"endSeconds": 300,
"targets": [
{
"metric": "fitdata:power",
"target": {
"kind": "ramp",
"basis": "fitdata:ftp",
"unit": "%",
"start": 70,
"end": 85,
"interpolation": "linear"
}
}
]
}
],
"cues": [
{ "atSeconds": 0, "posture": "seated", "text": "Start seated." },
{ "atSeconds": 180, "posture": "standing", "text": "Stand for the final two minutes." }
]
}
}Four independent domains. One unified document.
Import a standalone domain package or compose every record kind in a single JSON/JSONL FitData document with closed reference validation.
Core & Wearables
@fitdata/coreOptional-ownership envelopes, exact decimal strings, UCUM unit conversions, provenance, time variants, and cross-domain records.
core.measurementcore.seriescore.summarycore.tombstonesleep.sessionTraining
@fitdata/trainingStep-based strength routines, timed class timelines with linear ramps and cues, wearable or structured workouts, and performance thresholds.
training.routinetraining.workouttraining.thresholdNutrition
@fitdata/nutritionVersioned foods and nutrients, immutable historical intake snapshots, serving conversions, exact meal revisions, and nutrition goals.
nutrition.foodnutrition.nutrientnutrition.intakenutrition.mealnutrition.goalLaboratory & Biomarkers
@fitdata/labBiomarkers, assays, specimens, censored/qualitative/missing results, result-owned ranges, closed reports, and a 55-biomarker / 87-test LOINC registry.
lab.biomarkerlab.testlab.specimenlab.resultlab.reportStrict where correctness matters. Flexible where apps differ.
Entities first, ownership optional
Standalone records require only kind and id. Multi-user and audit guarantees are enforced cleanly through document profiles, not mandatory user IDs on every reusable routine or food.
Separate version & revision lifecycles
Reusable definitions (routines, foods, lab tests) use string versions. Personal events (workouts, intakes, lab results) use integer revisions with deterministic tombstone history.
JSON Schema + semantic validation
Every package ships Draft 2020-12 JSON Schema for structure alongside TypeScript validators checking units, timelines, recalculated nutrition snapshots, and closed reference graphs.
Offline mappers with source residue
Seven pure, offline adapters normalize Strava, Garmin, Convex Wearables, and CLIPIN payloads while preserving original source JSON and stripping known credential keys.
Generated JSON Schemas and LLM-ready spec bundles
Download Draft 2020-12 JSON Schemas generated directly from the workspace Zod definitions, browse the canonical LOINC registry, or feed /llms.txt to your coding agent.