# danteherrera1999/flares architecture

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

- Interactive diagram: https://gitdiagram.com/danteherrera1999/flares
- Repository: https://github.com/danteherrera1999/flares

## Overview

FLARES is a desktop data-acquisition and live-plotting application. The runtime starts the DAQ manager, logger, and GUI; acquired analog samples are packetized, distributed for logging and plotting, and shown through configurable plots. The GUI also exposes channel and hardware configuration, while hardware discovery selects supported module types. The README is empty, so capability and relationship evidence comes from the supplied source excerpts and SOURCE INDEX; unsampled subsystem internals are represented only where the tree supports them.

Main entry points: [`src/flares/main.py`](https://github.com/danteherrera1999/flares/blob/main/src/flares/main.py) (Application entry), [`src/flares/daq/DaqManager.py`](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/DaqManager.py) (DAQ manager), [`src/flares/gui/GuiMain.py`](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/GuiMain.py) (GUI controller), [`src/flares/daq/CompactModule.py`](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/CompactModule.py) (Module detection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_entry["Application entry<br/>[main.py]"]
end

subgraph group_hardware["DAQ and hardware"]
  node_daq["DAQ manager<br/>[DaqManager.py]"]
  node_analog["Analog task<br/>[AnalogTask.py]"]
  node_modules["Module detection<br/>[CompactModule.py]"]
  node_hardwareconfig["Hardware configuration<br/>[HardwareConfig.py]"]
  node_analogmodule["Analog input module"]
  node_digitalin["Digital input module"]
  node_digitalout["Digital output module"]
end

subgraph group_data["Data and logging"]
  node_rawpacket["Raw packets<br/>[Packets.py]"]
  node_datapacket["Data packets<br/>[Packets.py]"]
  node_dataqueue["Acquired data queue"]
  node_plotbuffer["Plot-rate buffers<br/>[PlotBuffer.py]"]
  node_databuffer["Circular data buffer<br/>[DataBuffer.py]"]
  node_logger["CSV logger<br/>[LogManager.py]"]
end

subgraph group_interface["GUI and configuration"]
  node_configstore["Configuration store<br/>[ConfigStore.py]"]
  node_gui["GUI controller<br/>[GuiMain.py]"]
  node_datatab["Live data tab<br/>[DataTab.py]"]
  node_configuretab["Configure tab<br/>[ConfigureTab.py]"]
  node_hardwaretab["Hardware tab"]
  node_multiplot["Multi-plot view<br/>[MultiPlot.py]"]
  node_nestedcombo["Nested channel selector<br/>[NestedCombo.py]"]
end

node_user(("Operator"))

node_user -->|"operates"| node_gui
node_entry -->|"starts"| node_daq
node_entry -->|"starts"| node_logger
node_entry -->|"runs"| node_gui
node_entry -->|"constructs"| node_hardwareconfig
node_entry -->|"constructs"| node_configstore
node_daq -->|"configures"| node_analog
node_analog -->|"emits"| node_rawpacket
node_daq -->|"wraps as"| node_datapacket
node_daq -->|"writes"| node_dataqueue
node_dataqueue -->|"read by"| node_logger
node_daq -->|"extends"| node_plotbuffer
node_plotbuffer -->|"uses"| node_databuffer
node_hardwareconfig -->|"uses"| node_modules
node_modules -->|"creates"| node_analogmodule
node_modules -->|"creates"| node_digitalin
node_modules -->|"creates"| node_digitalout
node_gui -->|"creates"| node_datatab
node_gui -->|"creates"| node_configuretab
node_gui -->|"creates"| node_hardwaretab
node_datatab -->|"creates"| node_multiplot
node_multiplot -->|"creates"| node_nestedcombo
node_multiplot -->|"reads"| node_plotbuffer
node_datatab -->|"controls logging"| node_configstore
node_logger -->|"reads settings"| node_configstore

click node_entry "https://github.com/danteherrera1999/flares/blob/main/src/flares/main.py"
click node_daq "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/DaqManager.py"
click node_analog "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/AnalogTask.py"
click node_modules "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/CompactModule.py"
click node_hardwareconfig "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/HardwareConfig.py"
click node_analogmodule "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/AnalogInputModule.py"
click node_digitalin "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/DigitalInputModule.py"
click node_digitalout "https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/DigitalOutputModule.py"
click node_rawpacket "https://github.com/danteherrera1999/flares/blob/main/src/flares/data/Packets.py"
click node_datapacket "https://github.com/danteherrera1999/flares/blob/main/src/flares/data/Packets.py"
click node_plotbuffer "https://github.com/danteherrera1999/flares/blob/main/src/flares/data/PlotBuffer.py"
click node_databuffer "https://github.com/danteherrera1999/flares/blob/main/src/flares/data/DataBuffer.py"
click node_logger "https://github.com/danteherrera1999/flares/blob/main/src/flares/logger/LogManager.py"
click node_configstore "https://github.com/danteherrera1999/flares/blob/main/src/flares/config/ConfigStore.py"
click node_gui "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/GuiMain.py"
click node_datatab "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/DataTab.py"
click node_configuretab "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/ConfigureTab.py"
click node_hardwaretab "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/HardwareConfigureTab.py"
click node_multiplot "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/widgets/MultiPlot.py"
click node_nestedcombo "https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/widgets/NestedCombo.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_entry toneBlue
class node_daq,node_analog,node_modules,node_hardwareconfig,node_analogmodule,node_digitalin,node_digitalout toneAmber
class node_rawpacket,node_datapacket,node_dataqueue,node_plotbuffer,node_databuffer,node_logger toneMint
class node_configstore,node_gui,node_datatab,node_configuretab,node_hardwaretab,node_multiplot,node_nestedcombo toneRose
class node_user toneIndigo
```

## Components

### Runtime orchestration

- [Application entry](https://github.com/danteherrera1999/flares/blob/main/src/flares/main.py): `src/flares/main.py`

### DAQ and hardware

- [DAQ manager](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/DaqManager.py): `src/flares/daq/DaqManager.py`
- [Analog task](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/AnalogTask.py): `src/flares/daq/AnalogTask.py`
- [Module detection](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/CompactModule.py): `src/flares/daq/CompactModule.py`
- [Hardware configuration](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/HardwareConfig.py): `src/flares/daq/HardwareConfig.py`
- [Analog input module](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/AnalogInputModule.py): `src/flares/daq/supported_modules/AnalogInputModule.py`
- [Digital input module](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/DigitalInputModule.py): `src/flares/daq/supported_modules/DigitalInputModule.py`
- [Digital output module](https://github.com/danteherrera1999/flares/blob/main/src/flares/daq/supported_modules/DigitalOutputModule.py): `src/flares/daq/supported_modules/DigitalOutputModule.py`

### Data and logging

- [Raw packets](https://github.com/danteherrera1999/flares/blob/main/src/flares/data/Packets.py): `src/flares/data/Packets.py`
- [Data packets](https://github.com/danteherrera1999/flares/blob/main/src/flares/data/Packets.py): `src/flares/data/Packets.py`
- **Acquired data queue**
- [Plot-rate buffers](https://github.com/danteherrera1999/flares/blob/main/src/flares/data/PlotBuffer.py): `src/flares/data/PlotBuffer.py`
- [Circular data buffer](https://github.com/danteherrera1999/flares/blob/main/src/flares/data/DataBuffer.py): `src/flares/data/DataBuffer.py`
- [CSV logger](https://github.com/danteherrera1999/flares/blob/main/src/flares/logger/LogManager.py): `src/flares/logger/LogManager.py`

### GUI and configuration

- [Configuration store](https://github.com/danteherrera1999/flares/blob/main/src/flares/config/ConfigStore.py): `src/flares/config/ConfigStore.py`
- [GUI controller](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/GuiMain.py): `src/flares/gui/GuiMain.py`
- [Live data tab](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/DataTab.py): `src/flares/gui/tabs/DataTab.py`
- [Configure tab](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/ConfigureTab.py): `src/flares/gui/tabs/ConfigureTab.py`
- [Hardware tab](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/tabs/HardwareConfigureTab.py): `src/flares/gui/tabs/HardwareConfigureTab.py`
- [Multi-plot view](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/widgets/MultiPlot.py): `src/flares/gui/widgets/MultiPlot.py`
- [Nested channel selector](https://github.com/danteherrera1999/flares/blob/main/src/flares/gui/widgets/NestedCombo.py): `src/flares/gui/widgets/NestedCombo.py`

### Other components

- **Operator**

## Connections

- Operator → GUI controller: operates (evidence: `src/flares/gui/GuiMain.py`)
- Application entry → DAQ manager: starts (evidence: `src/flares/main.py`)
- Application entry → CSV logger: starts (evidence: `src/flares/main.py`)
- Application entry → GUI controller: runs (evidence: `src/flares/main.py`)
- Application entry → Hardware configuration: constructs (evidence: `src/flares/main.py`)
- Application entry → Configuration store: constructs (evidence: `src/flares/main.py`)
- DAQ manager → Analog task: configures (evidence: `src/flares/daq/DaqManager.py`)
- Analog task → Raw packets: emits (evidence: `src/flares/daq/AnalogTask.py`)
- DAQ manager → Data packets: wraps as (evidence: `src/flares/daq/DaqManager.py`)
- DAQ manager → Acquired data queue: writes (evidence: `src/flares/daq/DaqManager.py`)
- Acquired data queue → CSV logger: read by (evidence: `src/flares/logger/LogManager.py`)
- DAQ manager → Plot-rate buffers: extends (evidence: `src/flares/daq/DaqManager.py`)
- Plot-rate buffers → Circular data buffer: uses (evidence: `src/flares/data/PlotBuffer.py`)
- Hardware configuration → Module detection: uses (evidence: `src/flares/daq/HardwareConfig.py`)
- Module detection → Analog input module: creates (evidence: `src/flares/daq/CompactModule.py`)
- Module detection → Digital input module: creates (evidence: `src/flares/daq/CompactModule.py`)
- Module detection → Digital output module: creates (evidence: `src/flares/daq/CompactModule.py`)
- GUI controller → Live data tab: creates (evidence: `src/flares/gui/GuiMain.py`)
- GUI controller → Configure tab: creates (evidence: `src/flares/gui/GuiMain.py`)
- GUI controller → Hardware tab: creates (evidence: `src/flares/gui/GuiMain.py`)
- Live data tab → Multi-plot view: creates (evidence: `src/flares/gui/tabs/DataTab.py`)
- Multi-plot view → Nested channel selector: creates (evidence: `src/flares/gui/widgets/MultiPlot.py`)
- Multi-plot view → Plot-rate buffers: reads (evidence: `src/flares/gui/widgets/MultiPlot.py`)
- Live data tab → Configuration store: controls logging (evidence: `src/flares/gui/tabs/DataTab.py`)
- CSV logger → Configuration store: reads settings (evidence: `src/flares/logger/LogManager.py`)
