Skip to content
NutriSense

NutriSense

AI food labels, personalized for healthier choices

Created on 30th January 2026

NutriSense

NutriSense

AI food labels, personalized for healthier choices

The problem NutriSense solves

🚀The problem it solves

Buying “healthy” food is harder than it should be.
At the point of purchase, most people are forced to quickly interpret dense, technical and misleading nutrition labels. Important information is hidden behind chemical names, inconsistent serving sizes and poorly structured tables.

For users with medical or dietary constraints (such as diabetes, hypertension, allergies or gluten intolerance), this is not just inconvenient — it can directly impact their health.

🧠What people can use NutriSense for

NutriSense is an AI-powered food label understanding assistant that helps users make safer and more informed food choices in real time.

Users can:

📷 Scan a barcode or capture a photo of a product label

🔍 Automatically extract ingredients and nutrition values, even when a barcode is missing

🧑‍⚕️ Personalize the analysis using their health profile (dietary restrictions, allergies, and preferences)

🚦 Receive instant alerts for potentially unsuitable ingredients

📊 View a simple health score and explanation

🔁 Discover healthier alternatives when a product is not suitable

✅ How NutriSense makes an existing task easier and safer

Instead of manually:

reading small, cluttered labels,

searching ingredient meanings online,

and guessing whether a product fits personal health needs,

NutriSense:

🧩 Structures messy label text into clear data

🧠 Interprets ingredient risks and nutrition context using AI

🧑‍🤝‍🧑 Adapts results to each user’s profile

⚠️ Highlights risks before purchase

🛒 Supports safer, faster and more confident buying decisions

🔄 Works even when barcodes fail

Many products either:

do not have a readable barcode, or

have incomplete or outdated database entries.

NutriSense intelligently falls back to image-based label analysis (OCR + AI) and, when possible, automatically enriches results using trusted public food databases.

This ensures that users still receive meaningful results even in real-world retail conditions.

🌍 Why this matters

NutriSense helps bridge the gap between:

complex nutritional science and

everyday consumer decision-making.

By delivering personalized, understandable and reliable insights at the moment of purchase, NutriSense empowers people to make healthier choices — not later, but right when it matters most. 🛍️💚

image

image

image

image

image

image

image

Challenges we ran into

🧩 Challenges I ran into

Building NutriSense required handling real-world data, unreliable APIs and noisy images. Below are the most impactful challenges we faced and how we solved them.

🤖 LLM responses breaking our backend (invalid JSON)

While using Gemini to generate structured nutrition and health analysis, the model occasionally returned responses mixed with explanations or formatting. This caused our backend to crash with parsing errors such as “Unterminated string in JSON”.

How we solved it
We implemented a robust JSON-extraction and validation layer inside our Edge Functions.
Instead of directly trusting JSON.parse, we isolate the JSON block from the model response and validate it before processing. If parsing still fails, the system gracefully falls back to OCR-only analysis so the user never sees a crash.

⏱️ API rate-limits during development and testing

During integration and demo testing, we frequently hit LLM rate limits (HTTP 429 / quota errors), which made the application unreliable.

How we solved it
We built a model fallback routing layer that automatically switches between compatible Gemini models when a rate-limit occurs, while keeping the same prompts and response schema.
If all models are temporarily unavailable, NutriSense switches to a lightweight rule-based fallback so that users still receive a basic and safe analysis.

📦 Multiple and incomplete product entries in public databases

When scanning barcodes, the same product often had several entries in the public food database, many of which were missing ingredients, nutrition values or images.

How we solved it
We designed a candidate ranking and validation system that scores multiple product entries based on data completeness and consistency with OCR-extracted ingredients.
Only the most reliable and complete entry is selected for display.

📷 OCR accuracy on real packaging

Food packaging images often contain curved surfaces, branding text and complex layouts, leading to noisy or incorrect OCR results.

How we solved it
We implemented a dual-engine OCR pipeline.
The system first attempts PaddleOCR and automatically falls back to OCR.space when confidence is low.
The extracted text is then structured so that only meaningful rows such as ingredients and nutrition values are used for analysis.

🔐 Unstable authentication due to stale sessions

During development, Supabase authentication occasionally failed due to invalid or expired refresh tokens stored on the client.

How we solved it
We added explicit session validation and cleanup logic. When an invalid refresh token is detected, the app safely clears the local session and redirects the user to re-authenticate, preventing broken login flows.

🧠 Identifying products from label images when barcodes are missing

Some images clearly contained the product name and brand, while others only showed ingredients and legal text.

How we solved it
We introduced a smart product-identification step where the system first tries to infer the product name from prominent OCR text and validates it using ingredient overlap before querying public databases.
If confidence is low, NutriSense automatically falls back to OCR-based analysis instead of showing potentially incorrect product data.

These challenges helped us design NutriSense as a fault-tolerant, real-world-ready system that continues to work reliably even when data, APIs or images are imperfect.

Tracks Applied (1)

Open Track

NutriSense fits the Open Track by solving a real-world consumer problem using AI and open public data. Our project is a...Read More

Discussion

Builders also viewed

See more projects on Devfolio