About NutriSync

Inspiration

You know that post-gym clarity? That moment when your muscles are still pumping and your brain is firing on all cylinders? That's exactly when it hit me.

I was in the car with my dad, driving back from the gym, and we started geeking out about fitness tracking. "Why can my smartwatch track every rep, every step, every heartbeat," I wondered out loud, "but I still have to manually log my chicken breast like it's 2010?" My dad nodded, and I could see the gears turning in his head too.

That car ride changed everything. I couldn't stop thinking about it. That night, instead of sleeping, I was sketching database schemas on napkins and researching nutrition APIs. The obsession had begun. NutriSync wasn't just born from that conversation—it was ignited by it.

Core Features:

  • 🎯 Live Coach: Real-time pose tracking with AI form analysis
  • 💪 Progressive Overload: Automatic PR detection & volume tracking
  • 🧠 AI Workout Planning: Personalized plans based on equipment & experience
  • 🍽️ Nutrition Tracking: Meal logging with macro calculations
  • 📊 Holistic Health: Sleep, body composition, and recovery monitoring
  • 🌍 Bilingual: Full English/Arabic support with RTL

What it does

NutriSync is the AI coach I wish I had when I started lifting. No, scratch that—it's the AI coach I wish existed when I started lifting.

Imagine having a personal trainer who never forgets a single detail about you. Every meal you've eaten, every set you've completed, every hour you've slept, every morning weigh-in—it remembers everything. But here's where it gets wild: it doesn't just remember, it understands. It sees patterns in your data that you'd never notice. It knows when you're about to plateau before you do. It detects potential overtraining or nutritional deficiencies by connecting dots across weeks of data.

And then there's Live Coach mode. Oh man, Live Coach mode. This is where I went full mad scientist.

Picture this: You're at the gym, phone propped up, doing bench press. NutriSync is watching you through your camera with MediaPipe pose tracking (33 body landmarks tracked in real-time, because why not?). It's measuring your eccentric phase, your pause at the bottom, your concentric explosion. It captures three snapshots per set—mid-lowering, bottom position, mid-lifting—and sends them to Gemini's multimodal AI for analysis.

Between sets, while you're catching your breath, NutriSync tells you: "Your left elbow is flaring out 15 degrees more than your right. Tuck it in for better pec activation and shoulder safety." It's like having a biomechanics PhD in your pocket.

But it doesn't stop there. NutriSync tracks your progressive overload with obsessive precision. It knows your estimated 1RM for every exercise. It calculates your weekly volume per muscle group and compares it against science-backed recommendations (MEV, MAV, MRV—yeah, I went deep into the research papers). It generates workout plans that actually make sense for YOUR equipment, YOUR experience level, YOUR goals.

And the best part? It's not just about the gym. NutriSync connects the dots between your nutrition, sleep, body composition, and training. It sees the whole picture. When you're not recovering well, it doesn't just tell you to "rest more"—it shows you that you've been in a 500-calorie deficit for two weeks while hitting 20 sets per muscle group. It gets you.

All of this, every single feature, every line of code, is designed for one purpose: to help you achieve your FINAL BIG DREAM. Whatever that dream is—whether it's your first pull-up, a 315 bench press, or stepping on stage at a bodybuilding show—NutriSync is there, tracking, analyzing, coaching, and cheering you on.

How we built it

Let me take you back to the beginning. The real beginning.

Version 0.1 of NutriSync was... let's call it "charmingly terrible." I'm talking about a janky n8n workflow connected to a Telegram bot. That's it. No fancy UI, no pose tracking, no multimodal AI. Just me, a bot, and a PostgreSQL database that I was probably querying in the most inefficient ways possible.

But you know what? It worked. Kind of.

I could send it a picture of my meal, and it would log the macros (with questionable accuracy, but hey). I could tell it "logged 4 sets of bench press, 225 lbs, 8 reps," and it would dutifully store that in the database. It could pull up my weekly nutrition charts using QuickChart.io. It was held together with duct tape and hope, but it was mine.

I used this Frankenstein's monster of a system for 3-4 months during my bulk. And honestly? It was magical. I was gaining weight at exactly 0.5 kg per week, hitting my protein targets, and making consistent strength gains. Sure, the bot would occasionally hallucinate exercises I never did, or forget to log my breakfast, or crash when I asked for a chart. But I was the only user, and I had patience (and a lot of manual database fixes).

Then everything changed.

Challenges we ran into

The Injury That Changed Everything

There was this one leg day. I'll never forget it. NutriSync (in its primitive Telegram bot form) suggested some exercises that were... ambitious. Too ambitious. See, back then, the bot didn't consider experience level, injury history, or exercise complexity. It just threw exercises at me like a random workout generator.

And I, being the overconfident gym bro I was, thought "I can handle this." Narrator: He could not handle this.

Long story short: I got injured. Badly. I haven't been able to train legs properly for months. I'm still recovering as I write this, dreaming of the day I can squat again without pain.

But here's the thing about setbacks: they force you to level up.

The DevFest Cairo Revelation

During my recovery, I attended DevFest Cairo. I was sitting there, leg still hurting, feeling sorry for myself, when the speaker started talking about Google's Agent Development Kit (ADK). My eyes lit up. I started taking notes like a madman. This was it. This was the missing piece.

The ADK offered everything I needed: proper session management, tool orchestration, multimodal input handling, and most importantly, a framework that could scale beyond my hacky Telegram bot. I went home that night and immediately started refactoring.

I threw away the n8n workflow. I rebuilt everything from scratch in FastAPI. I integrated the ADK. I designed a proper database schema with 17 migration files (yes, I counted). I built a frontend with vanilla JavaScript because I wanted full control. I implemented MediaPipe for pose tracking. I added support for Arabic because my friends kept asking for it.

For months, while I couldn't train, I built. Every bug I fixed, every feature I added, every optimization I made—it was therapy. NutriSync became my rehab project, both literally and figuratively.

The Technical Gauntlet

Oh, and let's talk about the technical challenges, because there were many:

  • Session Management Hell: ADK sessions would occasionally corrupt. I spent days implementing per-user asyncio locks and automatic session recovery. Now it's bulletproof.

  • Multimodal AI Quirks: Getting Gemini to consistently analyze form check images while maintaining conversation context? That required building a custom InstructionProvider with dynamic prompt injection. The system prompt is now a 2000+ word masterpiece that gets rebuilt on every request with fresh user context.

  • Progressive Overload Math: Calculating estimated 1RMs, tracking volume load, detecting PRs, aggregating weekly muscle volume—this required diving deep into exercise science research papers and implementing PostgreSQL functions that would make a data engineer proud.

  • Real-Time Pose Tracking: MediaPipe in the browser is fast, but coordinating rep detection, phase timing, and snapshot capture while maintaining 30fps? That was a fun week of debugging.

  • The 4am Cutoff Problem: How do you handle logging when users train at midnight? I implemented a "functional day" system where anything before 4am counts as the previous day. It's the little details that matter.

Data Sources & Research

Building NutriSync required diving deep into multiple data sources:

  • Exercise Science Research: Volume landmarks (MEV/MAV/MRV) from Dr. Mike Israetel's Renaissance Periodization research, Schoenfeld's dose-response studies
  • Nutrition Data: AI-powered macro estimation trained on USDA FoodData Central
  • Exercise Database: Dynamicly generated by AI with custom classifications
  • Biomechanics Standards: MediaPipe's 33-landmark pose model for joint angle calculations
  • Training Principles: Progressive overload formulas (Epley 1RM estimation), volume load calculations

Accomplishments that we're proud of

From Solo Project to Community Beta

NutriSync was too good to keep to myself. I knew it. My dad knew it (he was my first beta tester, obviously). So I did what any self-respecting developer would do: I deployed it to Cloud Run and invited my top-10 friends.

(Yes, I realize "top-10 friends" sounds like I'm running k-nearest neighbors on my social life. I'm a CS student, what did you expect?)

And you know what happened? They loved it. But more importantly, they broke it. In the best way possible.

They found edge cases I never considered. They requested features I never thought about. One friend asked for Arabic support (now fully implemented with RTL). Another wanted to track supersets (now supported with superset_group fields). Someone else wanted push notifications for workout reminders (now powered by VAPID keys and Web Push API).

Every bug report felt like a gift. Every feature request felt like validation. We were building something real together.

By the Numbers:

  • 10+ active beta users
  • 400+ meals logged
  • 90+ workout sessions tracked
  • a few+ form check analyses completed
  • 17 AI tools orchestrated seamlessly
  • 0 data breaches (privacy-first design!) please don't hack me

The Technical Achievements

Let me nerd out for a second about what we actually built:

  • 17 AI Tools that Gemini can orchestrate seamlessly
  • 33-landmark pose tracking running at 30fps in the browser
  • Multimodal AI form analysis that actually gives useful feedback
  • Dual-write pattern for chat history (ADK session + PostgreSQL)
  • Dynamic prompt injection with user context loaded in parallel
  • Progressive overload tracking with automatic PR detection
  • Weekly muscle volume aggregation using PostgreSQL window functions
  • PWA with offline support and service workers
  • Internationalization (English/Arabic with RTL support)
  • PostHog analytics tracking every tool invocation and latency metric

And it all works. Like, actually works. In production. With real users. That still blows my mind.

The Personal Victory

But the accomplishment I'm most proud of? I built a system that would have prevented my injury. The current version of NutriSync considers experience level, exercise complexity, available equipment, and injury history before suggesting exercises. It validates workout plans against your actual capabilities. It warns you when volume is too high.

I got injured building version 0.1. But version 1.0 will make sure nobody else has to go through that.

What we learned

Technical Deep Dives

This project was a masterclass in full-stack development:

  • Google ADK: I went from "what's an agent?" to implementing custom InstructionProviders, session recovery, and tool orchestration. The ADK documentation became my bedtime reading.

  • Client-Side Computation: MediaPipe taught me that you can do serious ML in the browser. No server needed. Just pure JavaScript and WebAssembly magic. Privacy-first, latency-free pose tracking? Yes please.

  • Multimodal AI: Working with Gemini's vision capabilities showed me the future of AI. Text is great, but text + images? That's when things get really interesting. Form check analysis wouldn't be possible without it.

  • Database Design: I learned that good schema design is an art form. Computed columns, partial indexes, RLS policies, window functions—PostgreSQL is a beast, and I'm here for it.

  • Async Python: FastAPI + asyncio + asyncpg = beautiful concurrent code. Parallel context loading cut my API response times by 60%.

  • PWA Development: Service workers, Web Push API, manifest files, offline caching—I built a web app that feels like a native app. No app store needed.

Non-Technical Lessons

But the real lessons went beyond code:

  • User Feedback is Gold: My friends didn't just use NutriSync—they shaped it. Every complaint, every suggestion, every "wouldn't it be cool if..." made the product better.

  • Dogfooding Works: I used my own product every single day for months. That's how you find the bugs that matter and build the features that count.

  • Injury Teaches Humility: Getting hurt sucked, but it made me a better developer. I now think deeply about edge cases, safety, and user protection. Code has consequences.

  • Open Source Mindset: Even though NutriSync isn't open source (yet?), I built it with that mindset. Clean code, good documentation, modular architecture. Future me (and future contributors) will thank present me.

  • Ship It: Perfect is the enemy of done. Version 0.1 was terrible, but it taught me more than any tutorial ever could. You learn by building, breaking, and rebuilding.

What's next for NutriSync

The Top-1000 Rollout

Here's the plan: I'm taking NutriSync from 10 users to 1000 users. Specifically, my FCAI Cairo classmates (Faculty of Computers and Artificial Intelligence, represent! 🎓).

Why 1000? Because that's the perfect scale for a beta. Small enough to maintain quality, large enough to find every edge case. Plus, CS students are the best beta testers—they'll try to break it in creative ways, and they'll actually file detailed bug reports.

The rollout is happening soon, إن شاء الله (God willing). I'm finalizing the deployment scripts, setting up monitoring, and preparing for the inevitable server load spike when everyone tries to log their post-exam celebration meals simultaneously.

Feature Roadmap

The backlog is long, but here are the highlights:

Short-term (Next 3 months):

  • Injury Prevention System: ML model that predicts injury risk based on volume, intensity, and recovery metrics
  • Social Features: Share PRs, compare progress with friends, workout challenges
  • Voice Input: Because typing "logged 4 sets of bench press" while sweating is annoying
  • Apple Health / Google Fit Integration: Sync heart rate, steps, and sleep data automatically
  • Custom Exercise Library: Let users add their own exercises with video demos

Mid-term (6-12 months):

  • Nutrition Photo Recognition: Point camera at meal, get instant macro breakdown (no more manual logging!)
  • Workout Marketplace: Share and discover workout programs from the community
  • Coach Matching: Connect users with real human coaches who can review their AI-generated plans
  • Wearable Integration: Real-time heart rate tracking during workouts for better intensity monitoring
  • Advanced Analytics Dashboard: Deep dive into trends, correlations, and predictive insights

Long-term (The Dream):

  • Open Source Core: Release the ADK integration layer and tool framework for others to build on
  • Plugin System: Let developers create custom tools and integrations
  • Research Partnership: Collaborate with sports science labs to validate and improve the AI coaching
  • Mobile Apps: Native iOS/Android apps with offline-first architecture
  • Global Launch: Multi-language support, region-specific nutrition databases, international exercise libraries

The Vision

But beyond features and roadmaps, here's what I really want:

I want NutriSync to be the coach that everyone deserves but not everyone can afford. Personal trainers are expensive. Nutritionists are expensive. Sports scientists are expensive. But AI? AI scales.

I want the kid in a small town with no gym access to get the same quality coaching as someone training at a fancy facility. I want the busy parent who can only train at 5am to have a coach that never sleeps. I want the injured athlete to have a system that helps them come back stronger and safer.

I want to democratize fitness coaching. Not by replacing human coaches—they're irreplaceable—but by making expert-level guidance accessible to everyone as a starting point.

And selfishly? I want to get back to the gym, fully healed, and use NutriSync to train smarter than I ever did before. I want to hit PRs that my pre-injury self couldn't imagine. I want to prove that the system I built during my lowest point can take me to my highest.

That's what's next for NutriSync. That's the dream.


Built with 🧠 (and a lot of ☕) by a CS student who got tired of bad workout advice.

Powered by Google Gemini, FastAPI, PostgreSQL, MediaPipe, and an unhealthy obsession with progressive overload.

Built With

  • apscheduler
  • asyncio
  • asyncpg
  • chart.js
  • cryptography
  • css3
  • docker
  • dotenv
  • fastapi
  • github-actions
  • google-adk-(agent-development-kit)
  • google-cloud-run
  • google-gemini-flash
  • html5
  • javascript
  • jinja
  • mediapipe-pose
  • postgresql
  • posthog-analytics
  • pwa
  • pydantic
  • python
  • quickchart.io-api
  • search
  • service-workers
  • supabase
  • vapid
  • web
  • web-push-api
Share this project:

Updates