Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Emlembow/vibe-dieting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Vibe Dieting - AI-Powered Nutrition Tracking

Live Demo Deploy with Vercel License: MIT Next.js TypeScript

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!

✨ Try it live at vibedieting.xyz

Vibe Dieting Screenshot

πŸš€ Features

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

πŸ› οΈ Tech Stack

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

πŸš€ One-Click Deploy

Deploy instantly to Vercel with automated database setup:

Deploy with Vercel

Post-Deploy Setup

  1. Create a Supabase project and add credentials to Vercel environment variables
  2. Run npm run db:push to set up database schema
  3. Set up OpenAI API key for the Responses API

πŸ—οΈ Local Development

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/Emlembow/vibe-dieting.git
    cd vibe-dieting
  2. Install dependencies

    npm install
    # or pnpm install / yarn install
  3. 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

Database Setup (Automated)

  1. Install Supabase CLI

    npm install -g supabase
  2. 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 structure
  • 20240101000001_rls_policies.sql - Row Level Security policies

OpenAI API Configuration

  1. Get your API key from OpenAI Platform
  2. Add the API key to your .env.local file as OPENAI_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

Run Development Server

npm run dev

Open http://localhost:3000 to start tracking!

πŸ“± Usage Guide

  1. Account Setup: Register or use test credentials ([email protected] / password123)
  2. Set Goals: Configure daily calorie and macro targets
  3. Track Food:
    • Upload meal photos for AI analysis
    • Or describe food in natural language
  4. Monitor Progress: View dashboard and trends analytics

πŸ§ͺ Development Commands

# 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 check

πŸ§ͺ Quick Testing

Visit /api/create-test-user to generate test data:

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

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.

πŸ™ Acknowledgments

πŸ“ž Support


Built as a portfolio project showcasing modern web development practices

Made with πŸ’œ and clean code

Contributors 4

  •  
  •  
  •  
  •