# ullas9525/pilldoze architecture

> Architecture diagram of the GitHub repository ullas9525/pilldoze, 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/ullas9525/pilldoze
- Repository: https://github.com/ullas9525/pilldoze

## Overview

Pilldoze combines a Flutter app for scheduling medication reminders with Arduino-based pill-compartment monitoring. The documented workflow starts when a user schedules a dose; the device then signals the target compartment, checks access, and responds to correct or incorrect access. The tree supports identifying the app entry point and firmware file, but the sampled source does not show their implementation or how schedules are communicated, so the graph reflects documented behavior and leaves the communication mechanism unspecified.

Main entry points: [`pilldoze_Hardware/pilldoze_Hardware.ino`](https://github.com/ullas9525/pilldoze/blob/main/pilldoze_Hardware/pilldoze_Hardware.ino) (Dose and access logic), [`pilldoze/lib/main.dart`](https://github.com/ullas9525/pilldoze/blob/main/pilldoze/lib/main.dart) (Pilldoze app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Scheduling app"]
  node_app_entry["Pilldoze app<br/>[main.dart]"]
end

subgraph group_device["Device logic"]
  node_firmware["Dose and access logic"]
end

subgraph group_hardware["Physical hardware"]
  node_compartments["Pill compartments"]
  node_ir_sensors["IR sensors"]
  node_leds["Compartment LEDs"]
  node_buzzer["Buzzer"]
end

node_user(("User"))

node_user -->|"schedules dose"| node_app_entry
node_app_entry -->|"provides schedule"| node_firmware
node_firmware -->|"signals compartment"| node_leds
node_firmware -->|"sounds alert"| node_buzzer
node_compartments -->|"access detected"| node_ir_sensors
node_ir_sensors -->|"reports access"| node_firmware
node_firmware -->|"warns on wrong access"| node_buzzer

click node_app_entry "https://github.com/ullas9525/pilldoze/blob/main/pilldoze/lib/main.dart"
click node_firmware "https://github.com/ullas9525/pilldoze/blob/main/pilldoze_Hardware/pilldoze_Hardware.ino"

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_entry,node_user toneBlue
class node_firmware toneAmber
class node_compartments,node_ir_sensors,node_leds,node_buzzer toneMint
```

## Components

### Scheduling app

- [Pilldoze app](https://github.com/ullas9525/pilldoze/blob/main/pilldoze/lib/main.dart): `pilldoze/lib/main.dart`

### Device logic

- [Dose and access logic](https://github.com/ullas9525/pilldoze/blob/main/pilldoze_Hardware/pilldoze_Hardware.ino): `pilldoze_Hardware/pilldoze_Hardware.ino`

### Physical hardware

- **Pill compartments**
- **IR sensors**
- **Compartment LEDs**
- **Buzzer**

### Other components

- **User**

## Connections

- User → Pilldoze app: schedules dose
- Pilldoze app → Dose and access logic: provides schedule
- Dose and access logic → Compartment LEDs: signals compartment
- Dose and access logic → Buzzer: sounds alert
- Pill compartments → IR sensors: access detected
- IR sensors → Dose and access logic: reports access
- Dose and access logic → Buzzer: warns on wrong access
