Zum Inhalt springen
stackschmiede.de
DE
2026 health Live

stack-fitness — Training & Health Cockpit with AI Coach

Data-driven road cycling: a dashboard + aggregating API around intervals.icu. Fitness model (CTL/ATL/TSB), power analysis, structured workouts on the Garmin Edge and a coaching layer for the 3motibot assistant.

Year
2026
Duration
In active development since 2026
Role
Concept, full-stack development, deployment (solo, AI-augmented)
Sector
health
Tech stack
SvelteKit · Svelte 5 (Runes)Hono · TypeScript (BFF API)PostgreSQL 16 · Drizzle ORMRedis (cache)ECharts · uPlot (charts & 1 Hz streams)Monorepo · pnpm · TurborepoDocker Compose · nginx (Hetzner DE)intervals.icu API (source of truth)

In active development. A personal project that turns training data into clarity — and doubles as a playground for data-driven AI coaching.

What is it?

intervals.icu is an excellent training-analysis platform — but I wanted to replace its web UI for daily use with a focused cockpit of my own that answers exactly my questions: How is my form today? Am I recovered? What should I train?

stack-fitness is that cockpit. Importantly, it does not reimplement a fitness model. intervals.icu stays the engine — source of truth for CTL/ATL/TSB and the Garmin sync hub — while stack-fitness is the UI and orchestration around it. On top sits an aggregating API that gives my AI assistant 3motibot everything it needs for coaching decisions in a single call, instead of many separate data requests.

Three things that define stack-fitness

Form at a glance The briefing shows the three numbers that matter: form (TSB) as a traffic light, HRV recovery status and sleep — plus automatic coach hints (e.g. “FTP stale” or “ramp rate too high”). Below that, the full Performance Management Chart and the power curves of every ride.

Structured workouts on the Garmin Edge From a template library (Coggan zones: GA1, sweet-spot, threshold, VO2max, over-unders, FTP test …) a concrete session is built, written as intervals.icu DSL and synced automatically to the Garmin Edge 1030 — the device then guides you through the intervals.

A coaching layer for the AI The /coach/workout-context API condenses the entire training history into a tiny JSON: three form numbers, the latest sessions in detail, weekly load, all-time power PRs, fueling targets and factual coaching flags. The 3motibot assistant uses it to give recommendations — grounded in real data, not guesses.

A look inside the dashboard

Technology

  • Monorepo — pnpm workspaces + Turborepo, TypeScript throughout, shared Zod schemas across API, web and 3motibot (no schema drift)
  • API (BFF) — Hono + @hono/zod-openapi, Drizzle ORM on PostgreSQL 16, Redis cache; aggregates and normalizes intervals.icu into a stable schema
  • Durable data mirror — PG rollup of daily PMC values + ride summaries; the coach context reads from the mirror instead of live → ~1–3 KB JSON, token-efficient
  • Web — SvelteKit (Svelte 5 Runes) + Tailwind, ECharts for management charts, uPlot for 1 Hz power/HR streams; installable as a PWA (offline app shell)
  • Deployment — Docker Compose (PG + Redis, bound to 127.0.0.1) behind nginx on a Hetzner server (DE), TLS via Let’s Encrypt
  • Security — dashboard owner-only behind WireGuard; the API owner-clamped with a bearer token; no third-party personal data

Status

Live and in active development at fitness.stackschmiede.de — the dashboard is deliberately owner-only (reachable over WireGuard), the API feeds the 3motibot coach. Built so far: form/PMC/ride analysis, profile and nutrition, structured workouts with Garmin sync, and the coaching context with FTP estimation, coaching flags and polarization analysis.

Next major step: a calendar / scheduling view that replaces intervals.icu as the primary surface for workout management too — weather- and calendar-aware planning through the 3motibot assistant.

Outcomes

  • Fitness cockpit: CTL/ATL/TSB form gauge, HRV, sleep and coach hints at a glance
  • Performance Management Chart (PMC) and power streams from real ride data
  • Structured workouts (Coggan templates) → intervals.icu → Garmin Edge 1030
  • Coach-context API: a tiny JSON with form, load, power PRs and fueling for the 3motibot coach
  • Coaching intelligence: FTP estimation, ramp-rate / fatigue flags, polarization check
  • Sports nutrition: logging, fueling targets (carbs/h, g/kg) and energy balance
  • Installable as a PWA, owner-only behind WireGuard
For your organisation

A data-driven dashboard for your domain?

Sport, health, industry or internal KPIs — I build aggregating APIs and clear dashboards that condense scattered data sources into decisions, with an optional AI coaching layer. EU hosting, no cloud lock-in.

Discuss a project