# krystofair/system-filtracji-cyfrowej architecture

> Architecture diagram of the GitHub repository krystofair/system-filtracji-cyfrowej, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krystofair/system-filtracji-cyfrowej
- Repository: https://github.com/krystofair/system-filtracji-cyfrowej

## Overview

##### Main Components

a. User Interface Layer:
- Kivy-based GUI components (*.kv files)
- Main_window as the primary container
- Various menus and dialogs (gui_menus directory)

b. Signal Processing Core:
- Filter implementations (filters directory)
- Audio processing (audio.py)
- Custom plotting and graphing (custom_graphs.py, custom_plots.py)

c. Data Management:
- Store system (store.py)
- Profile management (profile.py)

##### Component Relationships

**[GUI Layer]**
- ↑↓
**[Processing Layer]**
- ↑↓
**[Data Layer]**

##### Specific Implementation Details

a. GUI Layer (Top):
- Main Window (main_window.py + main_window.kv)
- To submenus (gui_menus/*.kv)
- To dialogs (gui/save_dialog.kv)
- Bidirectional connections to Processing Layer

b. Processing Layer (Middle):
- Filter Module:
- Butterworth implementation
- FIR and IIR filter implementations
- Signal Processing:
- Audio Processing
- Interpolation Functions
- Custom Plotting
- Connections to both GUI and Data layers

c. Data Layer (Bottom):
- Store Module
- Profile Management
- File I/O Operations

##### Important Notes

- Separation between GUI and processing logic
- Filter chain implementation
- Signal processing pipeline
- External library dependencies (Kivy, NumPy, SciPy)
- File format support for audio processing

##### Implementation Details

- The modular filter system (filters directory structure)
- The menu hierarchy (gui_menus structure)
- The separation of .kv files from Python implementation
- The relationship between processing components and visualization

- Component boundaries
- Data flow direction
- System dependencies
- File format support
- Processing pipeline stages

Remember to include a version indicator and any relevant deployment notes, as the project includes both Windows (.bat) and Linux (.sh) run scripts.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph GUI
        MW["Main Window"]
        GM["GUI Menus"]
        DG["Dialogs"]
        
        subgraph Menus
            BPM["BP BW Filter Menu"]
            DSM["Design Submenu"]
            MDM["Mode Menu"]
            VSM["Visual Submenu"]
        end
        
        MW --> Menus
        MW --> DG
    end
    
    subgraph Processing
        FI["Filter Implementation"]
        SP["Signal Processing"]
        VS["Visualization System"]
        
        subgraph Filters
            BPB["Bandpass Butterworth"]
            FIR["FIR Filter"]
            IIR["IIR Filter"]
            FMC["Filter Menu Components"]
        end
        
        FI --> Filters
        SP --> VS
    end
    
    subgraph Data
        ST["Store"]
        PM["Profile Management"]
    end
    
    GUI --> Processing
    Processing --> Data
    
    %% External Dependencies
    subgraph Dependencies
        KV["Kivy 2.0.0"]
        NP["NumPy/SciPy"]
    end
    
    %% Click Events
    click MW "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/main_window.py"
    click BPM "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/gui_menus/bp_bw_filter_menu.kv"
    click DSM "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/gui_menus/design_submenu.kv"
    click MDM "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/gui_menus/modemenu.kv"
    click VSM "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/gui_menus/visual_submenu.kv"
    click DG "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/gui/save_dialog.kv"
    click BPB "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/filters/bandpass_butterworth.py"
    click FIR "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/filters/test_filter_fir_1.py"
    click IIR "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/filters/test_filter_iir.py"
    click FMC "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/filters/menus/bpbutterworthfiltermenu.py"
    click SP "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/audio.py"
    click VS "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/custom_graphs.py"
    click ST "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/store.py"
    click PM "https://github.com/krystofair/system-filtracji-cyfrowej/blob/master/profile.py"
    
    %% Styling
    classDef gui fill:#a8d1f0
    classDef processing fill:#90EE90
    classDef data fill:#FFE5B4
    classDef deps fill:#E6E6FA
    
    class MW,GM,DG,BPM,DSM,MDM,VSM gui
    class FI,SP,VS,BPB,FIR,IIR,FMC processing
    class ST,PM data
    class KV,NP deps
    
    %% Legend
    subgraph Legend
        L1["GUI Components"]:::gui
        L2["Processing Components"]:::processing
        L3["Data Components"]:::data
        L4["External Dependencies"]:::deps
    end
```
