# sahilbehera6531/aidly architecture

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

- Interactive diagram: https://gitdiagram.com/sahilbehera6531/aidly
- Repository: https://github.com/sahilbehera6531/aidly

## Overview

This Flask healthcare-support app accepts a user’s health request, classifies its urgency, generates a reply, saves the case, and presents the result. The main path is visible in `app.py`; the rule-based classification and response logic are in `ai_module.py`. The README also describes the high/medium/low triage and instant-response capabilities. Template contents were not sampled, so their roles are inferred from the template names and the calls in `app.py`; no external healthcare integration is shown.

Main entry points: [`app.py`](https://github.com/sahilbehera6531/aidly/blob/main/app.py) (Flask workflow), [`templates/index.html`](https://github.com/sahilbehera6531/aidly/blob/main/templates/index.html) (Request form), [`templates/result.html`](https://github.com/sahilbehera6531/aidly/blob/main/templates/result.html) (Result view), [`ai_module.py`](https://github.com/sahilbehera6531/aidly/blob/main/ai_module.py) (Issue classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interaction"]
  node_intake["Request form<br/>[index.html]"]
  node_workflow["Flask workflow<br/>[app.py]"]
  node_result["Result view<br/>[result.html]"]
end

subgraph group_triage["Triage automation"]
  node_classifier["Issue classifier<br/>[ai_module.py]"]
  node_reply["Response generator<br/>[ai_module.py]"]
end

subgraph group_records["Case records"]
  node_case_store[("Case records<br/>[data.json]")]
end

node_user(("Requester"))

node_workflow -->|"renders"| node_intake
node_user -->|"fills"| node_intake
node_intake -->|"submits request"| node_workflow
node_workflow -->|"classifies issue"| node_classifier
node_classifier -->|"returns priority"| node_workflow
node_workflow -->|"generates reply"| node_reply
node_workflow -->|"reads and writes"| node_case_store
node_workflow -->|"renders result"| node_result
node_result -.->|"shows outcome"| node_user

click node_intake "https://github.com/sahilbehera6531/aidly/blob/main/templates/index.html"
click node_workflow "https://github.com/sahilbehera6531/aidly/blob/main/app.py"
click node_classifier "https://github.com/sahilbehera6531/aidly/blob/main/ai_module.py"
click node_reply "https://github.com/sahilbehera6531/aidly/blob/main/ai_module.py"
click node_case_store "https://github.com/sahilbehera6531/aidly/blob/main/data.json"
click node_result "https://github.com/sahilbehera6531/aidly/blob/main/templates/result.html"

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_intake,node_workflow,node_result toneBlue
class node_classifier,node_reply toneAmber
class node_case_store,node_user toneMint
```

## Components

### Web interaction

- [Request form](https://github.com/sahilbehera6531/aidly/blob/main/templates/index.html): `templates/index.html`
- [Flask workflow](https://github.com/sahilbehera6531/aidly/blob/main/app.py): `app.py`
- [Result view](https://github.com/sahilbehera6531/aidly/blob/main/templates/result.html): `templates/result.html`

### Triage automation

- [Issue classifier](https://github.com/sahilbehera6531/aidly/blob/main/ai_module.py): `ai_module.py`
- [Response generator](https://github.com/sahilbehera6531/aidly/blob/main/ai_module.py): `ai_module.py`

### Case records

- [Case records](https://github.com/sahilbehera6531/aidly/blob/main/data.json): `data.json`

### Other components

- **Requester**

## Connections

- Flask workflow → Request form: renders (evidence: `app.py`)
- Requester → Request form: fills (evidence: `README.md`)
- Request form → Flask workflow: submits request (evidence: `app.py`)
- Flask workflow → Issue classifier: classifies issue (evidence: `app.py`)
- Issue classifier → Flask workflow: returns priority (evidence: `app.py`)
- Flask workflow → Response generator: generates reply (evidence: `app.py`)
- Flask workflow → Case records: reads and writes (evidence: `app.py`)
- Flask workflow → Result view: renders result (evidence: `app.py`)
- Result view → Requester: shows outcome
