Infinity AI Buildfest Hackathon documentation and developer guide
DesiDiet is an AI-native personalised nutrition platform for Bangladesh. It combines a FastAPI backend, Neo4j GraphRAG knowledge graph, Prisma-backed user data, a React web dashboard, and an Expo mobile app to deliver culturally relevant meal planning, food safety explanations, meal tracking, medicine reminders, and nutrition reports.
The project was built for the Infinity AI Buildfest Hackathon as a practical nutrition engine rather than a generic diet chatbot. It grounds recommendations in Bangladeshi food data, disease-aware dietary rules, RDA-style nutrient targets, local meal pairing logic, and a streaming LLM experience.
Medical disclaimer: DesiDiet provides educational nutrition assistance. It is not a medical device, diagnosis system, or replacement for a physician, dietitian, or emergency service.
- Project Goals
- Core Capabilities
- System Architecture
- Repository Map
- Technology Stack
- Data and Knowledge Graph
- AI and GraphRAG Pipeline
- Backend Guide
- Frontend Guide
- Mobile Guide
- API Reference
- Database Schema
- Demo Flow
- Validation and Testing
- Hackathon Evaluation Notes
- Contribution Guidelines
- Known Limitations
DesiDiet is designed around four goals:
- Personalise nutrition with real user context: age, gender, weight, height, activity level, goals, conditions, preferences, health logs, and completed meals.
- Make recommendations locally useful: rice, dal, fish, vegetables, snacks, cooked dishes, Bangladeshi dietary patterns, and Bengali-first UX.
- Explain food safety and nutrient reasoning: GraphRAG retrieves safe foods, disease nutrients, RDA contribution, compatible meal slots, and pairings before the LLM speaks.
- Provide a complete product loop: onboard, generate a plan, track meals, ask the AI nutritionist, analyse swaps, manage medicine reminders, and review progress reports.
- Phone or email based registration and login.
- JWT access and refresh token flow.
- Profile wizard for name, age, gender, weight, height, activity, goal, conditions, preferred foods, and disliked foods.
- Calorie target calculation using Mifflin-St Jeor, South Asian BMI categories, ideal body weight, goal adjustments, and macro targets.
- Safe food retrieval for diabetes, hypertension, heart disease, renal conditions, liver disease, pregnancy, lactation, elderly nutrition, cancer, tuberculosis, hypothyroidism, diarrhea, weight loss, and weight gain rules.
- Neo4j food graph search by Bangla or English names.
- Food detail and justification endpoints.
- AI food insights for search results and meal builder decisions.
- Daily and weekly AI meal plans.
- Breakfast, snacks, lunch, and dinner slot logic.
- Meal pairing support through graph relationships.
- Calorie scaling against the user's target.
- Completed-slot tracking and micronutrient progress cards.
- Feedback, regeneration, editing, and swap workflows in the web app.
- Server-Sent Events streaming chat.
- Context includes profile, nutrition targets, health logs, current meal plan, recent tracking, and GraphRAG food context.
- Guided diet-plan chat session that collects missing profile data conversationally, saves the profile, and generates a plan.
- Natural-language meal logging such as "I ate rice, dal and fish at lunch".
- LLM extraction of foods, calories, macros, feedback, and warnings.
- Custom meal builder for analysing proposed meals or swaps.
- Safety grades, warnings, suggestions, and macro estimates.
- Nutrition report with calorie, macro, BMI, ideal weight, and latest health information.
- Condition report with weekly summary and AI narrative.
- 3, 7, and 10 day health summary endpoint for charts.
- Medicine reminder parsing from natural language.
- Mobile profile screen supports medicine add/list/delete and notification preference UI.
- React web app for landing pages, authentication, profile, chat, meal plans, food explorer, health logs, reports, and medicine reminders.
- Expo mobile app with Bengali-first auth, onboarding, home dashboard, chat, meal plan, meal builder, meal tracker, report, profile, settings, and medicine reminders.
flowchart LR
User["User"]
Web["React Web App<br/>Vite + Tailwind"]
Mobile["Expo Mobile App<br/>Expo Router"]
API["FastAPI Backend<br/>Pydantic Routers"]
Auth["JWT Auth<br/>Prisma User DB"]
Planner["Meal Plan Service<br/>GraphRAG + LLM"]
Chat["Streaming Chat Service<br/>SSE"]
Graph["Neo4j Food Graph<br/>Foods, nutrients, diseases, pairings"]
SQLite["SQLite via Prisma<br/>Profiles, logs, plans, tracking"]
LLM["Groq/OpenAI-compatible LLM<br/>Llama 3.3 70B default"]
Data["CSV + NDG Sources<br/>BD foods, RDA, rules, pairings"]
User --> Web
User --> Mobile
Web --> API
Mobile --> API
API --> Auth
API --> Planner
API --> Chat
API --> SQLite
Planner --> Graph
Chat --> Graph
Planner --> LLM
Chat --> LLM
Data --> Graph
| Layer | Implementation |
|---|---|
| User Interaction | React 18 web app, Expo React Native mobile app, Bengali-first flows, streaming chat UI |
| Application Logic | FastAPI routers, Pydantic schemas, JWT dependencies, Prisma data access |
| AI Intelligence | OpenAI-compatible async client, Groq default base URL, Llama 3.3 70B default model, strict JSON prompts |
| Knowledge Retrieval | Neo4j GraphRAG, SentenceTransformer disease matching, RDA contribution ranking, NDG-derived rules |
| Agent Orchestration | meal_plan_service.py, diet-plan chat service, meal builder, meal tracking, medicine parsing |
| Data Infrastructure | Prisma Client Python, SQLite dev database, Neo4j graph, CSV data ingestion scripts |
| Automation and Integration | SSE streaming, Vite API proxy, medicine schedule extraction, report endpoints |
| Deployment Readiness | Docker-friendly Neo4j, Uvicorn backend, Vite frontend, Expo mobile workflow |
.
|-- README.md
|-- micronutrient_rich_foods.csv
|-- plan.md
|-- docs/
| |-- architecture.md
| |-- DesiDiet Arhitecture.png
| `-- DesiDiet.docx
|-- backend/
| |-- app/
| | |-- main.py
| | |-- config.py
| | |-- db.py
| | |-- dependencies.py
| | |-- schemas.py
| | |-- routers/
| | |-- services/
| | |-- core/
| | |-- logic/
| | `-- models/
| |-- rag_engine/
| |-- data/
| |-- scripts/
| |-- prisma/
| |-- migrate_to_graph.py
| |-- migrate_food_compatibility.py
| |-- validate_project.py
| |-- requirements.txt
| `-- validation output CSV/TXT files
|-- frontend/
| |-- src/
| | |-- App.tsx
| | |-- main.tsx
| | |-- pages/
| | |-- components/
| | |-- contexts/
| | |-- hooks/
| | |-- lib/
| | `-- types/
| |-- public/
| |-- docs/
| |-- package.json
| |-- vite.config.ts
| `-- tailwind.config.js
`-- mobile/
|-- app/
| |-- (auth)/
| |-- (tabs)/
| `-- _layout.tsx
|-- components/
|-- context/
|-- hooks/
|-- lib/
|-- store/
|-- assets/
|-- app.json
`-- package.json
Generated or local-only folders such as frontend/node_modules, frontend/dist, frontend/.vite, backend/venv, .DS_Store, and the SQLite database are not the source of truth for implementation decisions.
| Area | Stack |
|---|---|
| Backend API | Python, FastAPI, Pydantic, Uvicorn |
| Auth | JWT, password hashing, HTTP bearer dependencies |
| Relational data | Prisma Client Python, SQLite development database |
| Knowledge graph | Neo4j driver, Cypher queries, graph migration scripts |
| AI client | OpenAI-compatible async client, Groq default endpoint |
| Embeddings and ranking | SentenceTransformers, scikit-learn/numpy style similarity flow |
| Web frontend | React 18, TypeScript, Vite, Tailwind CSS, Framer Motion, Recharts, i18next, lucide-react |
| Mobile frontend | Expo, React Native, Expo Router, TanStack Query, Zustand, AsyncStorage, react-native-sse, lucide-react-native |
| Data | Bangladeshi foods CSV, RDA CSV, disease nutrient CSV, food pairing CSV, food compatibility CSV, NDG-derived rule data |
| File | Purpose |
|---|---|
backend/data/BD_food_details.csv |
Bangladeshi food nutrient dataset with food code, English/Bangla names, groups, calories, macros, micronutrients, and related nutrient columns |
backend/data/Indian_RDA.csv |
RDA values by nutrient, age group, gender, and unit |
backend/data/disease_nutrients.csv |
Disease-to-nutrient recommendation mapping |
backend/data/nutrients_abbreviations.csv |
Nutrient code, name, and tag mapping |
backend/data/food_pairings.csv |
Food-to-food pairing relationships with popularity, type, and slot |
backend/data/food_compatibility.csv |
Meal slot compatibility, food roles, and pairing groups |
backend/scripts/preprocessing/bd_foods_clean.csv |
Cleaned food data generated by preprocessing |
backend/scripts/preprocessing/ndg_foods.csv |
National Dietary Guidelines aligned food entries |
micronutrient_rich_foods.csv |
Root-level micronutrient-rich food reference |
Use these for the current graph setup:
cd backend
python migrate_to_graph.py
python migrate_food_compatibility.pyThe active migration path loads foods, nutrients, RDA data, diseases, pairings, meal slots, and compatibility relationships into Neo4j.
Avoid using older migration experiments for new deployments unless you review them first. In particular, backend/scripts/build_graph.py and backend/scripts/migrate_to_graph.py contain stale assumptions from earlier project structure.
| Concept | Description |
|---|---|
| Food | Bangladeshi food items with nutrient values and names |
| Nutrient | Protein, carbohydrate, fat, vitamins, minerals, and other nutrition dimensions |
| Disease | Condition nodes used for disease-specific nutrition needs |
| MealSlot | Breakfast, snacks, lunch, dinner, and compatibility metadata |
| RDA | Recommended dietary values by age/gender/nutrient |
| Pairing | Food combinations through PAIRS_WITH and compatibility relationships |
backend/rag_engine/calorie_engine.py calculates:
- BMI and South Asian BMI category.
- Basal metabolic rate using Mifflin-St Jeor.
- Activity-adjusted TDEE.
- Goal-adjusted daily calories.
- Ideal body weight using Devine-style logic.
- Macro split: protein, carbohydrate, fat.
- Fiber and water targets.
backend/rag_engine/planner.py performs the clinical retrieval path:
- Normalize profile conditions.
- Match conditions semantically with
SentenceTransformer. - Retrieve disease-relevant nutrients from Neo4j.
- Map clinical nutrient terms to scientific column names.
- Match the user to RDA keys by age and gender.
- Rank foods by nutrient contribution against the user profile.
- Return RAG-recommended foods with reasons.
backend/app/services/meal_plan_service.py coordinates the main planning flow:
- Load the user profile, latest health log, and nutrition targets.
- Query GraphRAG for safe/recommended foods.
- Retrieve food pairings and meal-slot compatible foods.
- Ask the LLM for strict JSON daily or weekly meal plans.
- Scale meal calories toward the target.
- Save the plan in Prisma.
- Expose completed-slot and micronutrient progress to clients.
backend/app/routers/chat.py streams chat replies with:
- User profile.
- Calculated targets.
- Latest health log.
- Today's plan.
- Recent meal tracking.
- GraphRAG food context.
- Conversation history.
The mobile and web apps consume the stream using Server-Sent Events.
- Python 3.11+ recommended.
- Neo4j 5.x.
- SQLite for development.
- A Groq or OpenAI-compatible API key.
- Node/npm only if you also run the web or mobile clients.
Create or update backend/.env:
DATABASE_URL="file:./prisma/dev.db"
NEO4J_URI="bolt://localhost:7687"
NEO4J_USER="neo4j"
NEO4J_PASSWORD="khadok2025"
JWT_SECRET="replace-with-a-long-random-secret"
JWT_ALGORITHM="HS256"
ACCESS_TOKEN_EXPIRE_MINUTES=30
REFRESH_TOKEN_EXPIRE_DAYS=7
LLM_API_KEY="replace-with-your-provider-key"
LLM_BASE_URL="https://api.groq.com/openai/v1"
LLM_MODEL="llama-3.3-70b-versatile"
LLM_MAX_TOKENS=1024
APP_NAME="DesiDiet Personalised Nutrition Engine"
CORS_ORIGINS="http://localhost:5173,http://localhost:8081,http://localhost:19006"The root .env is used for Neo4j mode and Docker/cloud connection settings. Do not commit real secrets.
docker run -d \
--name desidiet-neo4j \
-p 7474:7474 \
-p 7687:7687 \
-e NEO4J_AUTH=neo4j/khadok2025 \
neo4j:5Neo4j Browser will be available at:
http://localhost:7474
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtNote: backend/requirements.txt is currently encoded as UTF-16 LE. If your pip install cannot read it, convert during install:
iconv -f UTF-16LE -t UTF-8 requirements.txt > /tmp/desidiet-requirements.txt
pip install -r /tmp/desidiet-requirements.txtThe code also imports runtime packages such as Prisma Client Python, the OpenAI-compatible client, JWT/password tooling, and Neo4j. If a fresh environment reports missing imports, install the missing runtime package and update backend/requirements.txt so the environment remains reproducible.
cd backend
python -m prisma generate
python -m prisma db pushIf the prisma executable is available directly, these are equivalent:
prisma generate
prisma db pushThe development database is stored at backend/prisma/dev.db.
cd backend
python migrate_to_graph.py
python migrate_food_compatibility.pyOptional validation:
python validate_project.pyExisting validation artifacts include:
backend/coverage_results.txtbackend/latency_results.csvbackend/rank_stability.csvbackend/cosine_distribution.csv
cd backend
source venv/bin/activate
uvicorn app.main:app --reload --host 127.0.0.1 --port 8000Useful URLs:
http://127.0.0.1:8000/health
http://127.0.0.1:8000/docs
http://127.0.0.1:8000/redoc
| Path | Responsibility |
|---|---|
backend/app/main.py |
FastAPI app creation, CORS, lifespan, router registration, health endpoint |
backend/app/config.py |
Pydantic settings loaded from .env |
backend/app/db.py |
Prisma and Neo4j lifecycle wiring |
backend/app/dependencies.py |
JWT bearer authentication helpers |
backend/app/schemas.py |
API request and response schemas |
backend/app/core/security.py |
Password hashing and JWT creation/verification |
backend/app/core/llm_client.py |
Async OpenAI-compatible chat and streaming client |
backend/app/routers/ |
API route modules |
backend/app/services/meal_plan_service.py |
Main AI meal plan orchestration |
backend/app/services/diet_plan_chat_service.py |
Guided chat-based profile and diet-plan flow |
backend/rag_engine/ |
Calorie engine, food engine, dietary rules, GraphRAG planner |
backend/prisma/schema.prisma |
Relational schema |
The web app is a Vite React application in frontend/.
- Node.js 18+.
- Running backend at
http://127.0.0.1:8000.
cd frontend
npm install
npm run devDefault Vite URL:
http://localhost:5173
The Vite config proxies these API routes to the backend:
/auth
/profile
/health-logs
/meal-plans
/chat
/foods
/reports
/meal-tracking
/medicine-reminders
/meal-builder
npm run dev
npm run build
npm run lint
npm run preview| Route | Screen |
|---|---|
/ |
Public landing page |
/about |
About/story page |
/conditions |
Medical conditions and safety page |
/auth |
Login/register |
/chat |
Protected AI nutrition chat |
/profile |
Protected profile wizard/details |
/health-log |
Protected health logging and trends |
/meal-plan |
Protected daily/tomorrow/history meal planner |
/medicine |
Protected medicine reminder UI |
/foods |
Protected food search and food safety explorer |
/report |
Protected nutrition report and charts |
frontend/src/lib/api.tscentralizes authenticated API calls, refresh-token retry, SSE chat support, and module-specific clients.frontend/src/contexts/AuthContext.tsxmanages auth state and profile refresh.frontend/src/lib/i18n.tscontains English and Bengali interface strings.frontend/src/pages/MealPlan.tsxis the most complete web workflow: plan generation, editing, slot completion, feedback, food justification, and micronutrient progress.frontend/src/pages/ReportPage.tsxrenders 3/7/10 day health report charts.frontend/public/andfrontend/docs/hold the visual assets used by the landing and docs surfaces.
The mobile app is an Expo React Native application in mobile/.
- Node.js 18+.
- Expo CLI through
npx expo. - Running backend accessible from the simulator/device.
Create mobile/.env from the sample:
cd mobile
cp .env.example .envFor iOS simulator or web, localhost can work:
EXPO_PUBLIC_API_URL=http://localhost:8000For a physical phone, use the computer's LAN IP:
EXPO_PUBLIC_API_URL=http://192.168.1.10:8000cd mobile
npm install
npm startOther common Expo commands:
npm run android
npm run ios
npm run web| Area | Files | Capability |
|---|---|---|
| Root app setup | mobile/app/_layout.tsx |
Font loading, React Query provider, auth/settings hydration |
| Auth | mobile/app/(auth)/login.tsx, register.tsx, welcome.tsx |
Bengali login, registration, token storage |
| Onboarding | mobile/app/(auth)/onboarding/ |
Seven-step profile setup and target summary |
| Tabs | mobile/app/(tabs)/_layout.tsx |
Protected tab navigation |
| Home | mobile/app/(tabs)/home.tsx |
Calories, macros, plan snapshot, medicine reminders, health snapshot |
| Chat | mobile/app/(tabs)/chat.tsx |
SSE AI nutrition chat |
| Diet-plan chat | mobile/app/(tabs)/diet-plan.tsx |
Guided plan creation conversation |
| Meals | mobile/app/(tabs)/meals.tsx |
Plan, builder, and tracker tabs |
| Plan view | mobile/components/meals/MealPlanView.tsx |
Daily/weekly plans, generate, mark complete, swap |
| Builder | mobile/components/meals/MealBuilderView.tsx |
Food search, custom meal analysis, safety grade |
| Tracker | mobile/components/meals/MealTrackerView.tsx |
Natural-language meal logging |
| Report | mobile/app/(tabs)/report.tsx |
Weekly report cards and charts |
| Profile | mobile/app/(tabs)/profile.tsx |
Profile, medicine reminders, notification switch, language toggle, logout |
mobile/lib/api.tsuses Axios with JWT injection and refresh-token retry.mobile/store/auth-store.tsstores auth state with Zustand and AsyncStorage.mobile/store/onboarding-store.tsstores onboarding draft data.mobile/store/settings-store.tsstores language, notification preference, and meal times.mobile/lib/query-client.tsconfigures TanStack Query caching.mobile/hooks/useHaptics.tswraps Expo haptics.
Base URL for local development:
http://127.0.0.1:8000
| Method | Path | Purpose |
|---|---|---|
GET |
/ |
Root API metadata |
GET |
/health |
Health check |
POST |
/api/generate-plan |
Legacy Q1 journal-style diet plan endpoint |
| Method | Path | Purpose |
|---|---|---|
POST |
/auth/register |
Register by phone/email and password |
POST |
/auth/login |
Login and receive access/refresh tokens |
POST |
/auth/refresh |
Refresh tokens |
GET |
/auth/me |
Return current authenticated user |
| Method | Path | Purpose |
|---|---|---|
POST |
/profile |
Create or upsert profile |
GET |
/profile |
Get profile and calculated targets |
PATCH |
/profile |
Update profile fields |
| Method | Path | Purpose |
|---|---|---|
POST |
/health-logs |
Create health log |
GET |
/health-logs |
List health logs |
GET |
/health-logs/trends |
Weight and blood sugar trends |
| Method | Path | Purpose |
|---|---|---|
GET |
/meal-plans/daily |
Get or generate daily meal plan |
GET |
/meal-plans/weekly |
Get or generate weekly meal plans |
GET |
/meal-plans/history |
List plan history |
POST |
/meal-plans/{plan_id}/feedback |
Submit plan feedback score |
PATCH |
/meal-plans/{plan_id}/mark-complete |
Mark a meal slot complete/incomplete |
PATCH |
/meal-plans/{plan_id}/edit |
Edit plan data |
| Method | Path | Purpose |
|---|---|---|
POST |
/chat |
Stream nutrition chat reply over SSE |
POST |
/chat/diet-plan-session |
Stream guided profile and diet-plan chat |
| Method | Path | Purpose |
|---|---|---|
GET |
/foods/search?q= |
Search food graph |
GET |
/foods/safe-foods |
Return profile-safe foods |
GET |
/foods/search-with-insight?q=&slot= |
Search foods with AI insight and safety label |
GET |
/foods/{code} |
Food details |
GET |
/foods/{code}/justify |
Explain why a food is safe/caution/avoid |
| Method | Path | Purpose |
|---|---|---|
GET |
/reports/nutrition |
Nutrition targets and profile summary |
GET |
/reports/conditions |
Condition-aware weekly summary |
POST |
/reports/send-email |
Simulated email report action |
GET |
/reports/health-summary?days=7 |
Calorie, macro, micronutrient, and weight chart data |
| Method | Path | Purpose |
|---|---|---|
POST |
/meal-tracking |
Natural-language meal log and AI nutrition estimate |
GET |
/meal-tracking/today |
Today's tracked meals |
| Method | Path | Purpose |
|---|---|---|
POST |
/medicine-reminders |
Parse and save medicine schedule |
GET |
/medicine-reminders |
List active medicine reminders |
DELETE |
/medicine-reminders/{id} |
Soft-delete reminder |
| Method | Path | Purpose |
|---|---|---|
POST |
/meal-builder/analyze |
Analyse custom meal items for calories, macros, safety, grade, warnings, and suggestions |
Prisma schema file:
backend/prisma/schema.prisma
Models:
| Model | Purpose |
|---|---|
User |
Authentication identity, phone/email, password hash, language |
Profile |
Demographics, anthropometrics, activity, goal, conditions, food preferences |
HealthLog |
Weight, blood pressure, sugar, HbA1c, notes, symptoms |
MealPlan |
Daily/weekly plans, JSON plan data, calorie targets, language, feedback, completed slots |
ChatMessage |
Stored chat messages |
MealTracking |
Natural-language meal logs, extracted items, calories, macros, AI feedback |
MedicineReminder |
Parsed medicine name, dose, times, days, food relation, notes, active flag |
JSON-like fields are stored as strings in SQLite and converted through helpers in backend/app/utils.py.
Use this flow for a hackathon judge or first-time developer walkthrough:
- Start Neo4j, migrate graph data, and run the FastAPI backend.
- Start the web app or Expo mobile app.
- Register a user with a phone number and password.
- Complete the profile wizard:
- age, gender, height, weight
- activity level
- goal
- medical conditions
- preferences/allergies
- Open the nutrition report to show BMI, calorie target, macro target, and ideal body weight.
- Generate a daily meal plan.
- Open a meal item justification or use food search to show GraphRAG safety reasoning.
- Mark one meal slot complete and observe progress changes.
- Log an unplanned meal in natural language.
- Use the meal builder to analyse a swap or custom plate.
- Ask the AI nutritionist a personalised question.
- Add a medicine reminder using natural language.
- Open the 7-day report to show charts and AI narrative.
curl http://127.0.0.1:8000/healthOpen:
http://127.0.0.1:8000/docs
cd backend
python validate_project.pyReview:
coverage_results.txtlatency_results.csvrank_stability.csvcosine_distribution.csv
cd frontend
npm run build
npm run lintcd mobile
npm run webFor native smoke testing:
npm run android
npm run ios- Register/login works.
- Profile create/update works.
/profilereturns targets.- Neo4j is connected before meal plan generation.
- Daily plan returns valid JSON with meal slots.
- Chat stream emits tokens and ends cleanly.
- Meal tracking saves calories/macros.
- Meal builder returns a grade and warnings/suggestions.
- Food search returns Bangla/English names.
- Medicine reminder parser returns name, dose, time, and with-food metadata.
- Frontend proxy reaches backend.
- Mobile
EXPO_PUBLIC_API_URLpoints to a reachable backend host.
DesiDiet is not a thin LLM wrapper. The LLM is constrained by:
- User profile targets.
- Health logs.
- GraphRAG food retrieval.
- Disease-specific nutrient rules.
- RDA contribution ranking.
- Meal-slot compatibility.
- Food pairings.
- Strict JSON output contracts.
The system uses Bangladeshi food names, Bengali UI copy, local dietary patterns, local meal slots, and NDG-style dietary rules. This is important for adoption because many generic diet apps overfit Western foods and serving assumptions.
Food safety and recommendations are explainable through graph data, not only generated prose. The app can justify a food choice, classify safe/caution/avoid, and show why a plan matches a user's conditions.
The project includes:
- Backend API.
- Knowledge graph ingestion.
- Web client.
- Mobile client.
- Auth.
- Profile management.
- AI chat.
- Meal plans.
- Meal tracking.
- Meal builder.
- Medicine reminders.
- Reports.
That breadth makes it suitable for a live hackathon demo and future product iteration.
- Keep secrets out of git. Use
.envfiles and redacted examples. - Keep data migrations reproducible. When CSV schemas change, update migration scripts and validation outputs together.
- Keep user-facing advice grounded in profile, graph, and clinical rule context.
- Add explicit medical disclaimers for high-risk health guidance.
- Preserve Bengali support in new UX flows.
- Keep generated folders out of reviews unless the change is specifically about build output.
- Add Pydantic request/response schemas in
backend/app/schemas.py. - Add new endpoints under
backend/app/routers/. - Put orchestration logic in
backend/app/services/. - Put graph retrieval logic in
backend/rag_engine/. - Keep LLM prompts strict about JSON when the client depends on structured output.
- Validate Neo4j query changes with
validate_project.pyor focused Cypher checks.
- Use
frontend/src/lib/api.tsfor API calls. - Use existing page/component patterns before adding new global state.
- Keep dashboard routes protected.
- Keep Bengali and English strings aligned when touching i18n.
- Prefer existing Tailwind tokens and component styles.
- Use
mobile/lib/api.tsfor API calls. - Use TanStack Query for server state.
- Use Zustand stores only for local auth/settings/onboarding state.
- Keep physical-device API URLs configurable through
EXPO_PUBLIC_API_URL. - Keep Bengali-first copy consistent across auth, onboarding, tabs, and forms.
- The backend currently depends on Neo4j for the full GraphRAG experience. Without Neo4j, core food search and safe-food logic will be incomplete.
- LLM-powered features require a valid
LLM_API_KEY. - Some internal names still reference earlier project names such as
Khadok-Bangla AIorPushtiAI; this README uses the hackathon-facing product name, DesiDiet. backend/requirements.txtis UTF-16 LE and may need conversion for some package managers.- The requirements file may not list every runtime import used by the current code. Update it after confirming a clean setup.
- Legacy files such as
plan.md, older graph scripts, and some docs mention earlier assumptions like xAI, PostgreSQL, Redis, or oldgraphRAGpaths. Treat the current FastAPI, SQLite, Prisma, Neo4j, Groq/OpenAI-compatible implementation as canonical. frontend/distis generated build output.backend/prisma/dev.dbis a local development SQLite database and should not be used as production data storage.- Email sending is currently simulated in the report router.
- Mobile notification UI exists, but full native scheduled notifications need production wiring.
- Move from SQLite to PostgreSQL for multi-user deployment.
- Add automated backend tests for auth, profile targets, meal planning, chat streaming, and graph retrieval.
- Add frontend and mobile E2E smoke tests.
- Add CI checks for lint, typecheck, build, and migration validation.
- Add real email delivery and push notification scheduling.
- Add secrets management for deployment.
- Containerize backend, frontend, and graph setup.
- Add observability for LLM latency, graph latency, token usage, and recommendation quality.
- Add clinician review workflow for high-risk condition guidance.
This repository is prepared for the Infinity AI Buildfest Hackathon. Before public release or clinical use, review data licensing, medical safety requirements, security posture, and deployment compliance.