# lokesh00-11/foodie-ai architecture

> Architecture diagram of the GitHub repository lokesh00-11/foodie-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lokesh00-11/foodie-ai
- Repository: https://github.com/lokesh00-11/foodie-ai

## Overview

Foodie AI combines a React health-coaching workspace with a Flask nutrition service. The main journey is account access, entering health and diet details, generating a weekly meal plan with deficiency analysis, then reviewing and tracking meals; users can also access workout videos and coaching features. The sampled frontend confirms authentication, nutrition requests, calorie estimation, and workout media. The README documents recipe generation and conversational coaching, but their wiring is not visible in the sampled source; those links are therefore left unspecified.

Main entry points: [`myapp/src/components/DashboardLayout.jsx`](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/DashboardLayout.jsx) (Workspace layout), [`nutri/app.py`](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py) (Nutrition API), [`myapp/src/App.jsx`](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/App.jsx) (Route application), [`myapp/src/components/TrackerDashboard.jsx`](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/TrackerDashboard.jsx) (Meal tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Route application<br/>[App.jsx]"]
  node_auth["Authentication<br/>[Auth.jsx]"]
  node_workspace["Workspace layout"]
  node_inputs["Health and diet inputs<br/>[InputSection.jsx]"]
  node_results["Plan results<br/>[ResultPage.jsx]"]
  node_dashboard["Meal tracking"]
  node_history["Plan history<br/>[Dashboard.jsx]"]
  node_profile["Profile<br/>[ProfilePage.jsx]"]
  node_settings["Settings<br/>[SettingsPage.jsx]"]
end

subgraph group_nutrition["Nutrition service"]
  node_nutrition_api["Nutrition API<br/>[app.py]"]
  node_plan_engine["Meal plan generation<br/>[app.py]"]
  node_deficiency["Deficiency analysis<br/>[app.py]"]
  node_ai_capabilities["AI coaching and recipes<br/>[app.py]"]
end

subgraph group_state["Application state"]
  node_food_data["Food dataset"]
  node_food_db[("Foodie database<br/>[foodie.db]")]
end

subgraph group_wellness["Wellness features"]
  node_coach["AI coach interface<br/>[AICoach.jsx]"]
  node_workouts["Workout sessions<br/>[Workoutspage.jsx]"]
  node_videos["Exercise videos"]
  node_dashboard_tracker["Health dashboard"]
end

node_person(("User"))
node_genai{{"Generative AI service"}}

node_person -->|"opens"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_workspace
node_workspace -->|"displays"| node_inputs
node_workspace -->|"displays"| node_results
node_workspace -->|"displays"| node_dashboard
node_workspace -->|"displays"| node_history
node_workspace -->|"displays"| node_profile
node_workspace -->|"displays"| node_settings
node_workspace -->|"displays"| node_coach
node_workspace -->|"displays"| node_workouts
node_auth -->|"posts login/register"| node_nutrition_api
node_inputs -->|"posts profile"| node_nutrition_api
node_nutrition_api -->|"generates plan"| node_plan_engine
node_plan_engine -->|"reads foods"| node_food_data
node_plan_engine -->|"analyzes diet"| node_deficiency
node_nutrition_api -->|"stores plans/users"| node_food_db
node_nutrition_api -.->|"requests AI insights"| node_ai_capabilities
node_ai_capabilities -.->|"generates content"| node_genai
node_results -->|"requests nutrition"| node_nutrition_api
node_dashboard -->|"requests replanning"| node_nutrition_api
node_dashboard -->|"tracks meals"| node_dashboard_tracker
node_workouts -->|"plays media"| node_videos

click node_app "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/App.jsx"
click node_auth "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Auth.jsx"
click node_workspace "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/DashboardLayout.jsx"
click node_inputs "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/InputSection.jsx"
click node_results "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/ResultPage.jsx"
click node_dashboard "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/TrackerDashboard.jsx"
click node_history "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Dashboard.jsx"
click node_profile "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/ProfilePage.jsx"
click node_settings "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/SettingsPage.jsx"
click node_nutrition_api "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py"
click node_plan_engine "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py"
click node_deficiency "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py"
click node_ai_capabilities "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py"
click node_food_data "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/dataset/final%20food%20dataset.csv"
click node_food_db "https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/foodie.db"
click node_coach "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/AICoach.jsx"
click node_workouts "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Workoutspage.jsx"
click node_videos "https://github.com/lokesh00-11/foodie-ai/tree/main/myapp/public/assets/videos"
click node_dashboard_tracker "https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/TrackerDashboard.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_auth,node_workspace,node_inputs,node_results,node_dashboard,node_history,node_profile,node_settings,node_person toneBlue
class node_nutrition_api,node_plan_engine,node_deficiency,node_ai_capabilities toneAmber
class node_food_data,node_food_db toneMint
class node_coach,node_workouts,node_videos,node_dashboard_tracker toneRose
class node_genai toneIndigo
```

## Components

### User experience

- [Route application](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/App.jsx): `myapp/src/App.jsx`
- [Authentication](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Auth.jsx): `myapp/src/components/Auth.jsx`
- [Workspace layout](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/DashboardLayout.jsx): `myapp/src/components/DashboardLayout.jsx`
- [Health and diet inputs](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/InputSection.jsx): `myapp/src/components/InputSection.jsx`
- [Plan results](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/ResultPage.jsx): `myapp/src/components/ResultPage.jsx`
- [Meal tracking](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/TrackerDashboard.jsx): `myapp/src/components/TrackerDashboard.jsx`
- [Plan history](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Dashboard.jsx): `myapp/src/components/Dashboard.jsx`
- [Profile](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/ProfilePage.jsx): `myapp/src/components/ProfilePage.jsx`
- [Settings](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/SettingsPage.jsx): `myapp/src/components/SettingsPage.jsx`

### Nutrition service

- [Nutrition API](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py): `nutri/app.py`
- [Meal plan generation](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py): `nutri/app.py`
- [Deficiency analysis](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py): `nutri/app.py`
- [AI coaching and recipes](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/app.py): `nutri/app.py`

### Application state

- [Food dataset](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/dataset/final%20food%20dataset.csv): `nutri/dataset/final food dataset.csv`
- [Foodie database](https://github.com/lokesh00-11/foodie-ai/blob/main/nutri/foodie.db): `nutri/foodie.db`

### Wellness features

- [AI coach interface](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/AICoach.jsx): `myapp/src/components/AICoach.jsx`
- [Workout sessions](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/Workoutspage.jsx): `myapp/src/components/Workoutspage.jsx`
- [Exercise videos](https://github.com/lokesh00-11/foodie-ai/tree/main/myapp/public/assets/videos): `myapp/public/assets/videos`
- [Health dashboard](https://github.com/lokesh00-11/foodie-ai/blob/main/myapp/src/components/TrackerDashboard.jsx): `myapp/src/components/TrackerDashboard.jsx`

### Other components

- **User**
- **Generative AI service**

## Connections

- User → Route application: opens
- Route application → Authentication: routes to
- Route application → Workspace layout: routes to
- Workspace layout → Health and diet inputs: displays
- Workspace layout → Plan results: displays
- Workspace layout → Meal tracking: displays
- Workspace layout → Plan history: displays
- Workspace layout → Profile: displays
- Workspace layout → Settings: displays
- Workspace layout → AI coach interface: displays
- Workspace layout → Workout sessions: displays
- Authentication → Nutrition API: posts login/register
- Health and diet inputs → Nutrition API: posts profile
- Nutrition API → Meal plan generation: generates plan
- Meal plan generation → Food dataset: reads foods
- Meal plan generation → Deficiency analysis: analyzes diet
- Nutrition API → Foodie database: stores plans/users
- Nutrition API → AI coaching and recipes: requests AI insights
- AI coaching and recipes → Generative AI service: generates content
- Plan results → Nutrition API: requests nutrition
- Meal tracking → Nutrition API: requests replanning
- Meal tracking → Health dashboard: tracks meals
- Workout sessions → Exercise videos: plays media
