# meetsherasiya/bloodbank_managment_system architecture

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

- Interactive diagram: https://gitdiagram.com/meetsherasiya/bloodbank_managment_system
- Repository: https://github.com/meetsherasiya/bloodbank_managment_system

## Overview

This Django application manages blood donors, patient requests, approvals, and blood-unit inventory. Patients and donors register or sign in, submit requests, and review their histories; administrators review submissions and approve or reject them, with approvals updating inventory. The graph follows the sampled views and models. README capabilities such as expiration tracking and a centralized admin dashboard are documented, but their implementation is not established by the sampled source.

Main entry points: [`patient/views.py`](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/views.py) (Patient workflows), [`bank/views.py`](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/views.py) (Request administration), [`donor/views.py`](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/views.py) (Donor workflows), [`patient/models.py`](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/models.py) (Blood requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and roles"]
  node_auth["Account registration<br/>[views.py]"]
  node_userform["User creation form<br/>[forms.py]"]
  node_users[("User accounts<br/>[models.py]")]
end

subgraph group_patient["Patient requests"]
  node_patientviews["Patient workflows<br/>[views.py]"]
  node_patientform["Request forms<br/>[forms.py]"]
  node_requests[("Blood requests<br/>[models.py]")]
end

subgraph group_donation["Donor contributions"]
  node_donorviews["Donor workflows<br/>[views.py]"]
  node_donorform["Donation forms<br/>[forms.py]"]
  node_donations[("Donation records<br/>[models.py]")]
end

subgraph group_operations["Bank operations"]
  node_adminops["Request administration<br/>[views.py]"]
  node_bankroutes["Admin request routes<br/>[urls.py]"]
  node_inventory[("Blood inventory<br/>[models.py]")]
end

node_user(("Patient or donor"))
node_admin(("Administrator"))

node_user -->|"registers"| node_auth
node_auth -->|"uses"| node_userform
node_user -->|"requests blood"| node_patientviews
node_patientviews -->|"validates"| node_patientform
node_patientviews -->|"creates and reads"| node_requests
node_patientform -->|"models"| node_requests
node_user -->|"offers donation"| node_donorviews
node_donorviews -->|"validates"| node_donorform
node_donorviews -->|"creates and reads"| node_donations
node_donorform -->|"models"| node_donations
node_admin -->|"manages requests"| node_bankroutes
node_bankroutes -->|"routes to"| node_adminops
node_adminops -->|"reviews and updates"| node_requests
node_adminops -->|"reviews and updates"| node_donations
node_adminops -->|"adjusts units"| node_inventory
node_patientviews -->|"reads units"| node_inventory

click node_auth "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/views.py"
click node_userform "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/forms.py"
click node_users "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/models.py"
click node_patientviews "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/views.py"
click node_patientform "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/forms.py"
click node_requests "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/models.py"
click node_donorviews "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/views.py"
click node_donorform "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/forms.py"
click node_donations "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/models.py"
click node_adminops "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/views.py"
click node_bankroutes "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/urls.py"
click node_inventory "https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/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_auth,node_userform,node_users toneBlue
class node_patientviews,node_patientform,node_requests toneAmber
class node_donorviews,node_donorform,node_donations toneMint
class node_adminops,node_bankroutes,node_inventory toneRose
class node_user,node_admin toneIndigo
```

## Components

### Identity and roles

- [Account registration](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/views.py): `account/views.py`
- [User creation form](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/forms.py): `account/forms.py`
- [User accounts](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/account/models.py): `account/models.py`

### Patient requests

- [Patient workflows](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/views.py): `patient/views.py`
- [Request forms](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/forms.py): `patient/forms.py`
- [Blood requests](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/patient/models.py): `patient/models.py`

### Donor contributions

- [Donor workflows](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/views.py): `donor/views.py`
- [Donation forms](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/forms.py): `donor/forms.py`
- [Donation records](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/donor/models.py): `donor/models.py`

### Bank operations

- [Request administration](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/views.py): `bank/views.py`
- [Admin request routes](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/urls.py): `bank/urls.py`
- [Blood inventory](https://github.com/meetsherasiya/bloodbank_managment_system/blob/main/bank/models.py): `bank/models.py`

### Other components

- **Patient or donor**
- **Administrator**

## Connections

- Patient or donor → Account registration: registers
- Account registration → User creation form: uses (evidence: `account/views.py`)
- Patient or donor → Patient workflows: requests blood
- Patient workflows → Request forms: validates (evidence: `patient/views.py`)
- Patient workflows → Blood requests: creates and reads (evidence: `patient/views.py`)
- Request forms → Blood requests: models (evidence: `patient/forms.py`)
- Patient or donor → Donor workflows: offers donation
- Donor workflows → Donation forms: validates (evidence: `donor/views.py`)
- Donor workflows → Donation records: creates and reads (evidence: `donor/views.py`)
- Donation forms → Donation records: models (evidence: `donor/forms.py`)
- Administrator → Admin request routes: manages requests
- Admin request routes → Request administration: routes to (evidence: `bank/urls.py`)
- Request administration → Blood requests: reviews and updates (evidence: `bank/views.py`)
- Request administration → Donation records: reviews and updates (evidence: `bank/views.py`)
- Request administration → Blood inventory: adjusts units (evidence: `bank/views.py`)
- Patient workflows → Blood inventory: reads units (evidence: `patient/views.py`)
