# singhdhairya17/wellus-app architecture

> Architecture diagram of the GitHub repository singhdhairya17/wellus-app, 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/singhdhairya17/wellus-app
- Repository: https://github.com/singhdhairya17/wellus-app

## Overview

Wellus is a mobile nutrition and health-goal app. Users enter through onboarding and authentication, set personal targets, then log or scan food, track hydration, exercise, and weight, and review nutrition insights and progress; separate flows support AI coaching, recipe planning, and reminders. The graph includes major README capabilities whose detailed wiring is not established by the sampled excerpts; edges are limited to documented calls or visible source calls, so some feature-to-backend links are omitted.

Main entry points: [`app/(tabs)/_layout.jsx`](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/_layout.jsx) (Main tabs), [`convex/schema.js`](https://github.com/singhdhairya17/wellus-app/blob/main/convex/schema.js) (Convex data), [`app/index.jsx`](https://github.com/singhdhairya17/wellus-app/blob/main/app/index.jsx) (Entry and onboarding), [`app/(tabs)/Home.jsx`](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Home.jsx) (Nutrition dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile app"]
  node_entry["Entry and onboarding<br/>[index.jsx]"]
  node_auth["Sign in and sign up<br/>[SignIn.jsx]"]
  node_tabs["Main tabs<br/>[_layout.jsx]"]
  node_home["Nutrition dashboard<br/>[Home.jsx]"]
  node_meals["Meal logging<br/>[Meals.jsx]"]
  node_scan["Label scanning<br/>[index.jsx]"]
  node_preferences["Diet preferences<br/>[index.jsx]"]
  node_tracking["Health tracking<br/>[Progress.jsx]"]
  node_analytics["Progress insights"]
  node_recipes["Recipe planning<br/>[index.jsx]"]
  node_coach["Health coach<br/>[index.jsx]"]
  node_reminder["Reminder settings<br/>[index.jsx]"]
  node_billing["Plans and billing<br/>[index.jsx]"]
  node_profile["Profile management<br/>[ProfileManager.jsx]"]
end

subgraph group_services["App services"]
  node_ocr["OCR pipeline<br/>[OCRService.jsx]"]
  node_preprocess["Image preprocessing"]
  node_localocr["On-device OCR"]
  node_monitor["Adaptive monitoring"]
  node_xai["Explainable insights<br/>[XAIService.jsx]"]
  node_scheduler["Reminder scheduler"]
  node_convexclient["Convex client<br/>[convexClient.js]"]
end

subgraph group_backend["Convex backend"]
  node_convexai["AI actions<br/>[Ai.js]"]
  node_profiles["Profile functions<br/>[Profiles.js]"]
  node_mealplan["Meal plan functions<br/>[MealPlan.jsx]"]
  node_recipesapi["Recipe functions<br/>[Recipes.js]"]
  node_trackingapi["Tracking functions<br/>[Tracking.js]"]
  node_remindersapi["Reminder functions<br/>[Reminders.js]"]
  node_usersapi["User functions<br/>[Users.js]"]
  node_billingapi["Billing functions<br/>[Billing.js]"]
  node_database[("Convex data<br/>[schema.js]")]
end

subgraph group_external["External services"]
  node_firebase["Firebase Auth<br/>[FirebaseConfig.jsx]"]
  node_openai["OpenAI"]
  node_notifications["Device notifications"]
end

node_user(("App user"))

node_user -->|"starts"| node_entry
node_entry -->|"routes to"| node_auth
node_auth -->|"authenticates"| node_firebase
node_entry -->|"enters app"| node_tabs
node_tabs -->|"shows"| node_home
node_tabs -->|"opens"| node_meals
node_tabs -->|"opens"| node_scan
node_tabs -->|"opens"| node_tracking
node_tabs -->|"opens"| node_profile
node_preferences -->|"queries and updates"| node_profiles
node_scan -->|"extracts nutrition"| node_ocr
node_ocr -->|"preprocesses image"| node_preprocess
node_ocr -->|"tries local OCR"| node_localocr
node_scan -.->|"explains nutrition"| node_xai
node_meals -.->|"records meals"| node_trackingapi
node_tracking -.->|"records activity"| node_trackingapi
node_home -.->|"shows adaptive guidance"| node_monitor
node_analytics -.->|"generates explanations"| node_xai
node_recipes -.->|"requests AI recipes"| node_convexai
node_recipes -.->|"uses recipes"| node_recipesapi
node_coach -.->|"requests coaching"| node_convexai
node_convexai -->|"calls"| node_openai
node_reminder -->|"schedules or cancels"| node_scheduler
node_scheduler -->|"schedules"| node_notifications
node_reminder -.->|"syncs settings"| node_remindersapi
node_billing -.->|"uses billing"| node_billingapi
node_profile -.->|"manages profiles"| node_profiles
node_home -.->|"shows plan"| node_mealplan
node_profiles -->|"reads and writes"| node_database
node_mealplan -->|"reads and writes"| node_database
node_recipesapi -->|"reads and writes"| node_database
node_trackingapi -->|"reads and writes"| node_database
node_remindersapi -->|"reads and writes"| node_database
node_usersapi -->|"reads and writes"| node_database
node_billingapi -->|"reads and writes"| node_database

click node_entry "https://github.com/singhdhairya17/wellus-app/blob/main/app/index.jsx"
click node_auth "https://github.com/singhdhairya17/wellus-app/blob/main/app/auth/SignIn.jsx"
click node_tabs "https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/_layout.jsx"
click node_home "https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Home.jsx"
click node_meals "https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Meals.jsx"
click node_scan "https://github.com/singhdhairya17/wellus-app/blob/main/app/scan-label/index.jsx"
click node_preferences "https://github.com/singhdhairya17/wellus-app/blob/main/app/preferance/index.jsx"
click node_tracking "https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Progress.jsx"
click node_analytics "https://github.com/singhdhairya17/wellus-app/blob/main/components/insights/NutritionInsights.jsx"
click node_recipes "https://github.com/singhdhairya17/wellus-app/blob/main/app/generate-ai-recipe/index.jsx"
click node_coach "https://github.com/singhdhairya17/wellus-app/blob/main/app/health-coach/index.jsx"
click node_reminder "https://github.com/singhdhairya17/wellus-app/blob/main/app/meal-reminders/index.jsx"
click node_billing "https://github.com/singhdhairya17/wellus-app/blob/main/app/billing/index.jsx"
click node_profile "https://github.com/singhdhairya17/wellus-app/blob/main/components/profile/ProfileManager.jsx"
click node_ocr "https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/OCRService.jsx"
click node_preprocess "https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/ImagePreprocessing.jsx"
click node_localocr "https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/LocalOCRService.jsx"
click node_monitor "https://github.com/singhdhairya17/wellus-app/blob/main/services/monitoring/AdaptiveMonitoringService.jsx"
click node_xai "https://github.com/singhdhairya17/wellus-app/blob/main/services/ai/XAIService.jsx"
click node_scheduler "https://github.com/singhdhairya17/wellus-app/blob/main/services/reminders/MealReminderScheduler.jsx"
click node_convexclient "https://github.com/singhdhairya17/wellus-app/blob/main/utils/convexClient.js"
click node_convexai "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Ai.js"
click node_profiles "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Profiles.js"
click node_mealplan "https://github.com/singhdhairya17/wellus-app/blob/main/convex/MealPlan.jsx"
click node_recipesapi "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Recipes.js"
click node_trackingapi "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Tracking.js"
click node_remindersapi "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Reminders.js"
click node_usersapi "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Users.js"
click node_billingapi "https://github.com/singhdhairya17/wellus-app/blob/main/convex/Billing.js"
click node_database "https://github.com/singhdhairya17/wellus-app/blob/main/convex/schema.js"
click node_firebase "https://github.com/singhdhairya17/wellus-app/blob/main/services/FirebaseConfig.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_entry,node_auth,node_tabs,node_home,node_meals,node_scan,node_preferences,node_tracking,node_analytics,node_recipes,node_coach,node_reminder,node_billing,node_profile,node_user toneBlue
class node_ocr,node_preprocess,node_localocr,node_monitor,node_xai,node_scheduler,node_convexclient toneAmber
class node_convexai,node_profiles,node_mealplan,node_recipesapi,node_trackingapi,node_remindersapi,node_usersapi,node_billingapi,node_database toneMint
class node_firebase,node_openai,node_notifications toneRose
```

## Components

### Mobile app

- [Entry and onboarding](https://github.com/singhdhairya17/wellus-app/blob/main/app/index.jsx): `app/index.jsx`
- [Sign in and sign up](https://github.com/singhdhairya17/wellus-app/blob/main/app/auth/SignIn.jsx): `app/auth/SignIn.jsx`
- [Main tabs](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/_layout.jsx): `app/(tabs)/_layout.jsx`
- [Nutrition dashboard](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Home.jsx): `app/(tabs)/Home.jsx`
- [Meal logging](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Meals.jsx): `app/(tabs)/Meals.jsx`
- [Label scanning](https://github.com/singhdhairya17/wellus-app/blob/main/app/scan-label/index.jsx): `app/scan-label/index.jsx`
- [Diet preferences](https://github.com/singhdhairya17/wellus-app/blob/main/app/preferance/index.jsx): `app/preferance/index.jsx`
- [Health tracking](https://github.com/singhdhairya17/wellus-app/blob/main/app/(tabs)/Progress.jsx): `app/(tabs)/Progress.jsx`
- [Progress insights](https://github.com/singhdhairya17/wellus-app/blob/main/components/insights/NutritionInsights.jsx): `components/insights/NutritionInsights.jsx`
- [Recipe planning](https://github.com/singhdhairya17/wellus-app/blob/main/app/generate-ai-recipe/index.jsx): `app/generate-ai-recipe/index.jsx`
- [Health coach](https://github.com/singhdhairya17/wellus-app/blob/main/app/health-coach/index.jsx): `app/health-coach/index.jsx`
- [Reminder settings](https://github.com/singhdhairya17/wellus-app/blob/main/app/meal-reminders/index.jsx): `app/meal-reminders/index.jsx`
- [Plans and billing](https://github.com/singhdhairya17/wellus-app/blob/main/app/billing/index.jsx): `app/billing/index.jsx`
- [Profile management](https://github.com/singhdhairya17/wellus-app/blob/main/components/profile/ProfileManager.jsx): `components/profile/ProfileManager.jsx`

### App services

- [OCR pipeline](https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/OCRService.jsx): `services/ocr/OCRService.jsx`
- [Image preprocessing](https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/ImagePreprocessing.jsx): `services/ocr/ImagePreprocessing.jsx`
- [On-device OCR](https://github.com/singhdhairya17/wellus-app/blob/main/services/ocr/LocalOCRService.jsx): `services/ocr/LocalOCRService.jsx`
- [Adaptive monitoring](https://github.com/singhdhairya17/wellus-app/blob/main/services/monitoring/AdaptiveMonitoringService.jsx): `services/monitoring/AdaptiveMonitoringService.jsx`
- [Explainable insights](https://github.com/singhdhairya17/wellus-app/blob/main/services/ai/XAIService.jsx): `services/ai/XAIService.jsx`
- [Reminder scheduler](https://github.com/singhdhairya17/wellus-app/blob/main/services/reminders/MealReminderScheduler.jsx): `services/reminders/MealReminderScheduler.jsx`
- [Convex client](https://github.com/singhdhairya17/wellus-app/blob/main/utils/convexClient.js): `utils/convexClient.js`

### Convex backend

- [AI actions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Ai.js): `convex/Ai.js`
- [Profile functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Profiles.js): `convex/Profiles.js`
- [Meal plan functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/MealPlan.jsx): `convex/MealPlan.jsx`
- [Recipe functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Recipes.js): `convex/Recipes.js`
- [Tracking functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Tracking.js): `convex/Tracking.js`
- [Reminder functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Reminders.js): `convex/Reminders.js`
- [User functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Users.js): `convex/Users.js`
- [Billing functions](https://github.com/singhdhairya17/wellus-app/blob/main/convex/Billing.js): `convex/Billing.js`
- [Convex data](https://github.com/singhdhairya17/wellus-app/blob/main/convex/schema.js): `convex/schema.js`

### External services

- [Firebase Auth](https://github.com/singhdhairya17/wellus-app/blob/main/services/FirebaseConfig.jsx): `services/FirebaseConfig.jsx`
- **OpenAI**
- **Device notifications**

### Other components

- **App user**

## Connections

- App user → Entry and onboarding: starts
- Entry and onboarding → Sign in and sign up: routes to
- Sign in and sign up → Firebase Auth: authenticates
- Entry and onboarding → Main tabs: enters app
- Main tabs → Nutrition dashboard: shows
- Main tabs → Meal logging: opens
- Main tabs → Label scanning: opens
- Main tabs → Health tracking: opens
- Main tabs → Profile management: opens
- Diet preferences → Profile functions: queries and updates
- Label scanning → OCR pipeline: extracts nutrition
- OCR pipeline → Image preprocessing: preprocesses image
- OCR pipeline → On-device OCR: tries local OCR
- Label scanning → Explainable insights: explains nutrition
- Meal logging → Tracking functions: records meals
- Health tracking → Tracking functions: records activity
- Nutrition dashboard → Adaptive monitoring: shows adaptive guidance
- Progress insights → Explainable insights: generates explanations
- Recipe planning → AI actions: requests AI recipes
- Recipe planning → Recipe functions: uses recipes
- Health coach → AI actions: requests coaching
- AI actions → OpenAI: calls
- Reminder settings → Reminder scheduler: schedules or cancels
- Reminder scheduler → Device notifications: schedules
- Reminder settings → Reminder functions: syncs settings
- Plans and billing → Billing functions: uses billing
- Profile management → Profile functions: manages profiles
- Nutrition dashboard → Meal plan functions: shows plan
- Profile functions → Convex data: reads and writes
- Meal plan functions → Convex data: reads and writes
- Recipe functions → Convex data: reads and writes
- Tracking functions → Convex data: reads and writes
- Reminder functions → Convex data: reads and writes
- User functions → Convex data: reads and writes
- Billing functions → Convex data: reads and writes
