Personalization Engine: A structured onboarding flow captures health goals, activity level, dietary restrictions, and cuisine preferences. These data points are persisted in Supabase and injected into every AI prompt — making every suggestion genuinely tailored.
Multi-Modal Gemini Integration: Gemini handles text-based chat streaming, structured JSON meal plan generation, computer vision for fridge scanning, and recipe recommendations — all via a unified API layer in src/lib/gemini/.
Full-Stack Next.js Architecture: API routes on the server handle AI calls and database operations; React Server Components + client islands deliver fast initial loads and interactive UIs without architectural compromise.
Persistent Nutrition Intelligence: All logs, plans, scans, and conversations are stored in Supabase with RLS-protected user partitioning, enabling longitudinal analytics and a personalized experience that improves with use.
7. Features
User Authentication: Email/password and Google OAuth via Supabase Auth, with server-side session management in Next.js middleware
5-Step Onboarding: Collects personal stats, fitness goals, activity level, dietary restrictions, allergies, and cuisine preferences; auto-calculates BMR, TDEE, and daily macro targets
AI Meal Planner: Generate, save, and activate weekly meal plans; each plan includes 4 meals/day with individual macro breakdowns and an auto-generated shopping list
Fridge Scanner (Vision AI): Drag-and-drop or camera upload; Gemini Vision detects ingredients and returns 3–5 meal suggestions with estimated nutrition; scan history saved in database
AI Health Chat: Streaming conversational assistant with persistent session history; user context (goals, restrictions, macros) embedded in every system prompt
Recipe Discovery: AI-generated recommendations + Spoonacular image enrichment; filter by meal type and cuisine; save recipes to personal library
Detailed Recipe View: Full ingredient lists, step-by-step instructions, per-serving nutrition breakdown, and one-click meal logging
Grocery List: Auto-generated from active meal plan; editable per-item with check-off capability
Workout Plan Generator: Gemini-generated 7-day exercise routine by fitness goal; includes exercises, sets, reps, rest periods, and duration estimates
Nutrition Dashboard: At-a-glance daily calorie radial chart, macro progress bars, 7-day calorie trend, water intake tracker, recent meals log, quick-action shortcuts
Analytics Dashboard: 7-day and 30-day views; calorie area chart, macro pie chart, actual-vs-target bar chart, average adherence percentage
Profile Management: Edit personal stats, health goals, and activity level; avatar upload; real-time BMI/BMR/TDEE display
Settings: Theme switcher (light/dark/system), account management, account deletion with confirmation dialog
Command Palette: Keyboard-accessible Cmd+K navigation across all sections
Responsive Design: Collapsible sidebar, mobile bottom navigation, adaptive layouts
Toast Notifications: Real-time feedback for all async operations via Sonner
8. Stack (Organized by Category)
Frontend
Next.js 16.2.6 (App Router, Server Components)
React 19.2.4
TypeScript 5 (strict mode)
Framer Motion 12 (page transitions, card animations)
TanStack React Query 5 (server state, caching)
Zustand 5 (client UI state — onboarding, grocery, meal-plan)
React Hook Form 7 + Zod 4 (form validation)
Backend
Next.js API Routes (Node.js runtime)
Supabase SSR (@supabase/ssr) for server-side auth
Cloudinary SDK (server-side upload signing)
Google Generative AI SDK (@google/generative-ai)
Spoonacular REST API (recipe image search)
Database
Supabase (PostgreSQL)
10 tables: profiles, meal_plans, nutrition_logs, water_logs, fridge_scans, recipes, saved_recipes, grocery_lists, chat_sessions, workout_plans
Row-Level Security (RLS) on all tables
Automatic triggers: updated_at, auto-profile creation on signup
8 performance indexes on user_id + timestamp pairs
Authentication
Supabase Auth (email/password + Google OAuth)
Server-side session management via Next.js middleware
Protected routes with onboarding-completion enforcement
AI / LLMs
Google Gemini API (gemini-3-flash-preview)
Text generation: meal plans, recipes, workout plans, chat
Streaming: health chat (Server-Sent Events)
Vision: fridge ingredient detection and meal suggestions
Structured JSON: all non-chat AI outputs use typed schema responses
Styling / UI
Tailwind CSS 4 (@tailwindcss/postcss)
shadcn/ui (16 Radix UI primitives)
Recharts 3.8 (area, radial bar, pie, bar charts)
Lucide React (icons)
next-themes 0.4.6 (dark/light/system)
Geist Sans/Mono + Plus Jakarta Sans (custom fonts)
CSS design tokens: gradients, shadow layers, animation timings, glassmorphism utility classes
Deployment
Vercel (inferred — standard Next.js target, no explicit config file)
Cloudinary CDN for image assets
Supabase hosted PostgreSQL and Auth
Other Tools
React Dropzone 15 (file upload UX)
Sonner 2 (toast notifications)
date-fns 4 (date formatting and arithmetic)
CMDK 1.1 (command palette)
class-variance-authority + tailwind-merge (component variant patterns)
9. Your Role
As the sole developer and architect of NutriMind AI, responsibilities span the full product lifecycle: