A modern nutrition tracking app that uses AI to analyze your food through text or images. No barcode scanning, no database diving β just snap a pic or describe what you ate!
| Feature | Description |
|---|---|
| πΈ AI Image Analysis | Upload photos of your meals for instant nutrition breakdown |
| π¬ Text Recognition | Simply describe what you ate in natural language |
| π Macro Tracking | Track calories, protein, carbs, and fats with precision |
| π― Goal Management | Set and monitor daily nutrition targets |
| π Progress Analytics | Visualize trends and patterns over time |
| π Modern Interface | Clean, responsive design built with shadcn/ui |
Frontend: Next.js 15 + React + TypeScript + Tailwind CSS
Backend: Next.js API Routes + Supabase Database
AI: OpenAI Responses API (gpt-5-nano-2025-08-07)
UI: shadcn/ui Components
Auth: Supabase Authentication
Deploy: Vercel + Automated Database Setup
Deploy instantly to Vercel with automated database setup:
- Create a Supabase project and add credentials to Vercel environment variables
- Run
npm run db:pushto set up database schema - Set up OpenAI API key for the Responses API
- Node.js 18+ with npm/pnpm/yarn
- Supabase account (free tier available)
- OpenAI API key
-
Clone the repository
git clone https://github.com/Emlembow/vibe-dieting.git cd vibe-dieting -
Install dependencies
npm install # or pnpm install / yarn install -
Environment setup
cp .env.example .env.local
Fill in your credentials:
# Supabase NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key SUPABASE_SERVICE_ROLE_KEY=your-service-role-key # OpenAI OPENAI_API_KEY=sk-proj-your-api-key
-
Install Supabase CLI
npm install -g supabase
-
Initialize and migrate
npm run db:init npm run db:link --project-ref YOUR_PROJECT_REF npm run db:push
π Automated migrations handle all table creation and security policies!
π Manual Database Setup (Alternative)
If you prefer manual setup, run the SQL from supabase/migrations/ in your Supabase SQL editor:
20240101000000_initial_schema.sql- Tables and structure20240101000001_rls_policies.sql- Row Level Security policies
- Get your API key from OpenAI Platform
- Add the API key to your
.env.localfile asOPENAI_API_KEY
The app uses the OpenAI Responses API with:
- Model: gpt-5-nano-2025-08-07 (optimized for cost and performance)
- Function calling: Structured JSON responses using the schema in
openai-assistant-schema.json - Nutrition analysis: System prompt from
prompts/nutrition-analysis.md
npm run devOpen http://localhost:3000 to start tracking!
- Account Setup: Register or use test credentials (
[email protected]/password123) - Set Goals: Configure daily calorie and macro targets
- Track Food:
- Upload meal photos for AI analysis
- Or describe food in natural language
- Monitor Progress: View dashboard and trends analytics
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database Management
npm run db:init # Initialize Supabase
npm run db:link # Link to Supabase project
npm run db:push # Apply migrations
npm run db:reset # Reset database
# Code Quality
npm run lint # ESLint
npm run type-check # TypeScript checkVisit /api/create-test-user to generate test data:
- Email:
[email protected] - Password:
password123
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
MIT License - you are free to use, modify, and distribute this code.
See LICENSE file for full terms.
- shadcn/ui - Beautiful UI components
- OpenAI - Powerful AI capabilities
- Supabase - Backend infrastructure
- Vercel - Deployment platform
- π Bug reports: Open an issue
- π‘ Feature requests: Create a discussion
- π§ Questions: Check existing issues or create a new one
Built as a portfolio project showcasing modern web development practices
Made with π and clean code