Skip to content
Architecture

Architecture

Stack

LayerChoiceWhy
App shellTauri 2One small native app for Linux and macOS
UIReact + TypeScript (Vite), hand-written SVG chartsRich timeline and drag-and-drop; charts follow one validated palette in light and dark
Domain logicPure TypeScript (src/domain/)Load model, VDOT, plan, week generation, checks: testable without the UI
StorageRust + SQLiteLocal, transactional, validated
WorkoutsGarmin’s official FIT SDK (pinned)Files the watch accepts

Data flow

    flowchart TB
  subgraph Rust
    DB[(SQLite)]
    V[Validation<br/>Monday weeks, plausible results]
    G[Garmin client<br/>activities · files · health]
  end
  subgraph TypeScript
    D[Domain<br/>load · VDOT · plan · weeks · checks]
    UI[Views<br/>Where I stand · Macro · Season · Week]
  end
  UI -- actions --> D
  UI -- commands --> V --> DB
  GC((Garmin Connect)) -. sync .-> G --> DB
  DB -- plan, activities, edits, tests --> UI
  
  • Plans are stored, weeks are generated. Blocks, races, goals and the commute live in the database; each week’s sessions are generated from them, and only your per-week edits are stored. Change a block and every untouched week follows.
  • One JSON shape for TypeScript and Rust; contract fixtures written by the TypeScript tests are read by the Rust tests, so the two can’t drift apart.
  • App-wide undo: every change is recorded as a before → after pair and can be reverted.

Offline and private

No telemetry, no account, no Kinethos server. Data lives in the OS app-data folder. The only network access is Garmin sync: your own data, fetched with your own personal API key, when you sync (and briefly at start-up, unless you turn it off). See Privacy.

Quality

  • ~500 TypeScript tests and Rust unit + contract tests, run on every step.
  • Workout files are encoded and decoded back with the FIT SDK and must pass its integrity check.
  • Every interface change is checked on real screenshots before it ships.
Last updated on