work details

SportoFlow — AI-Assisted Personal Longevity Platform

A multi-tenant SaaS combining exercise, nutrition, sleep, supplement and biomarker tracking with a human-approved knowledge engine and an AI coach.

Client

SportoFlow

Start

02 May 2026

Completed

SportoFlow homepage: empower your healthy life with AI
Description

A multi-tenant SaaS combining exercise, nutrition, sleep, supplement and biomarker tracking with a human-approved knowledge engine and an AI coach.

Case study

Challenge

Longevity knowledge is scattered across podcasts, newsletters and papers, and users cannot connect it to their own blood markers and training data. In a product handling health data, the source, evidence level and approver of every recommendation had to be visible.

Approach

We built a knowledge engine that turns sources into evidence-graded claims and publishes nothing without editorial approval. Training plans are produced by a rule-based engine and checker rather than a language model; AI only explains and translates constraints. Coach and physician access is tied to revocable relationships approved by the athlete.

Outcome

SportoFlow is live at sportoflow.com, with the knowledge, biomarker, training, protocol, nutrition, supplement, sleep and expert network modules complete in code and covered by automated tests. Device provider approvals, live payments and the mobile app are the next steps.

Tools

Next.js 16, React 19, TypeScript, Shadcn UI, React Query, Bun, Fastify, Drizzle ORM, MySQL, Zod, Stripe

Key Features
  • Sourced, evidence-graded, editor-approved knowledge engine

  • Collectors for PubMed, ClinicalTrials.gov, RSS, podcasts, YouTube

  • 60+ biomarkers, PDF/OCR lab import and PhenoAge score

  • Rule-checked training engine with 8 sport plugins

  • ACWR, 10% volume cap and deload rules

  • Versioned protocols, notices only to affected users

  • TürKomp/USDA nutrition and a 30+ item supplement catalogue

  • Consent-based coach/physician access, bookings, video calls

  • In-browser camera rep counting and form check

Technologies Used
  • Next.js 16

  • React 19

  • TypeScript

  • Shadcn UI

  • React Query

  • Bun

  • Fastify

  • Drizzle ORM

  • MySQL

  • Zod

  • Stripe

Design Highlights
  • AI drafts, humans approve: source and evidence badges on every recommendation

  • Scores work with partial data and show what is missing and how to add it

  • Clear medical boundaries: “an estimate, not a diagnosis” and physician-approved badges

  • Camera frames stay on the device; pose model self-hosted, no third-party CDN

  • Turkish interface; AI explanations and newsletter in Turkish and English

Details

SportoFlow is a longevity operating system for people who want to turn a long, healthy life into a measurable goal, and for the coaches, dietitians and physicians who work with them. It brings scientific publications, blood test results, device measurements and daily habits into a single dashboard. The guiding principle is simple: AI drafts, humans decide.

Context and need

Longevity knowledge is scattered across podcasts, newsletters, YouTube channels and peer-reviewed papers. Users cannot connect it to their own blood markers, training history or sleep data, and most existing apps focus on either exercise or nutrition alone. A product that handles health data faces a second challenge: trust. Every recommendation has to show which source it is based on, how strong the evidence is and who approved it. SportoFlow was designed around both needs — sourced knowledge and personal data in one place, with every recommendation traceable.

Solution and scope

Human-reviewed knowledge engine

Curated sources are collected on a schedule via RSS, podcasts, YouTube, email newsletters, PubMed and ClinicalTrials.gov. Audio is transcribed with Whisper, and structured claims are extracted from the text: intervention, dose, population, outcome, direction of effect and evidence level (meta-analysis, RCT, cohort, mechanistic, expert opinion, n=1). When a new claim contradicts an approved one on the same topic, both are automatically flagged as disputed. No claim reaches users without editorial approval, and for copyright reasons only a summary and a short excerpt are shown, never the full text.

Biomarker tracking and longevity score

Users can enter lab results manually or upload a PDF. The system reads the PDF's text layer first and falls back to reading the table from the image; the varying names used by Turkish laboratories are mapped to the catalogue through an alias dictionary. Extracted values are only stored after the user confirms them. The catalogue defines more than 60 biomarkers with normal and optimal ranges. A biological age estimate based on the PhenoAge formula and a VO2max-based fitness age are calculated; if inputs are missing, the score is still produced, but the interface states clearly which values are missing and how to obtain them.

Deterministic training engine

Training plans are not written by a language model; they are generated by rules. Separate plugins cover running (VDOT), cycling (FTP), swimming (CSS), triathlon, strength (%1RM), hypertrophy, HIIT and mobility. A rule checker caps weekly volume increases at 10%, keeps the acute-to-chronic workload ratio (ACWR) between 0.8 and 1.3, applies a 3:1 loading-to-deload cycle and stops plan generation if a medical flag has been declared. AI only explains sessions and turns free text such as “I'm away two days this week” into structured constraints — it cannot change the plan structure. Completed, partial and missed sessions recalculate the following week, and plans can be exported as ICS and FIT files.

Protocols, nutrition, supplements and sleep

Eight platform protocols are kept under version control. Only meta-analysis, RCT and cohort-level claims can change a protocol's targets; when a change is approved, only users who have adopted that protocol are notified. The nutrition module offers food search based on TürKomp and USDA data, meal logging from free text and a daily protein/calorie/fibre ring. The supplement catalogue contains more than 30 items with interaction warnings and “consult your physician” flags. When HRV drops clearly below its seven-day average, the sleep pillar automatically eases that day's high-intensity session.

AI coach and camera-based form check

The AI coach receives the user's active protocols, latest biomarker summary and last seven days of logs as context, bases its answers solely on approved claims and shows source links. For exercises in the movement library, pose estimation running in the browser counts repetitions and flags form errors in real time; images and body landmarks are never sent to the server.

Coach, physician and expert layer

The same platform serves individuals, coaches and clinics. Expert profiles are not activated without document verification. Coaches and physicians only see data through a consent relationship whose scope the athlete chooses and can revoke at any time; every access is logged. The coach role cannot reach biomarker interpretation or dosage endpoints. For red flags such as being under 18, pregnancy or a declared heart condition, a plan cannot be published without physician approval, and the approval lapses as soon as the target moves to a new version. An expert directory, availability calendar, appointments, messaging, LiveKit voice and video calls (recording off by default), commission and payout flows complete this layer.

Admin panel

Superadmins and editors manage knowledge sources and their sync status, the claim review queue (with keyboard shortcuts for bulk approval and rejection), the biomarker catalogue and the source claims behind optimal ranges, protocol versions, the movement library, the service catalogue, tenants, plans and usage credits. An optimal range without a linked source is labelled “source pending” and does not generate recommendations.

Technical architecture

The backend runs Fastify 5 on Bun with Drizzle ORM and MySQL; the dashboard is built with Next.js 16, React 19, Shadcn UI and React Query. Collection, transcription and OCR jobs run in Redis-backed BullMQ queues, while weekly re-planning and the newsletter run as scheduled jobs. In the multi-tenant model every personal table is scoped by tenant and user key, and a tenant-scope guard enforcing this is part of the quality gate. Language model providers (Claude, OpenAI, Groq) sit behind a single layer; the model is chosen according to source reliability, tokens and cost are metered per tenant, and the queue stops if the daily cost cap is reached. The interface is in Turkish; claim extraction, AI explanations and the newsletter are produced in Turkish and English. Public pages ship with Organization, WebSite and SoftwareApplication structured data, a sitemap and llms.txt.

Integrations and security

  • Devices: a user-specific, write-only bridge key for Apple Health; FIT file import; adapters for Strava, Withings, Oura and WHOOP are built and will be activated once provider approvals are in place.
  • Payments: Stripe checkout and webhook handling are implemented fail-closed and go live once production keys are configured.
  • Sportoonline: account linking and order sync with the sister e-commerce store; device, lab package and service orders become the corresponding records in the dashboard. Product suggestions never use health data for targeting.
  • Security: no default values for secrets, encrypted device tokens, MIME and file-signature checks on uploads, SSRF protection for media downloads and a GDPR/KVKK erasure chain that deletes database records and files together.

Today

SportoFlow is live at sportoflow.com. The knowledge engine, biomarker, training, protocol, nutrition, supplement, sleep, coach/physician and expert network modules are complete in code and protected by automated tests. The remaining items depend on external gates: developer approvals from device providers, a live payment account, a legal opinion on telemedicine, and an Expo-based mobile app as the planned next step.