# shishir-van/healio_ architecture

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

- Interactive diagram: https://gitdiagram.com/shishir-van/healio_
- Repository: https://github.com/shishir-van/healio_

## Overview

This is a Next.js healthcare and wellness application. Users can explore health tools, assess and track mood, search medicines by name or symptom, manage sleep and diet plans, journal, and participate in a community forum. The graph follows evidenced page-to-feature and feature-to-data relationships; many Convex functions and several feature implementations are unsampled, so their connections are omitted rather than inferred.

Main entry points: [`app/_sleepDept/page.tsx`](https://github.com/shishir-van/healio_/blob/main/app/_sleepDept/page.tsx) (Sleep tracker), [`app/(main)/page.tsx`](https://github.com/shishir-van/healio_/blob/main/app/(main)/page.tsx) (Home page), [`app/journal/page.tsx`](https://github.com/shishir-van/healio_/blob/main/app/journal/page.tsx) (Journal), [`app/assessment/page.tsx`](https://github.com/shishir-van/healio_/blob/main/app/assessment/page.tsx) (Mood assessment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_home["Home page<br/>[page.tsx]"]
  node_navbar["Navigation bar<br/>[navbar.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
end

subgraph group_wellness["Wellness tools"]
  node_mood_intro["Mood tracker intro<br/>[page.tsx]"]
  node_mood_assessment["Mood assessment<br/>[page.tsx]"]
  node_mood_results["Mood results<br/>[page.tsx]"]
  node_mood_history["Mood history<br/>[page.tsx]"]
  node_mood_favorites["Mood favorites<br/>[page.tsx]"]
  node_mood_logic["Mood calculations<br/>[mood-calculator.ts]"]
  node_sleep_page["Sleep tracker<br/>[page.tsx]"]
  node_sleep_dashboard["Sleep debt dashboard"]
  node_sleep_entry["Sleep entry form"]
  node_sleep_history["Sleep history<br/>[sleep-history.tsx]"]
  node_sleep_chart["Sleep chart<br/>[sleep-chart.tsx]"]
  node_diet_page["Diet plan generator<br/>[page.tsx]"]
  node_journal_page["Journal<br/>[page.tsx]"]
  node_journal_form["Journal entry form"]
  node_journal_list["Journal entries"]
  node_prompt_page["Healthy prompts page<br/>[page.tsx]"]
  node_prompt_generator["Prompt generator"]
end

subgraph group_health["Health services"]
  node_medicine_page["Medicine finder<br/>[page.tsx]"]
  node_medicine_search["Medicine search"]
  node_symptom_search["Symptom search<br/>[symptom-search.tsx]"]
  node_emergency_page["Emergency page<br/>[page.tsx]"]
  node_maps["Hospital finder<br/>[maps.tsx]"]
  node_map_component["Map display<br/>[map-component.tsx]"]
  node_forum_page["Community forum<br/>[page.tsx]"]
  node_post_form["Post form<br/>[post-form.tsx]"]
  node_post_list["Post list<br/>[post-list.tsx]"]
end

subgraph group_data["Persistence"]
  node_diet_data["Diet plan functions<br/>[dietPlans.ts]"]
  node_sleep_data["Sleep entry functions<br/>[sleepEntries.ts]"]
  node_mood_data["Mood functions<br/>[mood.ts]"]
  node_journal_data["Journal functions<br/>[journalEntries.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_navbar
node_visitor -->|"opens"| node_dashboard
node_navbar -->|"links to"| node_mood_intro
node_mood_intro -->|"links to"| node_mood_assessment
node_mood_assessment -.->|"uses"| node_mood_logic
node_mood_assessment -.->|"routes to"| node_mood_results
node_mood_history -.->|"queries"| node_mood_data
node_mood_favorites -.->|"queries"| node_mood_data
node_home -->|"imports"| node_diet_page
node_diet_page -->|"queries and mutates"| node_diet_data
node_home -->|"imports"| node_sleep_page
node_sleep_page -->|"renders"| node_sleep_dashboard
node_sleep_page -->|"renders"| node_sleep_entry
node_sleep_page -->|"renders"| node_sleep_history
node_sleep_page -->|"renders"| node_sleep_chart
node_sleep_entry -.->|"writes"| node_sleep_data
node_sleep_history -.->|"queries"| node_sleep_data
node_visitor -->|"opens"| node_medicine_page
node_medicine_page -->|"renders"| node_medicine_search
node_medicine_page -->|"renders"| node_symptom_search
node_symptom_search -->|"creates entry"| node_journal_data
node_visitor -->|"opens"| node_emergency_page
node_emergency_page -->|"renders"| node_maps
node_maps -->|"renders"| node_map_component
node_visitor -->|"opens"| node_journal_page
node_journal_page -->|"renders"| node_journal_form
node_journal_page -->|"renders"| node_journal_list
node_journal_page -->|"queries"| node_journal_data
node_visitor -->|"opens"| node_forum_page
node_forum_page -->|"renders"| node_post_form
node_forum_page -->|"renders"| node_post_list
node_visitor -->|"opens"| node_prompt_page
node_prompt_page -->|"renders"| node_prompt_generator

click node_home "https://github.com/shishir-van/healio_/blob/main/app/(main)/page.tsx"
click node_navbar "https://github.com/shishir-van/healio_/blob/main/app/_components/navbar.tsx"
click node_dashboard "https://github.com/shishir-van/healio_/blob/main/app/dashboard/page.tsx"
click node_mood_intro "https://github.com/shishir-van/healio_/blob/main/app/_moodcalculator/page.tsx"
click node_mood_assessment "https://github.com/shishir-van/healio_/blob/main/app/assessment/page.tsx"
click node_mood_results "https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/results/page.tsx"
click node_mood_history "https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/history/page.tsx"
click node_mood_favorites "https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/favourites/page.tsx"
click node_mood_logic "https://github.com/shishir-van/healio_/blob/main/lib/mood-calculator.ts"
click node_sleep_page "https://github.com/shishir-van/healio_/blob/main/app/_sleepDept/page.tsx"
click node_sleep_dashboard "https://github.com/shishir-van/healio_/blob/main/components/sleep-debt-dashboard.tsx"
click node_sleep_entry "https://github.com/shishir-van/healio_/blob/main/components/sleep-entry-form.tsx"
click node_sleep_history "https://github.com/shishir-van/healio_/blob/main/components/sleep-history.tsx"
click node_sleep_chart "https://github.com/shishir-van/healio_/blob/main/components/sleep-chart.tsx"
click node_diet_page "https://github.com/shishir-van/healio_/blob/main/app/dashboard/dietPlan/page.tsx"
click node_medicine_page "https://github.com/shishir-van/healio_/blob/main/app/(medicine)/medicine/page.tsx"
click node_medicine_search "https://github.com/shishir-van/healio_/blob/main/components/medicine-search.tsx"
click node_symptom_search "https://github.com/shishir-van/healio_/blob/main/components/symptom-search.tsx"
click node_emergency_page "https://github.com/shishir-van/healio_/blob/main/app/(navbar)/emergency/page.tsx"
click node_maps "https://github.com/shishir-van/healio_/blob/main/app/_components/maps.tsx"
click node_map_component "https://github.com/shishir-van/healio_/blob/main/components/map-component.tsx"
click node_journal_page "https://github.com/shishir-van/healio_/blob/main/app/journal/page.tsx"
click node_journal_form "https://github.com/shishir-van/healio_/blob/main/components/journal-entry-form.tsx"
click node_journal_list "https://github.com/shishir-van/healio_/blob/main/components/journal-entry-list.tsx"
click node_forum_page "https://github.com/shishir-van/healio_/blob/main/app/dashboard/communityForum/page.tsx"
click node_post_form "https://github.com/shishir-van/healio_/blob/main/components/post-form.tsx"
click node_post_list "https://github.com/shishir-van/healio_/blob/main/components/post-list.tsx"
click node_prompt_page "https://github.com/shishir-van/healio_/blob/main/app/dashboard/healthyPrompts/page.tsx"
click node_prompt_generator "https://github.com/shishir-van/healio_/blob/main/components/health-prompt-generator.tsx"
click node_diet_data "https://github.com/shishir-van/healio_/blob/main/convex/dietPlans.ts"
click node_sleep_data "https://github.com/shishir-van/healio_/blob/main/convex/sleepEntries.ts"
click node_mood_data "https://github.com/shishir-van/healio_/blob/main/convex/mood.ts"
click node_journal_data "https://github.com/shishir-van/healio_/blob/main/convex/journalEntries.ts"

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_home,node_navbar,node_dashboard toneBlue
class node_mood_intro,node_mood_assessment,node_mood_results,node_mood_history,node_mood_favorites,node_mood_logic,node_sleep_page,node_sleep_dashboard,node_sleep_entry,node_sleep_history,node_sleep_chart,node_diet_page,node_journal_page,node_journal_form,node_journal_list,node_prompt_page,node_prompt_generator toneAmber
class node_medicine_page,node_medicine_search,node_symptom_search,node_emergency_page,node_maps,node_map_component,node_forum_page,node_post_form,node_post_list toneMint
class node_diet_data,node_sleep_data,node_mood_data,node_journal_data toneRose
class node_visitor toneIndigo
```

## Components

### App navigation

- [Home page](https://github.com/shishir-van/healio_/blob/main/app/(main)/page.tsx): `app/(main)/page.tsx`
- [Navigation bar](https://github.com/shishir-van/healio_/blob/main/app/_components/navbar.tsx): `app/_components/navbar.tsx`
- [Dashboard](https://github.com/shishir-van/healio_/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`

### Wellness tools

- [Mood tracker intro](https://github.com/shishir-van/healio_/blob/main/app/_moodcalculator/page.tsx): `app/_moodcalculator/page.tsx`
- [Mood assessment](https://github.com/shishir-van/healio_/blob/main/app/assessment/page.tsx): `app/assessment/page.tsx`
- [Mood results](https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/results/page.tsx): `app/(moodcalculator)/results/page.tsx`
- [Mood history](https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/history/page.tsx): `app/(moodcalculator)/history/page.tsx`
- [Mood favorites](https://github.com/shishir-van/healio_/blob/main/app/(moodcalculator)/favourites/page.tsx): `app/(moodcalculator)/favourites/page.tsx`
- [Mood calculations](https://github.com/shishir-van/healio_/blob/main/lib/mood-calculator.ts): `lib/mood-calculator.ts`
- [Sleep tracker](https://github.com/shishir-van/healio_/blob/main/app/_sleepDept/page.tsx): `app/_sleepDept/page.tsx`
- [Sleep debt dashboard](https://github.com/shishir-van/healio_/blob/main/components/sleep-debt-dashboard.tsx): `components/sleep-debt-dashboard.tsx`
- [Sleep entry form](https://github.com/shishir-van/healio_/blob/main/components/sleep-entry-form.tsx): `components/sleep-entry-form.tsx`
- [Sleep history](https://github.com/shishir-van/healio_/blob/main/components/sleep-history.tsx): `components/sleep-history.tsx`
- [Sleep chart](https://github.com/shishir-van/healio_/blob/main/components/sleep-chart.tsx): `components/sleep-chart.tsx`
- [Diet plan generator](https://github.com/shishir-van/healio_/blob/main/app/dashboard/dietPlan/page.tsx): `app/dashboard/dietPlan/page.tsx`
- [Journal](https://github.com/shishir-van/healio_/blob/main/app/journal/page.tsx): `app/journal/page.tsx`
- [Journal entry form](https://github.com/shishir-van/healio_/blob/main/components/journal-entry-form.tsx): `components/journal-entry-form.tsx`
- [Journal entries](https://github.com/shishir-van/healio_/blob/main/components/journal-entry-list.tsx): `components/journal-entry-list.tsx`
- [Healthy prompts page](https://github.com/shishir-van/healio_/blob/main/app/dashboard/healthyPrompts/page.tsx): `app/dashboard/healthyPrompts/page.tsx`
- [Prompt generator](https://github.com/shishir-van/healio_/blob/main/components/health-prompt-generator.tsx): `components/health-prompt-generator.tsx`

### Health services

- [Medicine finder](https://github.com/shishir-van/healio_/blob/main/app/(medicine)/medicine/page.tsx): `app/(medicine)/medicine/page.tsx`
- [Medicine search](https://github.com/shishir-van/healio_/blob/main/components/medicine-search.tsx): `components/medicine-search.tsx`
- [Symptom search](https://github.com/shishir-van/healio_/blob/main/components/symptom-search.tsx): `components/symptom-search.tsx`
- [Emergency page](https://github.com/shishir-van/healio_/blob/main/app/(navbar)/emergency/page.tsx): `app/(navbar)/emergency/page.tsx`
- [Hospital finder](https://github.com/shishir-van/healio_/blob/main/app/_components/maps.tsx): `app/_components/maps.tsx`
- [Map display](https://github.com/shishir-van/healio_/blob/main/components/map-component.tsx): `components/map-component.tsx`
- [Community forum](https://github.com/shishir-van/healio_/blob/main/app/dashboard/communityForum/page.tsx): `app/dashboard/communityForum/page.tsx`
- [Post form](https://github.com/shishir-van/healio_/blob/main/components/post-form.tsx): `components/post-form.tsx`
- [Post list](https://github.com/shishir-van/healio_/blob/main/components/post-list.tsx): `components/post-list.tsx`

### Persistence

- [Diet plan functions](https://github.com/shishir-van/healio_/blob/main/convex/dietPlans.ts): `convex/dietPlans.ts`
- [Sleep entry functions](https://github.com/shishir-van/healio_/blob/main/convex/sleepEntries.ts): `convex/sleepEntries.ts`
- [Mood functions](https://github.com/shishir-van/healio_/blob/main/convex/mood.ts): `convex/mood.ts`
- [Journal functions](https://github.com/shishir-van/healio_/blob/main/convex/journalEntries.ts): `convex/journalEntries.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: opens
- Home page → Navigation bar: renders (evidence: `app/(main)/page.tsx`)
- Visitor → Dashboard: opens
- Navigation bar → Mood tracker intro: links to (evidence: `app/_components/navbar.tsx`)
- Mood tracker intro → Mood assessment: links to (evidence: `app/_moodcalculator/page.tsx`)
- Mood assessment → Mood calculations: uses
- Mood assessment → Mood results: routes to
- Mood history → Mood functions: queries
- Mood favorites → Mood functions: queries
- Home page → Diet plan generator: imports (evidence: `app/(main)/page.tsx`)
- Diet plan generator → Diet plan functions: queries and mutates (evidence: `app/dashboard/dietPlan/page.tsx`)
- Home page → Sleep tracker: imports (evidence: `app/(main)/page.tsx`)
- Sleep tracker → Sleep debt dashboard: renders (evidence: `app/_sleepDept/page.tsx`)
- Sleep tracker → Sleep entry form: renders (evidence: `app/_sleepDept/page.tsx`)
- Sleep tracker → Sleep history: renders (evidence: `app/_sleepDept/page.tsx`)
- Sleep tracker → Sleep chart: renders (evidence: `app/_sleepDept/page.tsx`)
- Sleep entry form → Sleep entry functions: writes
- Sleep history → Sleep entry functions: queries
- Visitor → Medicine finder: opens
- Medicine finder → Medicine search: renders (evidence: `app/(medicine)/medicine/page.tsx`)
- Medicine finder → Symptom search: renders (evidence: `app/(medicine)/medicine/page.tsx`)
- Symptom search → Journal functions: creates entry (evidence: `components/symptom-search.tsx`)
- Visitor → Emergency page: opens
- Emergency page → Hospital finder: renders (evidence: `app/(navbar)/emergency/page.tsx`)
- Hospital finder → Map display: renders (evidence: `app/_components/maps.tsx`)
- Visitor → Journal: opens
- Journal → Journal entry form: renders (evidence: `app/journal/page.tsx`)
- Journal → Journal entries: renders (evidence: `app/journal/page.tsx`)
- Journal → Journal functions: queries (evidence: `app/journal/page.tsx`)
- Visitor → Community forum: opens
- Community forum → Post form: renders (evidence: `app/dashboard/communityForum/page.tsx`)
- Community forum → Post list: renders (evidence: `app/dashboard/communityForum/page.tsx`)
- Visitor → Healthy prompts page: opens
- Healthy prompts page → Prompt generator: renders (evidence: `app/dashboard/healthyPrompts/page.tsx`)
