# saisudhamshu-999/avinya-hakathon architecture

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

- Interactive diagram: https://gitdiagram.com/saisudhamshu-999/avinya-hakathon
- Repository: https://github.com/saisudhamshu-999/avinya-hakathon

## Overview

Readout is a medical-lab report intelligence application. Its primary workflow accepts a report upload, extracts structured laboratory results, lets users verify results, and supports follow-up clinical information and report Q&A. The tree contains two near-duplicate variants; this map follows the RAG(2) variant, whose sampled server connects extraction and RAG modules. Its Python API and database are shown as a separate backend surface because the excerpts do not establish that they are wired into that server. README content was not provided.

Main entry points: [`avinya-hakathon RAG(2)/server.js`](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js) (Web API), [`avinya-hakathon RAG(2)/backend/app/main.py`](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/main.py) (Python API), [`avinya-hakathon RAG(2)/backend/app/db/database.py`](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/db/database.py) (Python database access), [`avinya-hakathon RAG(2)/backend/rag_engine.js`](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/rag_engine.js) (Lab report Q&A)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_upload["Report upload<br/>[upload.html]"]
  node_dashboard["Results dashboard<br/>[dashboard.html]"]
  node_history["Report history<br/>[history.html]"]
  node_summary["Report summary<br/>[summary.html]"]
  node_help["Help page<br/>[help.html]"]
  node_settings["Settings page<br/>[settings.html]"]
end

subgraph group_report["Report processing"]
  node_webapi["Web API<br/>[server.js]"]
  node_auth["Account access<br/>[server.js]"]
  node_extractor["Report extraction<br/>[extractor.js]"]
  node_reportstate[("Report state<br/>[server.js]")]
  node_resultverify["Result verification<br/>[server.js]"]
  node_pyapi["Python API<br/>[main.py]"]
  node_pydatabase["Python database access<br/>[database.py]"]
  node_models["Report models<br/>[models.py]"]
  node_security["Token security<br/>[security.py]"]
  node_config["API configuration<br/>[config.py]"]
end

subgraph group_clinical["Clinical information"]
  node_clinicalapi["Clinical support<br/>[server.js]"]
  node_rag["Lab report Q&amp;A<br/>[rag_engine.js]"]
  node_corpus[("Clinical knowledge<br/>[rag_corpus.json]")]
  node_medicaldata[("Medical references")]
end

node_user(("Patient or clinician"))

node_user -->|"uploads reports"| node_webapi
node_webapi -->|"extracts report"| node_extractor
node_webapi -->|"uses for Q&amp;A"| node_rag
node_webapi -->|"stores reports"| node_reportstate
node_webapi -->|"handles accounts"| node_auth
node_webapi -->|"updates results"| node_resultverify
node_webapi -->|"serves support"| node_clinicalapi
node_rag -->|"retrieves evidence"| node_corpus
node_user -.->|"calls API"| node_pyapi
node_pydatabase -->|"reads settings"| node_config
node_security -->|"reads settings"| node_config
node_pyapi -.->|"uses database"| node_pydatabase

click node_upload "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/upload.html"
click node_dashboard "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/dashboard.html"
click node_history "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/history.html"
click node_summary "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/summary.html"
click node_help "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/help.html"
click node_settings "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/settings.html"
click node_webapi "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js"
click node_auth "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js"
click node_extractor "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/extractor.js"
click node_reportstate "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js"
click node_resultverify "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js"
click node_clinicalapi "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js"
click node_rag "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/rag_engine.js"
click node_corpus "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/medical_knowledge/rag_corpus.json"
click node_medicaldata "https://github.com/saisudhamshu-999/avinya-hakathon/tree/main/avinya-hakathon%20RAG(2)/medical_knowledge"
click node_pyapi "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/main.py"
click node_pydatabase "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/db/database.py"
click node_models "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/db/models.py"
click node_security "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/core/security.py"
click node_config "https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/core/config.py"

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_upload,node_dashboard,node_history,node_summary,node_help,node_settings toneBlue
class node_webapi,node_auth,node_extractor,node_reportstate,node_resultverify,node_pyapi,node_pydatabase,node_models,node_security,node_config toneAmber
class node_clinicalapi,node_rag,node_corpus,node_medicaldata toneMint
class node_user toneIndigo
```

## Components

### User experience

- [Report upload](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/upload.html): `avinya-hakathon RAG(2)/upload.html`
- [Results dashboard](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/dashboard.html): `avinya-hakathon RAG(2)/dashboard.html`
- [Report history](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/history.html): `avinya-hakathon RAG(2)/history.html`
- [Report summary](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/summary.html): `avinya-hakathon RAG(2)/summary.html`
- [Help page](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/help.html): `avinya-hakathon RAG(2)/help.html`
- [Settings page](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/settings.html): `avinya-hakathon RAG(2)/settings.html`

### Report processing

- [Web API](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js): `avinya-hakathon RAG(2)/server.js`
- [Account access](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js): `avinya-hakathon RAG(2)/server.js`
- [Report extraction](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/extractor.js): `avinya-hakathon RAG(2)/backend/extractor.js`
- [Report state](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js): `avinya-hakathon RAG(2)/server.js`
- [Result verification](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js): `avinya-hakathon RAG(2)/server.js`
- [Python API](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/main.py): `avinya-hakathon RAG(2)/backend/app/main.py`
- [Python database access](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/db/database.py): `avinya-hakathon RAG(2)/backend/app/db/database.py`
- [Report models](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/db/models.py): `avinya-hakathon RAG(2)/backend/app/db/models.py`
- [Token security](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/core/security.py): `avinya-hakathon RAG(2)/backend/app/core/security.py`
- [API configuration](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/app/core/config.py): `avinya-hakathon RAG(2)/backend/app/core/config.py`

### Clinical information

- [Clinical support](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/server.js): `avinya-hakathon RAG(2)/server.js`
- [Lab report Q&A](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/backend/rag_engine.js): `avinya-hakathon RAG(2)/backend/rag_engine.js`
- [Clinical knowledge](https://github.com/saisudhamshu-999/avinya-hakathon/blob/main/avinya-hakathon%20RAG(2)/medical_knowledge/rag_corpus.json): `avinya-hakathon RAG(2)/medical_knowledge/rag_corpus.json`
- [Medical references](https://github.com/saisudhamshu-999/avinya-hakathon/tree/main/avinya-hakathon%20RAG(2)/medical_knowledge): `avinya-hakathon RAG(2)/medical_knowledge`

### Other components

- **Patient or clinician**

## Connections

- Patient or clinician → Web API: uploads reports (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Report extraction: extracts report (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Lab report Q&A: uses for Q&A (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Report state: stores reports (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Account access: handles accounts (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Result verification: updates results (evidence: `avinya-hakathon RAG(2)/server.js`)
- Web API → Clinical support: serves support (evidence: `avinya-hakathon RAG(2)/server.js`)
- Lab report Q&A → Clinical knowledge: retrieves evidence (evidence: `avinya-hakathon RAG(2)/backend/rag_engine.js`)
- Patient or clinician → Python API: calls API
- Python database access → API configuration: reads settings (evidence: `avinya-hakathon RAG(2)/backend/app/db/database.py`)
- Token security → API configuration: reads settings (evidence: `avinya-hakathon RAG(2)/backend/app/core/security.py`)
- Python API → Python database access: uses database
