# rishi-0108/esanjeevani architecture

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

- Interactive diagram: https://gitdiagram.com/rishi-0108/esanjeevani
- Repository: https://github.com/rishi-0108/esanjeevani

## Overview

E-Sanjeevni is a client-side health pre-screening app. A user starts a symptom check, enters patient details and symptoms, answers symptom follow-ups, then receives a report with ranked conditions and urgency guidance. App owns page state and passes the generated report into the report view. The assessment logic maps answers to symptoms and scores local disease rules; no backend or persistent store is evidenced. About and Contact are separate informational pages. Source excerpts establish the assessment calls; other page wiring is evidenced by App.

Main entry points: [`src/App.tsx`](https://github.com/rishi-0108/esanjeevani/blob/main/src/App.tsx) (Page controller), [`src/pages/SymptomChecker.tsx`](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/SymptomChecker.tsx) (Symptom checker), [`src/components/layout/Navbar.tsx`](https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Navbar.tsx) (Navigation bar), [`src/components/layout/Footer.tsx`](https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Footer.tsx) (Footer links)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["Page controller<br/>[App.tsx]"]
  node_navbar["Navigation bar<br/>[Navbar.tsx]"]
  node_footer["Footer links<br/>[Footer.tsx]"]
end

subgraph group_assessment["Symptom assessment"]
  node_checker["Symptom checker<br/>[SymptomChecker.tsx]"]
  node_questions["Follow-up questions<br/>[questions.ts]"]
end

subgraph group_diagnosis["Diagnosis rules"]
  node_diagnosis["Report generator<br/>[diagnosis.ts]"]
  node_diseases["Disease rules<br/>[diseases.ts]"]
  node_types["Assessment models<br/>[index.ts]"]
end

subgraph group_reporting["Report and guidance"]
  node_report["Health report<br/>[Report.tsx]"]
end

subgraph group_information["Information pages"]
  node_home["Home screen<br/>[Home.tsx]"]
  node_about["About page<br/>[About.tsx]"]
  node_contact["Contact page<br/>[Contact.tsx]"]
end

node_patient(("Patient"))

node_patient -->|"opens app"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_footer
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_checker
node_app -->|"routes to"| node_report
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_navbar -->|"requests navigation"| node_app
node_footer -->|"requests navigation"| node_app
node_home -->|"requests navigation"| node_app
node_checker -->|"gets questions"| node_questions
node_checker -->|"generates report"| node_diagnosis
node_diagnosis -->|"scores symptoms"| node_diseases
node_checker -->|"delivers report"| node_app
node_app -->|"passes report"| node_report

click node_app "https://github.com/rishi-0108/esanjeevani/blob/main/src/App.tsx"
click node_navbar "https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Navbar.tsx"
click node_footer "https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Footer.tsx"
click node_home "https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Home.tsx"
click node_about "https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/About.tsx"
click node_contact "https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Contact.tsx"
click node_checker "https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/SymptomChecker.tsx"
click node_questions "https://github.com/rishi-0108/esanjeevani/blob/main/src/data/questions.ts"
click node_diagnosis "https://github.com/rishi-0108/esanjeevani/blob/main/src/utils/diagnosis.ts"
click node_diseases "https://github.com/rishi-0108/esanjeevani/blob/main/src/data/diseases.ts"
click node_types "https://github.com/rishi-0108/esanjeevani/blob/main/src/types/index.ts"
click node_report "https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Report.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_app,node_navbar,node_footer toneBlue
class node_checker,node_questions toneAmber
class node_diagnosis,node_diseases,node_types toneMint
class node_report toneRose
class node_home,node_about,node_contact,node_patient toneIndigo
```

## Components

### App navigation

- [Page controller](https://github.com/rishi-0108/esanjeevani/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation bar](https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Navbar.tsx): `src/components/layout/Navbar.tsx`
- [Footer links](https://github.com/rishi-0108/esanjeevani/blob/main/src/components/layout/Footer.tsx): `src/components/layout/Footer.tsx`

### Symptom assessment

- [Symptom checker](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/SymptomChecker.tsx): `src/pages/SymptomChecker.tsx`
- [Follow-up questions](https://github.com/rishi-0108/esanjeevani/blob/main/src/data/questions.ts): `src/data/questions.ts`

### Diagnosis rules

- [Report generator](https://github.com/rishi-0108/esanjeevani/blob/main/src/utils/diagnosis.ts): `src/utils/diagnosis.ts`
- [Disease rules](https://github.com/rishi-0108/esanjeevani/blob/main/src/data/diseases.ts): `src/data/diseases.ts`
- [Assessment models](https://github.com/rishi-0108/esanjeevani/blob/main/src/types/index.ts): `src/types/index.ts`

### Report and guidance

- [Health report](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Report.tsx): `src/pages/Report.tsx`

### Information pages

- [Home screen](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [About page](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/About.tsx): `src/pages/About.tsx`
- [Contact page](https://github.com/rishi-0108/esanjeevani/blob/main/src/pages/Contact.tsx): `src/pages/Contact.tsx`

### Other components

- **Patient**

## Connections

- Patient → Page controller: opens app
- Page controller → Navigation bar: renders (evidence: `src/App.tsx`)
- Page controller → Footer links: renders (evidence: `src/App.tsx`)
- Page controller → Home screen: routes to (evidence: `src/App.tsx`)
- Page controller → Symptom checker: routes to (evidence: `src/App.tsx`)
- Page controller → Health report: routes to (evidence: `src/App.tsx`)
- Page controller → About page: routes to (evidence: `src/App.tsx`)
- Page controller → Contact page: routes to (evidence: `src/App.tsx`)
- Navigation bar → Page controller: requests navigation (evidence: `src/App.tsx`)
- Footer links → Page controller: requests navigation (evidence: `src/App.tsx`)
- Home screen → Page controller: requests navigation (evidence: `src/App.tsx`)
- Symptom checker → Follow-up questions: gets questions (evidence: `src/pages/SymptomChecker.tsx`)
- Symptom checker → Report generator: generates report (evidence: `src/pages/SymptomChecker.tsx`)
- Report generator → Disease rules: scores symptoms (evidence: `src/utils/diagnosis.ts`)
- Symptom checker → Page controller: delivers report (evidence: `src/App.tsx`)
- Page controller → Health report: passes report (evidence: `src/App.tsx`)
