Skip to content

Rahul4301/NutriScan

Repository files navigation

🥑 NutriScan: Your AI-Powered Food Detective

NutriScan Logo

Scan meals, menus, and packaged foods for instant nutrition snapshots.


✨ Features

  • 📸 AI Food Scanning: Snap a photo of a meal, menu, snack, or packaged food, and NutriScan will identify the food items.
  • 🥗 Instant Macro Snapshot: Get average calories, protein, carbs, and fat in the first scan result.
  • 🌿 Vegan & Health Ratings: Quickly identify vegan-friendly options with a leaf icon and see a health rating (from 1 to 10) for each item.
  • 😂 Fun Loading Experience: Enjoy a variety of playful and quirky loading messages while the AI analyzes your food.
  • 🔐 Secure Authentication: User accounts are protected with a secure authentication flow powered by Supabase.
  • 📱 Responsive Design: A beautiful and intuitive UI that works seamlessly on any device, built with Next.js, TypeScript, and Tailwind CSS.

🛠️ Tech Stack


🚀 Getting Started

Prerequisites

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/NutriScan.git
    cd NutriScan
  2. Install the dependencies:

    npm install
  3. Set up Supabase:

    • Start the Supabase local development environment:
      npx supabase start
    • The first time you run this, it will download the necessary Docker images.
    • Once it's running, you'll see your local Supabase credentials in the terminal.
  4. Run the application:

    npm run dev

🎉 Your app should now be running at http://localhost:9002.


🗂️ Project Structure

/
├── src/
│   ├── ai/
│   │   └── flows/          # Genkit AI flows
│   ├── app/                # Next.js app directory (pages, routes, etc.)
│   ├── components/         # Reusable UI components
│   ├── hooks/              # Custom React hooks
│   └── lib/                # Utility functions and libraries
├── supabase/
│   ├── functions/          # Deno-based edge functions
│   └── migrations/         # Database migrations
└── README.md               # You are here!

🤖 AI Flows

NutriScan uses a lean scan-first AI workflow:

  1. scan-menu-for-food-options: This flow takes a food image as input and returns detected foods plus average calories, carbs, protein, fat, allergens, and health rating data.

  2. generate-nutritional-data: This fallback flow can still fill in details if a scanned item is missing macro data.

The prompts for these flows have been carefully refined to be concise and to minimize the chances of inaccurate or "hallucinated" information.


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors