6 Workflows Active

FitLife n8n
AI Workflow Engine

Self-hosted n8n automation powering food image analysis, personalized diet plans, and custom workout programs โ€” with a dual AI engine (Google Gemini + Ollama) and async job processing.

6
Active Workflows
4
AI Models
~15s
Fastest Response
$0
Monthly Cost
The 6 Workflows
Dual AI Engine โ€” Fast & Free
Every feature has two options: Gemini (cloud, fast) and Ollama (self-hosted, free).
โšก GEMINI ยท FAST

๐Ÿ• Food Analysis

gemini-2.5-flash-lite (Vision)

Base64 image โ†’ calories, macros, 13 vitamins, allergens, quality score 1-10

โฑ ~15 seconds
โšก GEMINI ยท FAST

๐Ÿฅ‘ Diet Plan

gemini-2.5-flash-lite (Text)

User profile โ†’ 7-day meal plan with recipes, prep times, calorie targets, grocery hints

โฑ ~30 seconds
โšก GEMINI ยท FAST

๐Ÿ’ช Workout Plan

gemini-2.5-flash-lite (Text)

Goals + fitness level โ†’ 7-day program with sets, reps, form tips, warmup/cooldown

โฑ ~30 seconds
๐ŸŒฟ OLLAMA ยท FREE

๐Ÿ• Food Analysis

llava:7b โ€” 7B Vision Model (CPU)

Same analysis, fully self-hosted โ€” zero API calls, zero cost, complete data privacy

โฑ ~1-3 minutes
๐ŸŒฟ OLLAMA ยท FREE

๐Ÿฅ‘ Diet Plan

phi3:mini โ€” 3.8B Text Model (CPU)

3-day meal plan with nutritionist notes โ€” runs entirely on local hardware

โฑ ~3-5 minutes
๐ŸŒฟ OLLAMA ยท FREE

๐Ÿ’ช Workout Plan

phi3:mini โ€” 3.8B Text Model (CPU)

Full week exercise program with trainer notes โ€” no GPU required

โฑ ~3-5 minutes
How It Works
Async Job Processing Pipeline
Long-running AI tasks use UUID-based polling with a KV store โ€” no blocked connections.
1

Client Submits Request

Frontend POSTs image/data + a UUID jobId to the n8n webhook endpoint. n8n returns 200 immediately.

2

n8n Routes to AI Engine

Workflow sends the request to either Gemini API (cloud) or Ollama (LAN at 172.16.184.60:11434) based on which button the user clicked.

3

AI Processes & Returns JSON

The model analyzes the input and returns structured JSON โ€” food nutrition data, meal plans, or workout programs.

4

Result Stored in KV Store

n8n writes the result to the Python KV store (kvstore:3456) keyed by the jobId. Auto-cleanup after 30 minutes.

5

Client Polls & Gets Result

Frontend polls GET /food-result?jobId=xxx every 3-5 seconds. Returns "processing" until done, then the full result.

Performance
AI Model Benchmarks
Real-world production metrics from all 6 workflows.

โฑ๏ธ Response Time (seconds)

๐ŸŽฏ Output Quality Score (1-10)

โœ… Workflow Success Rate (%)

๐Ÿ“Š JSON Structure Accuracy

AI Output Sample
Real Food Analysis Result
Actual JSON response from Gemini analyzing a meal photo.

๐Ÿ“ธ Response from /webhook/fitlife/analyze-food-fast

{
  "success": true,
  "food_items": [
    {
      "name": "Grilled Chicken Breast",
      "quantity_g": 200,
      "calories": 330,
      "protein_g": 62.0,
      "carbs_g": 0,
      "fat_g": 7.2
    },
    {
      "name": "Brown Rice",
      "quantity_g": 150,
      "calories": 165,
      "protein_g": 3.5,
      "carbs_g": 34.5,
      "fat_g": 1.3
    }
  ],
  "totals": {
    "calories": 495,
    "protein_g": 65.5,
    "carbs_g": 34.5,
    "fat_g": 8.5,
    "fiber_g": 2.1
  },
  "vitamins_minerals": {
    "vitamin_b12_mcg": 1.2,
    "iron_mg": 3.5,
    "calcium_mg": 45,
    "potassium_mg": 620,
    "zinc_mg": 4.8
  },
  "meal_quality_score": 8,
  "glycemic_index": "medium",
  "allergens": [],
  "health_notes": "Excellent high-protein meal with balanced macros"
}
Comparison
Gemini vs Ollama โ€” Side by Side
Aspectโšก Gemini (Fast)๐ŸŒฟ Ollama (Free)
Food Analysis Speed~15s~90s
Diet Plan Quality7-day detailed with recipes3-day with notes
Workout DetailFull week + form tips + progressionFull week + exercises
Vision Modelgemini-2.5-flash-lite (multimodal)llava:7b (7B params)
Text Modelgemini-2.5-flash-litephi3:mini (3.8B params)
JSON ReliabilityNative response_mime_typePrompt-engineered
HostingGoogle Cloud APISelf-hosted (Proxmox VM)
CostFree tier (rate limited)$0 forever
PrivacyData sent to Google100% on-premise
GPU RequiredN/A (cloud)No โ€” CPU inference
Infrastructure
Self-Hosted on Proxmox
3 VMs, 2 physical servers, zero exposed ports โ€” all secured via Cloudflare Tunnels.

VM 100 โ€” AI Models

172.16.184.60 ยท ollama.marcbd.site
  • Docker + Ollama container
  • llava:7b โ€” 4.7 GB vision model
  • phi3:mini โ€” 2.3 GB text model
  • CPU-only inference (no GPU)
  • Cloudflare Tunnel secured

VM 101 โ€” n8n Engine

172.16.184.111 ยท n8n.marcbd.site
  • n8n container (port 5678)
  • KV Store container (port 3456)
  • 6 active webhook workflows
  • Gemini API + Ollama LAN
  • 600s task runner timeout

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
Results
Project Achievements
โœ…
6/6
Workflows verified working
โšก
~15s
Fastest food analysis
๐ŸŽฏ
98%
Gemini success rate
๐Ÿ’ฐ
$0
Infrastructure cost
๐Ÿ”’
Zero
Exposed ports
๐Ÿง 
7 GB
Self-hosted AI models