NutriScan AI is a modern web application designed to help users make healthier food choices by instantly analyzing food labels. By uploading a photo of an ingredients list or nutrition facts table, users get a comprehensive breakdown of what's really in their food, powered by Google's Gemini AI.
- Instant Analysis: Upload a photo to get results in seconds.
- Smart Cropping: Built-in image cropping tool to focus specifically on the relevant label text.
- Health Scoring: precise 0-100 health score and a visual "Nutri-Grade" (A to E) based on nutritional density.
- Ingredient Breakdown: Detailed analysis of every ingredient, categorized by risk level (Safe, Moderate, High).
- Allergen Detection: Automatic highlighting of common allergens like gluten, dairy, soy, and nuts with distinct visual warnings.
- Risk Assessment: Explanations for why specific additives or ingredients might be risky (e.g., "High Fructose Corn Syrup", "Nitrites").
- Actionable Verdicts: Clear summaries (Excellent, Good, Avoid) with pros, cons, and specific precautions.
- Frontend: React 19, TypeScript
- Styling: Tailwind CSS for a responsive and clean UI.
- AI Engine: Google Gemini API (
@google/genai) for image recognition and data extraction. - Image Processing:
react-image-cropfor client-side image manipulation. - Icons:
lucide-reactfor a consistent and modern icon set.
- Upload: The user selects an image from their device or camera.
- Crop: The user crops the image to isolate the ingredients list or nutrition table.
- Process: The image is sent to the Gemini 2.5 Flash model.
- Analyze: The AI parses the text, identifies ingredients against a knowledge base of nutritional data, checks for allergens, and calculates a health score.
- Display: The results are rendered in an easy-to-read dashboard with visual indicators for risks and nutritional value.
This tool is for informational purposes only. The "Health Score" and analysis are generated by AI and should not be considered professional medical advice. Always consult a healthcare professional for specific dietary needs or severe allergies.


