vaha_
EN English
← Index No. 20 / 21

Case file · Own app · fitness

Teretana

Gym tracker

My own training tracker, not a fork: Rust axum and rusqlite in a single binary, with a frontend of plain ES modules and no build step. A catalogue of 1324 exercises with animated loops and a muscle map, sessions with sets and weights, history per muscle group and a plan generator. Sign-in uses an email code and Cloudflare Turnstile, with data separated per user.

Field
Own app · fitness
Years
2026 → present
State
live
System
Web
Teretana — Gym tracker
Screenshot · No. 20 Teretana — exercise catalogue, muscle map and set history.

What it does

01 / 09
  1. A catalogue of 1324 exercises with animations, imported by script, muscle groups in Serbian
  2. GIFs converted to ping-pong MP4: six to ten times smaller, and the loop is smooth
  3. A muscle map as SVG, with history, best weights and a "not tried yet" state
  4. Sessions, sets and reps, computed volume and a calorie estimate
  5. A plan generator: the three most-trained groups plus new ones to fill in
  6. Sign-in: email code (six digits, ten minutes, attempt limit) and Turnstile
  7. Per-user data isolation on every query, 30-day sessions
  8. A frontend with no build step, View Transitions, and only content animated
  9. Cache rules per type: API no-store, HTML revalidated, media immutable

Layers

02 / 03

Backend — Rust

axumrusqliteargon2migrations
  • One binary, a SQLite store with migrations in code
  • Every data route filters by the signed-in user
  • The sign-in code is stored hashed, never in clear text
  • Caching and headers in a single middleware layer

Interface

ES modulesView TransitionsSVG
  • A set of tabs: Today, Exercises, Muscles, Plan, Profile
  • Only the content animates, the fixed tab bar never jumps
  • The muscle map is generated from geometry, not hand-drawn
  • Details: a sheet that does not jump, stagger capped at ten elements

Data and media

PythonffmpegSQLite
  • Catalogue and media imported once by script, repeatable
  • HD video goes through faststart, otherwise the browser waits for the whole file
  • Video matched to an exercise by exact name only, no guessing
  • Calories are an estimate: MET per set, duration clamped

Technologies

03 / 03
Languages RustJavaScriptPythonSQL 04
Frameworks & tools axumrusqliteargon2TurnstileView Transitionsffmpeg 06
Infrastructure nplpa-vpssystemdCaddy 03

Every system on file

Back to the index →