A Trackable is the definition of something you observe over time: your weight, how much water you drank, whether you took a pill, how you slept. It holds no data itself; each observation is an Entry. Everything logged over time is a trackable, whatever its domain: diet and exercise have no tables of their own, they are trackables whose fields point at items in a catalog (Catalog Entities), where the reusable definitions (a food, an exercise) live.

Three kinds

A trackable’s kind says where its value comes from. The trackable form offers the choice as Computation, and the trackables list’s Kind column calls the three trackable, derived trackable and tag.

kindin the appits value
directDirectthe Entries you log
derivedDerivedcomputed on read from a formula over other trackables, never stored (Derived Trackables)
noneTagnone: it organises trackables and other tags (Tags)

Only a tag holds members. A trackable can be a member of any number of tags, a direct or a derived one alike, but neither of those can hold members, and a tag that holds members cannot be turned into either (canContain in packages/core/src/trackable-invariants.ts, asserted on both write paths).

What a definition holds

A trackable is one row of the trackable table (packages/core/src/schema.ts), read through the trackable repository as a Trackable:

  • name, description and colour. The colour is a column of its own rather than part of its presentation.
  • its fields (value_schema): what each entry holds, a number, a choice, a yes or no, an interval, an item from a catalog, or several of these at once; a trackable logged with no value has none (Value Types).
  • its own Reading (aggregation): how a day of its entries folds to one value, Sum, Last, Any and the rest (Readings). A direct trackable’s is set from its kind (defaultAggregation: a number or an interval is a Sum, a time of day a Mean, a record a Count, anything else a Last) or by the module that made it, and kept after that; the form does not ask for it, and a page or card that reads it another way keeps that on its visualization. A derived trackable’s is worked out from its formula on every read (formulaReduce), so it cannot drift from it.
  • how it is logged (capture): quick-add amounts, Prefill, what a day with nothing logged means, computed fills, whether its entries hold others (Capture Model).
  • how it looks (presentation, and its options in trackable_option): option labels and colours, the words for yes and no, a tag’s Exclusive, record summaries (Presentation Layer).
  • Whole day (time_granularity): its entries keep their day and no time (Whole day).
  • a derived trackable’s formula (derived_spec).
  • the module that made it, if one did, its role there, and whether it was made yours by an unsafe change, so the module can find it again and offer its updates (Modules).
  • visibility (private | protected | public), reserved for sharing and read by nothing.

Its zones and its visualizations are rows of their own, loaded with it and reaching the renderer as Trackable.zones and Trackable.visualizations (Zones, Visualizations). How each setting can be changed, and which changes reach entries already logged, is in Trackable Authoring Flow.

Examples

  • Weight: a number measuring mass, stored in grams and shown in the unit you prefer, read by Last, limited to 40 to 200 kg.
  • Water: a whole number of glasses, read by Sum, with quick-add amounts 1, 2 and 8.
  • Energy: options in order (Drained, Low, Fine, Charged) coded 1 to 4 and read by Last.
  • Headache: derived, the Sum of the severity of the day’s Symptoms entries whose symptom is Headache.
  • Diet: a record whose Food field picks an item of the Food catalog and carries how much of it was eaten; a day is read by Count, and Daily Calories, a derived trackable, sums what those amounts contained.
  • Sleep: an interval from Bedtime to Waketime, dated by its waketime and read as its length (Intervals).
  • Journal: logged with no value, so each entry is only when it happened; the Daily habits module reads it as Any.
  • Exercised: derived, Any over everything tagged Fitness, and Fitness’s summary.
  • Fitness: a tag.

Deleting one

Deleting a trackable deletes its entries, zones, achievements, options, templates, schedules, memberships and visualizations with it. Delete is at the bottom of the trackable’s edit page and nowhere else, in its own section below Save, saying what goes with it; the trackable’s page and its row in the list offer Log and Edit, so the actions used every day are never one slip from it. When entries go with it, or while their count is still loading, its name has to be typed before it deletes; with none, a plain confirm says nothing logged goes. There is no undo: a deleted trackable has no state to restore, and the delete syncs to every other device. An entry that was part of one of its routine’s entries stays, out of any routine, and a routine template’s line that logs it goes. One trackable is built in, the Inbox: it cannot be deleted, and it stays a direct text trackable.

Entry · Value Types · Readings · Tags · Derived Trackables · Trackable Authoring Flow · Data Model