How adarshyadav9/enigma_noman works
Health Track is a personalized dietary-risk alert app. Users select health conditions, search for a dish or enter ingredients, and review a risk assessment with flagged and safe ingredients, sodium warnings, and hidden-additive alerts. The backend also exposes OCR-based ingredient analysis; the sampled frontend API provides an OCR request function, but no image-upload UI was present in the sampled source. Backend route handling and risk-analysis logic are sampled; some frontend component internals are not.
Main entry points: main.py FastAPI routes · DishSearch.tsx Dish and ingredient entry · api.ts API client · page.tsx Home screen
Components 14
Web app
- Home screen
frontend/app/page.tsx - Condition selector
frontend/components/ConditionSelector.tsx - Dish and ingredient entry
frontend/components/DishSearch.tsx - User state
frontend/store/userStore.ts - API client
frontend/services/api.ts - Result screen
frontend/app/result/page.tsx - Risk details
frontend/components/RiskCard.tsx
Analysis backend
- FastAPI routes
backend/main.py - Risk analysis
backend/risk_engine.py
Risk data
- Dish catalog
backend/data/indian_dishes.json - Condition risk rules
backend/data/condition_risks.json
Image analysis
- Ingredient extraction
backend/ocr_service.py
Other components
- User
- Tesseract OCR
Connections 16
- User → Home screen: uses
- Home screen → Condition selector: renders
- Home screen → Dish and ingredient entry: renders
- Condition selector → User state: updates
- Dish and ingredient entry → User state: reads and updates
- Dish and ingredient entry → API client: requests search and analysis
- API client → FastAPI routes: calls HTTP routes
- FastAPI routes → Dish catalog: reads catalog
- FastAPI routes → Risk analysis: requests analysis
- FastAPI routes → Ingredient extraction: requests extraction
- Risk analysis → Condition risk rules: reads rules
- Ingredient extraction → Tesseract OCR: extracts image text
- FastAPI routes → API client: returns results
- API client → Dish and ingredient entry: returns search and analysis data
- Result screen → User state: reads result
- Result screen → Risk details: renders result