# ahmed-code120/ahmed-s-health-dashboard architecture

> Architecture diagram of the GitHub repository ahmed-code120/ahmed-s-health-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed-code120/ahmed-s-health-dashboard
- Repository: https://github.com/ahmed-code120/ahmed-s-health-dashboard

## Overview

HealthCore is a fitness and nutrition dashboard for tracking meals, workouts, and weight, with a summary dashboard and configurable goals and Ramadan mode. The user enters through the routed app, then uses individual tracking screens; meal descriptions can be sent for AI nutrition analysis. The sampled screens mostly show mock or in-memory state, not durable tracking storage. The meal-analysis request is visible, but the server implementation and any database behavior were not sampled, so those relationships are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/App.tsx) (Routes and Auth), [`src/components/Card.tsx`](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Card.tsx) (Card UI), [`src/pages/Meals.tsx`](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Meals.tsx) (Meal Tracking), [`src/pages/Dashboard.tsx`](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Dashboard.tsx) (Health Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_entry["React Entry<br/>[main.tsx]"]
  node_router["Routes and Auth<br/>[App.tsx]"]
  node_layout["App Layout<br/>[Layout.tsx]"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_login["Login Screen<br/>[Login.tsx]"]
end

subgraph group_tracking["Health Tracking"]
  node_dashboard["Health Dashboard<br/>[Dashboard.tsx]"]
  node_meals["Meal Tracking<br/>[Meals.tsx]"]
  node_workout["Workout Tracking<br/>[Workout.tsx]"]
  node_weight["Weight Tracking<br/>[Weight.tsx]"]
end

subgraph group_settings["Configuration"]
  node_settings["Settings Screen<br/>[Settings.tsx]"]
  node_settings_state["Settings State"]
end

subgraph group_shared["Shared UI"]
  node_card["Card UI<br/>[Card.tsx]"]
end

node_user(("User"))
node_meal_analysis{{"Meal Analysis API"}}

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"routes to"| node_layout
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_meals
node_router -->|"routes to"| node_workout
node_router -->|"routes to"| node_weight
node_router -->|"routes to"| node_settings
node_layout -->|"renders"| node_sidebar
node_layout -->|"hosts route"| node_dashboard
node_dashboard -->|"renders"| node_card
node_meals -->|"renders"| node_card
node_workout -->|"renders"| node_card
node_weight -->|"renders"| node_card
node_settings -->|"renders"| node_card
node_router -->|"provides state"| node_settings_state
node_dashboard -->|"reads settings"| node_settings_state
node_meals -->|"reads settings"| node_settings_state
node_settings -->|"updates settings"| node_settings_state
node_meals -->|"requests analysis"| node_meal_analysis

click node_entry "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/main.tsx"
click node_router "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/App.tsx"
click node_layout "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Layout.tsx"
click node_sidebar "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Sidebar.tsx"
click node_login "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Login.tsx"
click node_dashboard "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Dashboard.tsx"
click node_meals "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Meals.tsx"
click node_workout "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Workout.tsx"
click node_weight "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Weight.tsx"
click node_settings "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Settings.tsx"
click node_settings_state "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/context/SettingsContext.tsx"
click node_card "https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Card.tsx"

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_entry,node_router,node_layout,node_sidebar,node_login,node_user toneBlue
class node_dashboard,node_meals,node_workout,node_weight toneAmber
class node_settings,node_settings_state,node_meal_analysis toneMint
class node_card toneRose
```

## Components

### App Shell

- [React Entry](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/main.tsx): `src/main.tsx`
- [Routes and Auth](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/App.tsx): `src/App.tsx`
- [App Layout](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`
- [Navigation](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Login Screen](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`

### Health Tracking

- [Health Dashboard](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Meal Tracking](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Meals.tsx): `src/pages/Meals.tsx`
- [Workout Tracking](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Workout.tsx): `src/pages/Workout.tsx`
- [Weight Tracking](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Weight.tsx): `src/pages/Weight.tsx`

### Configuration

- [Settings Screen](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [Settings State](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/context/SettingsContext.tsx): `src/context/SettingsContext.tsx`

### Shared UI

- [Card UI](https://github.com/ahmed-code120/ahmed-s-health-dashboard/blob/main/src/components/Card.tsx): `src/components/Card.tsx`

### Other components

- **User**
- **Meal Analysis API**

## Connections

- User → React Entry: opens app (evidence: `src/main.tsx`)
- React Entry → Routes and Auth: renders (evidence: `src/main.tsx`)
- Routes and Auth → App Layout: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Login Screen: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Health Dashboard: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Meal Tracking: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Workout Tracking: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Weight Tracking: routes to (evidence: `src/App.tsx`)
- Routes and Auth → Settings Screen: routes to (evidence: `src/App.tsx`)
- App Layout → Navigation: renders (evidence: `src/components/Layout.tsx`)
- App Layout → Health Dashboard: hosts route (evidence: `src/components/Layout.tsx`)
- Health Dashboard → Card UI: renders (evidence: `src/pages/Dashboard.tsx`)
- Meal Tracking → Card UI: renders (evidence: `src/pages/Meals.tsx`)
- Workout Tracking → Card UI: renders (evidence: `src/pages/Workout.tsx`)
- Weight Tracking → Card UI: renders (evidence: `src/pages/Weight.tsx`)
- Settings Screen → Card UI: renders (evidence: `src/pages/Settings.tsx`)
- Routes and Auth → Settings State: provides state (evidence: `src/App.tsx`)
- Health Dashboard → Settings State: reads settings (evidence: `src/pages/Dashboard.tsx`)
- Meal Tracking → Settings State: reads settings (evidence: `src/pages/Meals.tsx`)
- Settings Screen → Settings State: updates settings (evidence: `src/pages/Settings.tsx`)
- Meal Tracking → Meal Analysis API: requests analysis (evidence: `src/pages/Meals.tsx`)
