gym-craft

GymCraft

Main goal

The project was created mainly to better understand the SvelteKit metaframework and the OpenAI API. The running side extended it into training-load science (TRIMP / ACWR / monotony) and integrating with third-party fitness platforms like Garmin.

Problems solved

To bypass the Netlify serverless functions 10s timeout when calling the external OpenAI API, the application uses GymCraft - Proxy — an additional Express.js server.

Garmin Connect has no official public API and sits behind Cloudflare's WAF, which blocks ordinary HTTP clients. To access activity data reliably, GymCraft uses gymcraft-curl-cffi — a dedicated Python (Flask) microservice built on the garminconnect library together with curl_cffi, which impersonates a real browser's TLS fingerprint to get past the WAF. It exposes endpoints for authentication, activity lists, per-activity detail (normalized splits + downsampled sample series), and long-range progress summaries.

Tech stack

SvelteKit: A modern framework for building fast and high-performance fullstack web applications.

OpenAI API: For generating personalized fitness plans and running analysis.

Node.js: Backend runtime environment.

Vite: Build tool for optimized performance.

Prisma: ORM for communication with the database.

Python (Flask + curl_cffi): Microservice for Garmin Connect integration.

Skeleton: UI library.

Tailwind: Utility-first CSS framework.

Technologies & Tools

  • SvelteKit
  • Svelte
  • OpenAI API
  • Node.js
  • TailwindCSS
  • SkeletonUI