# mihribandincer/app-controlled-perfusion-pump architecture

> Architecture diagram of the GitHub repository mihribandincer/app-controlled-perfusion-pump, 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/mihribandincer/app-controlled-perfusion-pump
- Repository: https://github.com/mihribandincer/app-controlled-perfusion-pump

## Overview

This is a Flutter mobile interface for a syringe-based infusion pump controlled by an Arduino Mega over Bluetooth. The documented workflow is that a healthcare professional enters volume and duration, starts delivery, and receives a completion message based on fluid-sensor feedback. The README documents the device components and behavior, but the Arduino implementation is not exposed in the supplied source excerpts; those links reflect documented behavior rather than inspected calls.

Main entry points: [`perfusionPump-code`](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code) (Arduino Mega), [`app/lib/main.dart`](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/app/lib/main.dart) (Flutter app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile control"]
  node_flutter_app["Flutter app<br/>[main.dart]"]
end

subgraph group_device["Pump device"]
  node_bluetooth["HC-05 Bluetooth"]
  node_arduino["Arduino Mega"]
  node_pump_mechanism["Syringe drive"]
  node_fluid_sensor["Fluid sensor"]
  node_device_controls["Keypad and LCD"]
end

node_clinician(("Healthcare professional"))

node_clinician -->|"sets infusion"| node_flutter_app
node_flutter_app -->|"sends settings"| node_bluetooth
node_bluetooth -->|"relays commands"| node_arduino
node_arduino -->|"drives infusion"| node_pump_mechanism
node_arduino -->|"reads level"| node_fluid_sensor
node_arduino -->|"sends status"| node_bluetooth
node_bluetooth -->|"relays status"| node_flutter_app
node_device_controls -->|"provides local input"| node_arduino

click node_flutter_app "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/app/lib/main.dart"
click node_bluetooth "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code"
click node_arduino "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code"
click node_pump_mechanism "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code"
click node_fluid_sensor "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code"
click node_device_controls "https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code"

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_flutter_app toneBlue
class node_bluetooth,node_arduino,node_pump_mechanism,node_fluid_sensor,node_device_controls toneAmber
class node_clinician toneIndigo
```

## Components

### Mobile control

- [Flutter app](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/app/lib/main.dart): `app/lib/main.dart`

### Pump device

- [HC-05 Bluetooth](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code): `perfusionPump-code`
- [Arduino Mega](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code): `perfusionPump-code`
- [Syringe drive](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code): `perfusionPump-code`
- [Fluid sensor](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code): `perfusionPump-code`
- [Keypad and LCD](https://github.com/mihribandincer/app-controlled-perfusion-pump/blob/main/perfusionPump-code): `perfusionPump-code`

### Other components

- **Healthcare professional**

## Connections

- Healthcare professional → Flutter app: sets infusion (evidence: `README.md`)
- Flutter app → HC-05 Bluetooth: sends settings (evidence: `README.md`)
- HC-05 Bluetooth → Arduino Mega: relays commands (evidence: `README.md`)
- Arduino Mega → Syringe drive: drives infusion (evidence: `README.md`)
- Arduino Mega → Fluid sensor: reads level (evidence: `README.md`)
- Arduino Mega → HC-05 Bluetooth: sends status (evidence: `README.md`)
- HC-05 Bluetooth → Flutter app: relays status (evidence: `README.md`)
- Keypad and LCD → Arduino Mega: provides local input (evidence: `README.md`)
