Skip to content
karim.semaan(open to work)
WorkExperienceAboutSkillsContactResume ↓
← All work
Gainz Trackerz preview
Generative AICompleted2025

Gainz Trackerz

GPT-4 nutrition + fitness tracker

Workout log · session volumeSynthetic preview · no real data

Synthetic preview. Runs in your browser; nothing is saved or sent anywhere. Cap: 10 sets per session.

Pick an exercise, set weight and reps, then press Add set. Each set adds weight × reps to the session volume and the chart.

Synthetic preview. No real data: exercises, weights and reps are illustrative and exist only on this page. The full app ships workout tracking as a dedicated service in its Docker Compose stack; source on GitHub.

Synthetic preview. Runs in your browser; no real user or workout data.

Gainz Trackerz is a full-stack fitness and nutrition tracker built as a Turborepo monorepo: a Next.js 14 + TypeScript web client over a FastAPI gateway (async SQLAlchemy, Postgres, Redis, JWT auth) plus food, workout, and ml microservices, all running in Docker Compose with MinIO and pgAdmin (8 services). The genuinely real AI is the meal pipeline in the gateway: GPT-4 parses a free-text description into structured items with quantities and estimated gram weights, each item is enriched concurrently against USDA FoodData Central, Nutritionix, and Spoonacular (Nutritionix entries with real portion weights rank first), and a second GPT-4 call estimates macros only when every API lookup misses. Implausible results (an item over 1,000 calories, or protein over 100 g) trigger a web-search validation pass that scrapes nutrition sites and has GPT-4 extract corrected numbers. Every item carries an explicit confidence label, from high down to very_low, surfaced in the meal summary. The photo and voice recognition endpoints are stubs returning mock data, so no vision claims are made here.

  • Next.js 14
  • TypeScript
  • FastAPI
  • Python
  • OpenAI GPT-4
  • PostgreSQL
  • Redis
  • Docker
  • Turborepo

Architecture · free-text meal → validated nutrition

  1. 01

    Natural-language meal input

    A free-text description (“two eggs and a slice of toast”) enters the FastAPI gateway.

  2. 02

    GPT-4 parsing

    OpenAI GPT-4 parses it into structured food items with quantities and estimated gram weights.

  3. 03

    Multi-source enrichment

    Each item is searched concurrently across USDA FoodData Central, Nutritionix, and Spoonacular; Nutritionix entries with real portion weights rank first.

  4. 04

    Fallback + validation

    If every API lookup misses, a second GPT-4 call estimates the macros. Low-confidence or implausible results (over 1,000 calories, protein over 100 g) trigger a web-scrape pass with GPT-4 extracting corrected values.

  5. 05

    Structured + labeled

    The API returns each item as structured JSON with a per-item confidence label, from high down to very_low, rolled into the meal summary; the dashboard tracks logged meals client-side.

Services
3 + FastAPI gateway
Nutrition sources
USDA · Nutritionix · Spoonacular
AI
GPT-4 meal parsing
Dev stack
Turborepo · Docker (8 services)

What I'd improve

The honest gap is the stubs: the photo and voice endpoints return hardcoded mock items, so the next step is to either ship a real food-recognition model behind them or cut them. On the pipeline itself, the GPT-4 calls strip markdown fences and hope for valid JSON, so I would move them to structured output with a schema, replace the brittle search-and-scrape validation pass with a structured source, and build a small gold set of described meals with known nutrition to actually measure parsing accuracy instead of trusting self-reported confidence labels.

View source↗︎
Want something like this? Get in touch →

Measured:30/30 chatbot evals·20-case Bastion eval·Serving·Calibration Lab

© 2026 Karim SemaanBuilt with Next.js, Tailwind & Supabase.LinkedIn ↗︎GitHub ↗︎