Dietly is an AI copilot for nutrition labels. Scan a product, get a verdict. No fluff.
Most AI nutrition tools are annoyingly polite:
"This product contains sodium, which could potentially be a consideration for some individuals who may be monitoring their intake..."
That's useless. You want to know: Should I eat this or not?
Dietly gives you a verdict, not a lecture.
❌ "This is high in sodium which may affect some people"
✅ "800mg sodium = 35% of your daily limit. This will spike your blood pressure. AVOID if you have hypertension."
- Decisive — Clear verdicts: RECOMMENDED / PROCEED WITH CAUTION / AVOID
- Data-First — Every claim has a number. "6g saturated fat (30% daily limit)" not "high in fat"
- Goal-Oriented — Analysis tied to YOUR intent, not generic health advice
- No Filler — Zero "Great question!" or "I'd be happy to help"
The copilot tells you what it's assuming before acting:
🎯 "I'm assuming you're checking this for heart health"
[protein source] [quick energy] [diet compliance]
- Agree? It proceeds on your behalf with focused analysis
- Disagree? Click an alternative — it re-analyzes instantly
No silent assumptions. No guessing games.
When data is incomplete or context matters, it says so:
"I can only see 6 nutrients. Without fiber data, I can't
assess digestive impact."
"For someone with hypertension, this is risky. For a
healthy athlete post-workout, it's fine."
It doesn't pretend to know what it doesn't.
Your nutrition label goes through 4 specialized agents:
📸 Scan Label
↓
┌─────────────────────────────────────────────┐
│ PARSER AGENT │
│ Extracts nutrients from OCR text │
├─────────────────────────────────────────────┤
│ INTENT AGENT │
│ "Why did you scan this?" │
│ → quick energy? protein source? diet check?│
├─────────────────────────────────────────────┤
│ FILTER AGENT │
│ Removes irrelevant nutrients │
│ → Checking protein? Ignore vitamins. │
├─────────────────────────────────────────────┤
│ ANALYSIS AGENT │
│ Verdict tied to YOUR goal │
│ → "For quick energy: NOT IDEAL. Too much │
│ fat will slow digestion." │
└─────────────────────────────────────────────┘
↓
📊 Verdict + Concerns + Recommendation
| Layer | Tech |
|---|---|
| AI | Gemini 2.5 Flash via Langchain |
| Backend | Express.js, Socket.io |
| Frontend | React 19, Vite, Tailwind |
| OCR | Tesseract.js |
Prerequisites: Node.js 18+, Gemini API key
# 1. Clone and setup backend
cd be
npm install
echo "GEMINI_API_KEY=your_key_here" > .env
npm run dev
# 2. In another terminal, setup frontend
cd fe
npm install
npm run devOpen http://localhost:5173 → Upload a nutrition label → Get verdict
| Endpoint | What it does |
|---|---|
POST /api/v1/scan/analyze/stream |
Scan + full analysis (SSE) |
POST /api/v1/scan/reanalyze |
Re-analyze with different intent |
POST /api/v1/chat |
Follow-up conversation |
be/src/agent/
├── parser-agent.js # OCR → structured nutrients
├── intent-agent.js # Infer user's goal
├── filter-agent.js # Remove noise
├── analysis-agent.js # Generate verdict
├── orchestrator-agent.js # Coordinate pipeline
└── copilot-agent.js # Chat follow-ups
fe/src/pages/
├── IngredientScanner.jsx # Scan + results
└── Chat.jsx # Follow-up chat
Input: Burger nutrition label
Agent output:
🎯 Assuming: heart health check
📊 Focusing on 3 of 9 nutrients
⚠️ NOT IDEAL FOR YOUR GOAL
Saturated Fat: 6g (30% daily limit)
→ Directly raises LDL cholesterol
Cholesterol: 105mg (35% daily limit)
→ Compounds the saturated fat issue
Sodium: 90mg (4% daily limit)
→ Actually good for a burger
VERDICT: The low sodium is a plus, but saturated
fat and cholesterol make this risky for heart health.
Consider leaner alternatives.
- ❌ A calorie counter
- ❌ A meal planner
- ❌ A polite assistant that hedges every answer
- ✅ A copilot that tells you the truth
- ✅ Analysis tied to your specific goal
- ✅ Data-backed verdicts you can act on
Better UI
Real-time typing effects, animated agent transitions, and a cleaner mobile experience.
Open Food Facts API
Compare scanned products against a database of 3M+ products. Get recommendations like "This has 40% less sugar than similar cereals."
LangGraph Integration
Migrate from sequential agent calls to LangGraph's state machine. Enables conditional branching, parallel agent execution, and more complex reasoning flows.
Built for Encode 2026