# thangallapallysiddu-10/secure-storage-system-for-medical-image-data architecture

> Architecture diagram of the GitHub repository thangallapallysiddu-10/secure-storage-system-for-medical-image-data, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data
- Repository: https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data

## Overview

SecureMedicalImage is a Django medical-image vault for patients, doctors, and administrators. Patients register, await administrator activation, log in, upload image records, and review their own records; uploads are saved under media storage and recorded with blockchain-style transaction data. Doctors authenticate by mobile number plus an OTP and view records assigned to them. Administrators activate users, manage doctors, and inspect the audit log. The views and URL routing are sampled; the README describes verification and hash chaining, but the blockchain implementation and model definitions were not sampled, so their internals are not expanded.

Main entry points: [`users/views.py`](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/views.py) (Patient actions), [`SecureMedicalImage/urls.py`](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/SecureMedicalImage/urls.py) (URL router), [`doctors/views.py`](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/doctors/views.py) (Doctor actions), [`admins/views.py`](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/admins/views.py) (Admin actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_urls["URL router<br/>[urls.py]"]
  node_site_views["Site pages<br/>[views.py]"]
  node_user_templates["Patient screens"]
  node_doctor_templates["Doctor screens"]
  node_admin_templates["Admin screens"]
  node_otp_template["OTP screen<br/>[otpCheck.html]"]
end

subgraph group_access["Identity and roles"]
  node_user_views["Patient actions<br/>[views.py]"]
  node_doctor_views["Doctor actions<br/>[views.py]"]
  node_admin_views["Admin actions<br/>[views.py]"]
  node_registration_form["Registration form<br/>[forms.py]"]
  node_user_data[("User accounts<br/>[models.py]")]
  node_doctor_data[("Doctor records<br/>[models.py]")]
end

subgraph group_records["Medical records"]
  node_patient_data[("Image records<br/>[models.py]")]
  node_media_files[("Image files")]
end

subgraph group_audit["Audit trail"]
  node_blockchain["Chain logic<br/>[blkchain.py]"]
  node_audit_data[("Audit transactions<br/>[models.py]")]
end

node_patient(("Patient"))
node_doctor(("Doctor"))
node_admin_actor(("Administrator"))

node_patient -->|"requests pages"| node_urls
node_doctor -->|"requests pages"| node_urls
node_admin_actor -->|"requests pages"| node_urls
node_urls -->|"dispatches pages"| node_site_views
node_urls -->|"dispatches actions"| node_user_views
node_urls -->|"dispatches actions"| node_doctor_views
node_urls -->|"dispatches actions"| node_admin_views
node_site_views -->|"renders pages"| node_user_templates
node_user_views -->|"validates registration"| node_registration_form
node_user_views -->|"reads and writes"| node_user_data
node_user_views -->|"looks up doctors"| node_doctor_data
node_user_views -->|"creates and reads"| node_patient_data
node_user_views -->|"saves uploads"| node_media_files
node_user_views -->|"creates blocks"| node_blockchain
node_user_views -->|"stores transactions"| node_audit_data
node_user_views -->|"renders pages"| node_user_templates
node_doctor_views -->|"checks doctor"| node_doctor_data
node_doctor_views -->|"reads assigned records"| node_patient_data
node_doctor_views -->|"renders pages"| node_doctor_templates
node_doctor_views -->|"renders challenge"| node_otp_template
node_admin_views -->|"activates users"| node_user_data
node_admin_views -->|"manages doctors"| node_doctor_data
node_admin_views -->|"reads audit log"| node_audit_data
node_admin_views -->|"renders pages"| node_admin_templates

click node_urls "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/SecureMedicalImage/urls.py"
click node_site_views "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/SecureMedicalImage/views.py"
click node_user_views "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/views.py"
click node_doctor_views "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/doctors/views.py"
click node_admin_views "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/admins/views.py"
click node_registration_form "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/forms.py"
click node_user_data "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py"
click node_doctor_data "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py"
click node_patient_data "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py"
click node_media_files "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/media/files"
click node_blockchain "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/blkchain.py"
click node_audit_data "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py"
click node_user_templates "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/users"
click node_doctor_templates "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/dctrs"
click node_admin_templates "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/admins"
click node_otp_template "https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/assets/templates/otpCheck.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_urls,node_site_views,node_user_templates,node_doctor_templates,node_admin_templates,node_otp_template toneBlue
class node_user_views,node_doctor_views,node_admin_views,node_registration_form,node_user_data,node_doctor_data toneAmber
class node_patient_data,node_media_files toneMint
class node_blockchain,node_audit_data toneRose
class node_patient,node_doctor,node_admin_actor toneIndigo
```

## Components

### Web entry

- [URL router](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/SecureMedicalImage/urls.py): `SecureMedicalImage/urls.py`
- [Site pages](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/SecureMedicalImage/views.py): `SecureMedicalImage/views.py`
- [Patient screens](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/users): `assets/templates/users`
- [Doctor screens](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/dctrs): `assets/templates/dctrs`
- [Admin screens](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/assets/templates/admins): `assets/templates/admins`
- [OTP screen](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/assets/templates/otpCheck.html): `assets/templates/otpCheck.html`

### Identity and roles

- [Patient actions](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/views.py): `users/views.py`
- [Doctor actions](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/doctors/views.py): `doctors/views.py`
- [Admin actions](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/admins/views.py): `admins/views.py`
- [Registration form](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/forms.py): `users/forms.py`
- [User accounts](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py): `users/models.py`
- [Doctor records](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py): `users/models.py`

### Medical records

- [Image records](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py): `users/models.py`
- [Image files](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/tree/main/media/files): `media/files`

### Audit trail

- [Chain logic](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/blkchain.py): `users/blkchain.py`
- [Audit transactions](https://github.com/thangallapallysiddu-10/secure-storage-system-for-medical-image-data/blob/main/users/models.py): `users/models.py`

### Other components

- **Patient**
- **Doctor**
- **Administrator**

## Connections

- Patient → URL router: requests pages
- Doctor → URL router: requests pages
- Administrator → URL router: requests pages
- URL router → Site pages: dispatches pages
- URL router → Patient actions: dispatches actions
- URL router → Doctor actions: dispatches actions
- URL router → Admin actions: dispatches actions
- Site pages → Patient screens: renders pages
- Patient actions → Registration form: validates registration
- Patient actions → User accounts: reads and writes
- Patient actions → Doctor records: looks up doctors
- Patient actions → Image records: creates and reads
- Patient actions → Image files: saves uploads
- Patient actions → Chain logic: creates blocks
- Patient actions → Audit transactions: stores transactions
- Patient actions → Patient screens: renders pages
- Doctor actions → Doctor records: checks doctor
- Doctor actions → Image records: reads assigned records
- Doctor actions → Doctor screens: renders pages
- Doctor actions → OTP screen: renders challenge
- Admin actions → User accounts: activates users
- Admin actions → Doctor records: manages doctors
- Admin actions → Audit transactions: reads audit log
- Admin actions → Admin screens: renders pages
