# sahana-652/medivault_1 architecture

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

- Interactive diagram: https://gitdiagram.com/sahana-652/medivault_1
- Repository: https://github.com/sahana-652/medivault_1

## Overview

MediVault is a patient-record portal with pages for account access, records, health information, medication, appointments and profiles. The visible backend routes those pages to Django views that render templates, and exposes a small health endpoint backed by patient counts. The data model also defines the portal’s patient and clinical records. The tree and excerpts do not establish how the pages use the JavaScript client or whether the portal’s broader workflows persist through the Django models, so those connections are omitted.

Main entry points: [`backend/records/admin.py`](https://github.com/sahana-652/medivault_1/blob/main/backend/records/admin.py) (Django admin), [`backend/records/views.py`](https://github.com/sahana-652/medivault_1/blob/main/backend/records/views.py) (Page and health views), [`backend/records/urls.py`](https://github.com/sahana-652/medivault_1/blob/main/backend/records/urls.py) (Page and API routes), [`backend/records/models.py`](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py) (Patient identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portal delivery"]
  node_routes["Page and API routes<br/>[urls.py]"]
  node_views["Page and health views<br/>[views.py]"]
  node_templates["Portal pages"]
end

subgraph group_client["Browser behavior"]
  node_clientjs["Browser utilities<br/>[app.js]"]
  node_browserstore[("Browser local storage")]
end

subgraph group_domain["Clinical domain"]
  node_patients["Patient identity<br/>[models.py]"]
  node_medicalrecords["Medical records<br/>[models.py]"]
  node_healthinfo["Health information<br/>[models.py]"]
  node_tablets["Medication tracking<br/>[models.py]"]
  node_appointments["Appointments<br/>[models.py]"]
  node_sqlitedb[("SQLite database<br/>[db.sqlite3]")]
end

subgraph group_ops["Administration"]
  node_admin["Django admin<br/>[admin.py]"]
  node_settings["Database configuration<br/>[settings.py]"]
end

node_patient(("Portal user"))

node_patient -->|"requests pages"| node_routes
node_routes -->|"dispatches"| node_views
node_views -->|"renders"| node_templates
node_views -->|"counts patients"| node_patients
node_settings -->|"configures"| node_sqlitedb
node_admin -->|"registers"| node_patients
node_admin -->|"registers"| node_medicalrecords
node_admin -->|"registers"| node_healthinfo
node_admin -->|"registers"| node_tablets
node_admin -->|"registers"| node_appointments
node_clientjs -->|"reads and writes"| node_browserstore

click node_routes "https://github.com/sahana-652/medivault_1/blob/main/backend/records/urls.py"
click node_views "https://github.com/sahana-652/medivault_1/blob/main/backend/records/views.py"
click node_templates "https://github.com/sahana-652/medivault_1/tree/main/backend/templates"
click node_clientjs "https://github.com/sahana-652/medivault_1/blob/main/backend/static/js/app.js"
click node_patients "https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py"
click node_medicalrecords "https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py"
click node_healthinfo "https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py"
click node_tablets "https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py"
click node_appointments "https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py"
click node_sqlitedb "https://github.com/sahana-652/medivault_1/blob/main/backend/db.sqlite3"
click node_admin "https://github.com/sahana-652/medivault_1/blob/main/backend/records/admin.py"
click node_settings "https://github.com/sahana-652/medivault_1/blob/main/backend/project/settings.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_routes,node_views,node_templates,node_patient toneBlue
class node_clientjs,node_browserstore toneAmber
class node_patients,node_medicalrecords,node_healthinfo,node_tablets,node_appointments,node_sqlitedb toneMint
class node_admin,node_settings toneRose
```

## Components

### Portal delivery

- [Page and API routes](https://github.com/sahana-652/medivault_1/blob/main/backend/records/urls.py): `backend/records/urls.py`
- [Page and health views](https://github.com/sahana-652/medivault_1/blob/main/backend/records/views.py): `backend/records/views.py`
- [Portal pages](https://github.com/sahana-652/medivault_1/tree/main/backend/templates): `backend/templates`

### Browser behavior

- [Browser utilities](https://github.com/sahana-652/medivault_1/blob/main/backend/static/js/app.js): `backend/static/js/app.js`
- **Browser local storage**

### Clinical domain

- [Patient identity](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py): `backend/records/models.py`
- [Medical records](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py): `backend/records/models.py`
- [Health information](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py): `backend/records/models.py`
- [Medication tracking](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py): `backend/records/models.py`
- [Appointments](https://github.com/sahana-652/medivault_1/blob/main/backend/records/models.py): `backend/records/models.py`
- [SQLite database](https://github.com/sahana-652/medivault_1/blob/main/backend/db.sqlite3): `backend/db.sqlite3`

### Administration

- [Django admin](https://github.com/sahana-652/medivault_1/blob/main/backend/records/admin.py): `backend/records/admin.py`
- [Database configuration](https://github.com/sahana-652/medivault_1/blob/main/backend/project/settings.py): `backend/project/settings.py`

### Other components

- **Portal user**

## Connections

- Portal user → Page and API routes: requests pages (evidence: `backend/records/urls.py`)
- Page and API routes → Page and health views: dispatches (evidence: `backend/records/urls.py`)
- Page and health views → Portal pages: renders (evidence: `backend/records/views.py`)
- Page and health views → Patient identity: counts patients (evidence: `backend/records/views.py`)
- Database configuration → SQLite database: configures (evidence: `backend/project/settings.py`)
- Django admin → Patient identity: registers (evidence: `backend/records/admin.py`)
- Django admin → Medical records: registers (evidence: `backend/records/admin.py`)
- Django admin → Health information: registers (evidence: `backend/records/admin.py`)
- Django admin → Medication tracking: registers (evidence: `backend/records/admin.py`)
- Django admin → Appointments: registers (evidence: `backend/records/admin.py`)
- Browser utilities → Browser local storage: reads and writes (evidence: `backend/static/js/app.js`)
