Data Types

Complete reference for the core data model used throughout Coachbase. These types define the shape of data stored in Firestore and how entities relate to each other.

Athlete

Core athlete profile. The root entity from which all programs, sessions, and results hang.

idstring

Firestore document ID. Auto-generated on creation.

namestringrequired

Athlete full name. Used in search and display.

birthdateTimestamprequired

Date of birth as a Firestore Timestamp.

gender'male' | 'female' | 'other'optional

Used for adaptation parameters and menstruation tracking eligibility.

bodyWeightnumberoptional

Body weight in kilograms.

bodyHeightnumberoptional

Body height in centimeters.

trainingLevel'beginner' | 'intermediate' | 'advanced'required

Experience level — highest-impact generation parameter.

trainingGoalsstring[]optional

Selected training goals. Influences exercise selection and rep ranges.

trainingDaysPerWeeknumberoptional

Available training days per week.

teamIdstringrequired

Parent team this athlete belongs to.

createdAtTimestamp

Profile creation timestamp.

archivedboolean

When true, athlete is hidden from search and active views but data is preserved.


Program

A multi-week training plan belonging to an athlete. Contains sessions and generation configuration.

idstring

Firestore document ID.

athleteIdstringrequired

Reference to the parent athlete. Programs are athlete-specific.

namestringrequired

Display name of the program (e.g., "Summer Strength Block").

trainingTypeTrainingTyperequired

The training type — 'fullBody' | 'anteriorChain' | 'posteriorChain' | 'upperBody' | 'lowerBody' | 'agility' | 'endurance'

systemIdstringoptional

Reference to the training system used for session structure.

durationWeeksnumberrequired

Total program duration in weeks (1–16).

sessionsPerWeeknumberrequired

Sessions per week (1–7).

loadCapacity'low' | 'medium' | 'high'required

Overall volume target per session.

status'draft' | 'active' | 'paused' | 'completed'

Current lifecycle state of the program.


Training Session

A single workout day within a program. Contains an ordered list of exercises with parameters.

idstring

Firestore document ID.

programIdstringrequired

Parent program reference.

athleteIdstringrequired

Parent athlete reference (denormalized for query efficiency).

weekNumbernumberrequired

Which week within the program this session falls in (1-indexed).

sessionNumbernumberrequired

Which session within the week (1-indexed).

exercisesSessionExercise[]required

Ordered array of exercises in this session.

completedAtTimestamp | null

When the session was completed. null if not yet done.


InjuryFlag

An injury or monitoring condition attached to an athlete. Directly affects generation behavior.

idstring

Firestore document ID.

athleteIdstringrequired

Parent athlete.

bodyPartstringrequired

Affected body part. Matched against exercise bodyParts during generation.

severity'red' | 'yellow' | 'influence'required

Flag level — determines generation behavior.

descriptionstringoptional

Coaching notes on the injury.

activebooleanrequired

true = currently active. false = cleared/archived. Only active flags affect generation.

onsetDateTimestampoptional

When the injury began.

clearedAtTimestamp | null

When the flag was cleared. null if still active.


Result

Logged training result for an exercise within a session. Stored at the set level for precise progression calibration.

exerciseIdstringrequired

Exercise this result belongs to.

sessionIdstringrequired

Parent training session.

athleteIdstringrequired

Parent athlete (denormalized).

setsSetResult[]required

Array of individual set results. Each SetResult contains repsCompleted, load, loadUnit, and perceivedDifficulty.

completedAtTimestamprequired

When the exercise result was logged.


Exercise

An entry in the exercise library. Used by the generation engine to build sessions.

idstring

Firestore document ID.

namestringrequired

Exercise display name.

category'compound' | 'isolation' | 'plyometric' | 'cardio' | 'mobility' | 'corrective'required

Exercise category used in generation logic.

bodyPartsstring[]required

Targeted muscle groups. Cross-referenced against injury flags.

group'push' | 'pull' | 'legs' | 'core' | 'cardio'optional

Logical muscle group for pairing in training systems.