Scan meals, menus, and packaged foods for instant nutrition snapshots.
- 📸 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.
- Framework: Next.js
- Language: TypeScript
- Styling: Tailwind CSS
- AI: Google's Genkit
- Backend & Auth: Supabase
- UI Components: shadcn/ui
- Runtime for Supabase Functions: Deno
-
Clone the repository:
git clone https://github.com/yourusername/NutriScan.git cd NutriScan -
Install the dependencies:
npm install
-
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.
- Start the Supabase local development environment:
-
Run the application:
npm run dev
🎉 Your app should now be running at http://localhost:9002.
/
├── 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!
NutriScan uses a lean scan-first AI workflow:
-
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. -
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.
This project is licensed under the MIT License. See the LICENSE file for details.