# rayhan-bin-maleque/blood_bank_management_system architecture

> Architecture diagram of the GitHub repository rayhan-bin-maleque/blood_bank_management_system, 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/rayhan-bin-maleque/blood_bank_management_system
- Repository: https://github.com/rayhan-bin-maleque/blood_bank_management_system

## Overview

This is a Windows Forms blood-bank management application. Staff and users enter through login or signup; registration creates donor or patient records, while staff manage donor/patient data, inventory, and transfer requests, and registered users view profiles and status. The forms access SQL Server directly. The README documents capabilities beyond the sampled excerpts; those are represented where their modules are listed in the tree, but their internal behavior is not independently verified.

Main entry points: [`c# project/Form1.cs`](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/Form1.cs) (Role login), [`c# project/BloodStock.cs`](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/BloodStock.cs) (Blood inventory), [`c# project/SignupForm.cs`](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/SignupForm.cs) (Signup choices), [`c# project/DonorRegForm.cs`](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonorRegForm.cs) (Donor registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Signup"]
  node_app["WinForms startup<br/>[Program.cs]"]
  node_login["Role login<br/>[Form1.cs]"]
  node_signup["Signup choices<br/>[SignupForm.cs]"]
end

subgraph group_registration["Registration"]
  node_donorreg["Donor registration<br/>[DonorRegForm.cs]"]
  node_patientreg["Patient registration<br/>[PatientReqForm.cs]"]
end

subgraph group_operations["Staff Operations"]
  node_donormgr["Donor management<br/>[DonorManager.cs]"]
  node_patientmgr["Patient management<br/>[PatientManager.cs]"]
  node_stock["Blood inventory<br/>[BloodStock.cs]"]
  node_transfer["Transfer processing<br/>[BloodTransfer3.cs]"]
end

subgraph group_profiles["User Profiles"]
  node_donorview["Donor profile<br/>[DonerView.cs]"]
  node_patientview["Patient profile<br/>[PatientView.cs]"]
end

subgraph group_persistence["Persistence"]
  node_sql[("SQL Server")]
end

node_user(("User or staff"))

node_user -->|"starts"| node_app
node_app -->|"opens"| node_login
node_user -->|"submits credentials"| node_login
node_login -->|"checks credentials"| node_sql
node_login -->|"opens"| node_signup
node_signup -->|"opens"| node_donorreg
node_signup -->|"opens"| node_patientreg
node_donorreg -->|"writes donor and login"| node_sql
node_donorreg -->|"creates pending stock"| node_sql
node_patientreg -->|"writes patient and login"| node_sql
node_patientreg -->|"creates request"| node_sql
node_login -->|"routes staff"| node_donormgr
node_login -->|"routes staff"| node_patientmgr
node_login -->|"routes staff"| node_stock
node_login -->|"routes staff"| node_transfer
node_login -->|"routes donor"| node_donorview
node_login -->|"routes patient"| node_patientview
node_donormgr -->|"manages donor records"| node_sql
node_donormgr -->|"adds donation stock"| node_stock
node_patientmgr -->|"manages patient records"| node_sql
node_stock -->|"reads and updates stock"| node_sql
node_transfer -->|"checks and updates transfer"| node_sql
node_transfer -->|"checks blood availability"| node_stock
node_donorview -->|"loads profile and status"| node_sql
node_patientview -->|"loads profile and status"| node_sql

click node_app "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/Program.cs"
click node_login "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/Form1.cs"
click node_signup "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/SignupForm.cs"
click node_donorreg "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonorRegForm.cs"
click node_patientreg "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientReqForm.cs"
click node_donormgr "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonorManager.cs"
click node_patientmgr "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientManager.cs"
click node_stock "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/BloodStock.cs"
click node_transfer "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/BloodTransfer3.cs"
click node_donorview "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonerView.cs"
click node_patientview "https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientView.cs"

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_login,node_signup,node_user toneBlue
class node_donorreg,node_patientreg toneAmber
class node_donormgr,node_patientmgr,node_stock,node_transfer toneMint
class node_donorview,node_patientview toneRose
class node_sql toneIndigo
```

## Components

### Access and Signup

- [WinForms startup](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/Program.cs): `c# project/Program.cs`
- [Role login](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/Form1.cs): `c# project/Form1.cs`
- [Signup choices](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/SignupForm.cs): `c# project/SignupForm.cs`

### Registration

- [Donor registration](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonorRegForm.cs): `c# project/DonorRegForm.cs`
- [Patient registration](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientReqForm.cs): `c# project/PatientReqForm.cs`

### Staff Operations

- [Donor management](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonorManager.cs): `c# project/DonorManager.cs`
- [Patient management](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientManager.cs): `c# project/PatientManager.cs`
- [Blood inventory](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/BloodStock.cs): `c# project/BloodStock.cs`
- [Transfer processing](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/BloodTransfer3.cs): `c# project/BloodTransfer3.cs`

### User Profiles

- [Donor profile](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/DonerView.cs): `c# project/DonerView.cs`
- [Patient profile](https://github.com/rayhan-bin-maleque/blood_bank_management_system/blob/main/c%23%20project/PatientView.cs): `c# project/PatientView.cs`

### Persistence

- **SQL Server**

### Other components

- **User or staff**

## Connections

- User or staff → WinForms startup: starts (evidence: `c# project/Program.cs`)
- WinForms startup → Role login: opens (evidence: `c# project/Program.cs`)
- User or staff → Role login: submits credentials (evidence: `c# project/Form1.cs`)
- Role login → SQL Server: checks credentials (evidence: `c# project/Form1.cs`)
- Role login → Signup choices: opens (evidence: `c# project/Form1.cs`)
- Signup choices → Donor registration: opens (evidence: `c# project/SignupForm.cs`)
- Signup choices → Patient registration: opens (evidence: `c# project/SignupForm.cs`)
- Donor registration → SQL Server: writes donor and login (evidence: `c# project/DonorRegForm.cs`)
- Donor registration → SQL Server: creates pending stock (evidence: `c# project/DonorRegForm.cs`)
- Patient registration → SQL Server: writes patient and login (evidence: `c# project/PatientReqForm.cs`)
- Patient registration → SQL Server: creates request (evidence: `c# project/PatientReqForm.cs`)
- Role login → Donor management: routes staff (evidence: `c# project/Form1.cs`)
- Role login → Patient management: routes staff (evidence: `c# project/Form1.cs`)
- Role login → Blood inventory: routes staff (evidence: `c# project/Form1.cs`)
- Role login → Transfer processing: routes staff (evidence: `c# project/Form1.cs`)
- Role login → Donor profile: routes donor (evidence: `c# project/Form1.cs`)
- Role login → Patient profile: routes patient (evidence: `c# project/Form1.cs`)
- Donor management → SQL Server: manages donor records (evidence: `c# project/DonorManager.cs`)
- Donor management → Blood inventory: adds donation stock (evidence: `c# project/DonorManager.cs`)
- Patient management → SQL Server: manages patient records (evidence: `c# project/PatientManager.cs`)
- Blood inventory → SQL Server: reads and updates stock (evidence: `c# project/BloodStock.cs`)
- Transfer processing → SQL Server: checks and updates transfer (evidence: `c# project/BloodTransfer3.cs`)
- Transfer processing → Blood inventory: checks blood availability (evidence: `c# project/BloodTransfer3.cs`)
- Donor profile → SQL Server: loads profile and status (evidence: `c# project/DonerView.cs`)
- Patient profile → SQL Server: loads profile and status (evidence: `c# project/PatientView.cs`)
