Skip to content
LGLorenzo Gallone
All work

AI coach · PWA

Zitto e Corri

Personal project · 2026 – today

Training apps are good at recording runs and bad at changing the plan when life gets in the way. Zitto e Corri puts activity tracking, a rolling training plan and a conversational coach in one installable web app, with the model working inside clear boundaries.

Live app Source on GitHub Google sign-in, Italian UI

The app

Screens from the installed app (PWA) on a phone, with the author's own training data.

  • Zitto e Corri home with the next session, its intensity profile and the week at a glance
    Home: the next session with its intensity profile, the week at a glance and the coach.
  • Training plan towards a half marathon with phases and the current week
    A rolling plan towards the goal race, with training phases and what was done.
  • Coach chat in Zitto e Corri: the athlete asks to move a session and the coach answers and updates the plan
    The coach answers with the athlete's real data and updates the plan. Every reply shows tokens and cost.
  • AI analysis of a 13 km run with heart-rate zones and the coach's comment
    AI analysis of a run against the plan, with heart-rate zones and the cost of the call.
  • Profile with a readiness score of 83 computed from recovery and sleep
    Readiness from recovery and sleep, synced from the watch.
LLM providers, routed per task
2LLM providers, routed per task
automated tests
100+automated tests
of plan synced to the watch
7 daysof plan synced to the watch
How a coach suggestion reaches the plan
  1. Training data
  2. Context contract
  3. LLM
  4. Zod validation
  5. Proposal
  6. Athlete approves

AI as part of the architecture

  • Structured output only

    Every model call returns JSON against a schema and is validated with Zod before anything reaches the database. Free text is for the chat bubble, never for state.

  • Human in the loop

    The coach proposes new, moved or removed sessions and the athlete approves them. Actions on recorded runs, like excluding an aborted session, are reversible.

  • A typed context contract

    Athlete profile, training state, current plan, memories and recent evaluations are assembled into named sections, so each prompt carries what its task needs.

  • Model routing and cost tracking

    Chat and run analysis can use different models across Gemini and OpenRouter. Tokens and cost are recorded per call and summed per month.

Data and integrations

  • FIT and GPX imports with pace-coloured maps, splits, heart rate and training load.
  • Two-way Intervals.icu sync: runs, sleep and HRV come in; the next seven days of the plan go out as structured workouts on Amazfit watches.
  • Heat-adjusted target paces from the Open-Meteo forecast, and an import API secured by a personal key.

Engineering

Supabase Postgres with row-level security keeps each athlete's data separate. Scheduled jobs on Vercel run the daily and weekly syncs, web push handles reminders, and the core logic is covered by more than a hundred tests.

Stack

Next.jsTypeScriptSupabasePostgreSQLGeminiOpenRouterZodMapLibreWeb PushVercel Cron

Next projectTIGER