Live in Production

FitLife
AI Nutrition &
Fitness Platform

A full-stack AI-powered web application with food photo analysis, personalized diet plans, and custom workout programs — built with Next.js 15, Firebase, n8n, and a dual AI engine (Gemini + Ollama).

6
AI Workflows
3
Virtual Machines
$0
Monthly Cost
4
AI Models
What FitLife Can Do
Every feature offers two AI options — fast cloud (Gemini) or free self-hosted (Ollama).
📸

Food Photo Analysis

Snap a meal photo and get instant calories, macros (protein, carbs, fat, fiber), 13 vitamins/minerals, allergen detection, and a quality score from 1-10 with AI guidance.

🥑

AI Diet Plans

Enter your body stats and goals to receive a personalized 7-day meal plan with exact recipes, prep times, calorie targets, and a grocery list — auto-generates a matching workout plan.

💪

AI Workout Programs

Get a complete weekly exercise program with sets, reps, rest times, form tips, warmup/cooldown, calorie burn estimates — auto-generates a matching diet plan.

System Architecture
3 VMs across 2 Proxmox servers, connected via Cloudflare Tunnels — zero exposed ports.

VM 100 — AI Models

172.16.184.60 · ollama.marcbd.site
  • Docker + Ollama container
  • llava:7b — Vision model (4.7 GB)
  • phi3:mini — Text model (2.3 GB)
  • CPU-only inference (no GPU)
  • Cloudflare Tunnel secured

VM 101 — n8n Engine

172.16.184.111 · n8n.marcbd.site
  • Docker + n8n + KV Store
  • 6 webhook workflows
  • Async job queue (UUID polling)
  • Gemini API integration
  • LAN link to Ollama

VM 200 — FitLife App

172.16.184.217 · fitlife.marcbd.site
  • Next.js 15 + React 19
  • TypeScript + Tailwind v4
  • Firebase Auth + Firestore
  • Cloudflare Pages (CDN)
  • Auto-deploy on git push
Model Benchmarks & Results
Real-world performance metrics from production workloads.

⏱️ Response Time by Feature (seconds)

🎯 AI Output Quality Score

📊 Nutrition Fields Accuracy

🔄 Workflow Success Rate (%)

Gemini vs Ollama Comparison
Feature⚡ Gemini (Fast)🌿 Ollama (Free)
Food Analysis~15s gemini-2.5-flash-lite~90s llava:7b (7B vision)
Diet Plan~30s 7-day detailed plan~180s 3-day plan
Workout Plan~30s Full week + exercises~180s Full week
HostingGoogle Cloud (API)Self-hosted (Proxmox VM)
CostFree tier (rate limited)$0 forever (your hardware)
PrivacyData sent to Google100% on-premise
JSON OutputNative (response_mime_type)Prompt-engineered
Vision SupportYes (multimodal)Yes (llava:7b)
Project Achievements
100%
All 6 workflows verified working
~15s
Fastest food analysis (Gemini)
🎯
8.2/10
Avg meal quality score accuracy
💰
$0
Monthly infrastructure cost
🔒
Zero
Open ports (Cloudflare Tunnels)
📦
14
Source files redesigned
How I Built & Deployed FitLife
1

Infrastructure Setup

Provisioned 3 Ubuntu VMs on Proxmox, configured static IPs, installed Docker, set up UFW firewalls, and created Cloudflare Tunnels for secure access — no port forwarding needed.

2

AI Model Deployment

Deployed Ollama in Docker with llava:7b (4.7GB vision model) and phi3:mini (2.3GB text model). CPU-only inference — no GPU required. Models run entirely on self-hosted hardware for $0/month.

3

n8n Workflow Automation

Built 6 production workflows with async job processing, KV store for result caching, structured JSON prompts, and a dual-engine architecture letting users choose between Gemini (fast) and Ollama (free).

4

Full-Stack Development

Built the Next.js 15 application with TypeScript, Tailwind CSS v4, Firebase Auth (email + Google OAuth), Firestore real-time database, interactive charts, SVG progress rings, and glass morphism UI.

5

Production Deployment

Connected GitHub to Cloudflare Pages for auto-deploy on push. Configured custom domain (fitlife.marcbd.site) with SSL, Firebase authorized domains, and end-to-end testing of all AI features.

Technologies Used

🖥️ Frontend

Next.js 15 (App Router) · React 19 · TypeScript 5 · Tailwind CSS v4 · Recharts · Lucide Icons · Framer Motion · react-hot-toast

⚙️ Backend & AI

Firebase Auth · Cloud Firestore · n8n (self-hosted) · Ollama (llava:7b, phi3:mini) · Google Gemini API · Docker Compose

☁️ Infrastructure

Proxmox VE (hypervisor) · Cloudflare Pages (CDN) · Cloudflare Tunnels · Ubuntu 22.04 · UFW Firewall · GitHub (CI/CD)