A fully free, production-ready AI nutrition and fitness planner using RAG (Retrieval-Augmented Generation) with streaming responses, vision-enabled meal analysis, and a high-performance Next.js interface.
| Component | Tool | Why? |
|---|---|---|
| Frontend | Next.js 15+ (React 19) | Premium UI, App Router, Vercel ready |
| LLM | Groq (Llama 3.3 70B) | Instant responses, free tier |
| Embeddings | FastEmbed (Local) | Ultra-lightweight, no 404 errors, fits in 512MB |
| Vector DB | Qdrant (In-Memory) | Blazing fast retrieval, zero-config |
| Backend | FastAPI | High-performance Python API |
| Vision AI | Groq Llama 3.2 Vision | Instant food identification from photos |
- 🔴 Real-time streaming responses via Server-Sent Events (SSE)
- 📸 Vision AI — upload meal photos for instant macro estimations
- 📊 Animated Charts — interactive macro donut charts and weight trackers
- 🛒 AI Shopping List — automatically categorize ingredients from your plans
- 📋 PDF Export — download your personalized protocols instantly
- 🗂️ Tabbed Results — clean separation of Overview, Nutrition, Meals, and Workouts
- 💾 Local Persistence — your profiles and history stay on your device
FitMindAI/
├── backend/ # FastAPI Application
│ ├── main.py # API routes & lifespan
│ ├── ingestion.py # FastEmbed RAG pipeline
│ ├── planner.py # LLM logic & vision analysis
│ └── calculator.py # Nutrition formulas
├── frontend/ # Next.js Application
├── knowledge_base/ # Your .txt data for RAG
├── Dockerfile # Production deployment config
├── vercel.json # Frontend deployment config
└── requirements.txt # Python dependencies
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # venv\Scripts\activate on Windows
# Install lightweight dependencies
pip install -r requirements.txt
# Start the API
uvicorn backend.main:app --reloadcd frontend
npm install
npm run devCreate a .env file in the root (and add these to Render/Vercel):
# GROQ API Key (from https://console.groq.com)
GROQ_API_KEY=your_key_here
# For Production (Vercel Frontend)
NEXT_PUBLIC_API_URL=your_backend_url_on_render- Deployment Type: Docker
- Root Directory:
./ - Why?: The custom
Dockerfilehandles the lightweightFastEmbedmodel perfectly within the 512MB free tier.
- Deployment Type: Next.js
- Root Directory:
./ - Why?: Uses
vercel.jsonto correctly route thefrontend/subdirectory while keeping the root clean.
- Ingest: On startup,
FastEmbedchunks and embeds.txtfiles fromknowledge_base/. - Search: When you ask a question, the AI searches the local Qdrant store for the most relevant context.
- Generate: Groq's Llama 3.3 70B combines your profile, macros, and the retrieved context to build a perfect plan.