# aswinkumar08042008-bit/patient-case-taking architecture

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

- Interactive diagram: https://gitdiagram.com/aswinkumar08042008-bit/patient-case-taking
- Repository: https://github.com/aswinkumar08042008-bit/patient-case-taking

## Overview

MediVoice is a patient intake and clinician review application. The visible workflow selects a role, lets patients enter details and complete a multilingual text/voice assessment, then presents patient and clinical information in a doctor dashboard. The repository also contains Python backend, persistence, and voice-AI modules, but the backend entry point was not sampled, so their wiring to the frontend or one another cannot be confirmed. The README is only the Vite template and documents no additional product capabilities.

Main entry points: [`src/App.jsx`](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/App.jsx) (Role router), [`src/api/api.js`](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/api/api.js) (API client), [`src/PatientInterface.jsx`](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/PatientInterface.jsx) (Patient intake), [`src/doctor/DoctorDashboard.jsx`](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/doctor/DoctorDashboard.jsx) (Doctor dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Role router<br/>[App.jsx]"]
  node_role["Role selection<br/>[RoleSelection.jsx]"]
  node_patient["Patient intake"]
  node_doctor["Doctor dashboard"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_backend["Backend services"]
  node_pyapi["Python API<br/>[main.py]"]
  node_express["Express server<br/>[server.js]"]
  node_voice["Voice assessment<br/>[voice.py]"]
end

subgraph group_clinical["Clinical data"]
  node_dbconfig["Database setup<br/>[database.py]"]
  node_models["Clinical models<br/>[models.py]"]
  node_database[("Configured database")]
end

subgraph group_integrations["External services"]
  node_gemini["Gemini AI"]
  node_backendservice["Configured API host"]
end

node_user(("Patient or doctor"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_role
node_app -->|"routes patient"| node_patient
node_app -->|"routes doctor"| node_doctor
node_patient -->|"requests data"| node_api
node_doctor -->|"requests records"| node_api
node_api -->|"targets host"| node_backendservice
node_api -.->|"may call"| node_pyapi
node_dbconfig -->|"configures engine"| node_database
node_voice -->|"transcribes and generates"| node_gemini

click node_app "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/App.jsx"
click node_role "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/RoleSelection.jsx"
click node_patient "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/PatientInterface.jsx"
click node_doctor "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/doctor/DoctorDashboard.jsx"
click node_api "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/api/api.js"
click node_pyapi "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/main.py"
click node_express "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/server.js"
click node_voice "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/voice.py"
click node_dbconfig "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/database.py"
click node_models "https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/models.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_app,node_role,node_patient,node_doctor,node_api toneBlue
class node_pyapi,node_express,node_voice toneAmber
class node_dbconfig,node_models,node_database toneMint
class node_gemini,node_backendservice toneRose
class node_user toneIndigo
```

## Components

### Web application

- [Role router](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/App.jsx): `src/App.jsx`
- [Role selection](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/RoleSelection.jsx): `src/RoleSelection.jsx`
- [Patient intake](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/PatientInterface.jsx): `src/PatientInterface.jsx`
- [Doctor dashboard](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/doctor/DoctorDashboard.jsx): `src/doctor/DoctorDashboard.jsx`
- [API client](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/src/api/api.js): `src/api/api.js`

### Backend services

- [Python API](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/main.py): `backend/main.py`
- [Express server](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/server.js): `backend/server.js`
- [Voice assessment](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/voice.py): `backend/voice.py`

### Clinical data

- [Database setup](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/database.py): `backend/database.py`
- [Clinical models](https://github.com/aswinkumar08042008-bit/patient-case-taking/blob/main/backend/models.py): `backend/models.py`
- **Configured database**

### External services

- **Gemini AI**
- **Configured API host**

### Other components

- **Patient or doctor**

## Connections

- Patient or doctor → Role router: uses (evidence: `src/App.jsx`)
- Role router → Role selection: renders (evidence: `src/App.jsx`)
- Role router → Patient intake: routes patient (evidence: `src/App.jsx`)
- Role router → Doctor dashboard: routes doctor (evidence: `src/App.jsx`)
- Patient intake → API client: requests data (evidence: `src/PatientInterface.jsx`)
- Doctor dashboard → API client: requests records (evidence: `src/doctor/DoctorDashboard.jsx`)
- API client → Configured API host: targets host (evidence: `src/api/api.js`)
- API client → Python API: may call
- Database setup → Configured database: configures engine (evidence: `backend/database.py`)
- Voice assessment → Gemini AI: transcribes and generates (evidence: `backend/voice.py`)
