# karanpateldev/capstone-project architecture

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

- Interactive diagram: https://gitdiagram.com/karanpateldev/capstone-project
- Repository: https://github.com/karanpateldev/capstone-project

## Overview

- Modules for gesture- or motion-based interactions: air_canvas_ml.py (likely handling a machine-learning-based drawing canvas) and air_piano.py (which probably interprets gestures to simulate a piano).
- Modules hinting at various input methods: eye_control.py (suggesting eye-tracking controls), keyboard.py (indicating standard keyboard inputs), and vb_control.py (which may refer to volume or virtual button controls).
- A primary app entry point: app.py, which likely integrates these modules.
- windows.py may be handling windowed UI elements, and the assets folder would provide supporting media or resources.

##### Main Actors and Their Goals
- User/Operator – The primary actor who interacts with the system.
- (Potentially) External Modules or Devices – In case any hardware (e.g., cameras or sensors for eye control/gesture detection) is assumed.

##### Use Cases Based on the Functional Modules
- “Interact with Air Canvas”: Represented by air_canvas_ml.py, this use case likely covers drawing actions, perhaps with gesture detection and ML interpretation.
- “Play Air Piano”: Latest from air_piano.py, where the user performs music actions in the air.
- “Control via Eye Tracking”: Covered by eye_control.py; the user interacts with the UI or navigates content using eye movements.
- “Keyboard Input Handling”: Provided by keyboard.py, allowing classic keyboard interactions.
- “VB/Virtual Button Control”: From vb_control.py, where the user manipulates virtual controls.
- “Window Management”: Managed by windows.py, perhaps displaying different UI windows or panels.
- “Application Orchestration”: Managed by app.py, which ties these modules together.

##### Relationships
- For each use case (depicted as ovals), show associations (lines) from the User to the relevant use cases. For example, the User “initiates” the Air Canvas, Air Piano, and Eye Tracking use cases.
- If a use case depends on input from another module (for example, window management might be a supporting system for the other functionalities), use the "include" or "extend" relationships as needed to indicate dependency.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Actors
    User["User/Operator"]:::actor

    %% Gesture-Based Interactions
    subgraph "Gesture-Based Interactions"
        AC["Interact with Air Canvas"]:::gesture
        AP["Play Air Piano"]:::gesture
    end

    %% Traditional Interactions
    subgraph "Traditional Interactions"
        ET["Control via Eye Tracking"]:::traditional
        KI["Keyboard Input Handling"]:::traditional
        VB["VB/Virtual Button Control"]:::traditional
    end

    %% Supporting and Orchestration use cases
    WM["Window Management"]:::support
    AO["Application Orchestration"]:::orchestration

    %% Relationships from Actor to use cases
    User -->|"initiates"| AC
    User -->|"initiates"| AP
    User -->|"initiates"| ET
    User -->|"initiates"| KI
    User -->|"initiates"| VB
    User -->|"initiates"| WM

    %% Application orchestration manages all functionalities
    AO -->|"includes"| AC
    AO -->|"includes"| AP
    AO -->|"includes"| ET
    AO -->|"includes"| KI
    AO -->|"includes"| VB
    AO -->|"includes"| WM

    %% Click Events (paths provided by component mapping)
    click AO "https://github.com/karanpateldev/capstone-project/blob/main/app.py"
    click AC "https://github.com/karanpateldev/capstone-project/blob/main/air_canvas_ml.py"
    click AP "https://github.com/karanpateldev/capstone-project/blob/main/air_piano.py"
    click ET "https://github.com/karanpateldev/capstone-project/blob/main/eye_control.py"
    click KI "https://github.com/karanpateldev/capstone-project/blob/main/keyboard.py"
    click VB "https://github.com/karanpateldev/capstone-project/blob/main/vb_control.py"
    click WM "https://github.com/karanpateldev/capstone-project/blob/main/windows.py"

    %% Styles
    classDef actor fill:#cce5ff,stroke:#007acc,stroke-width:2px,color:#003366;
    classDef gesture fill:#ffecb3,stroke:#ff9800,stroke-width:2px,color:#7d4c00;
    classDef traditional fill:#e1bee7,stroke:#9c27b0,stroke-width:2px,color:#4a148c;
    classDef orchestration fill:#c5cae9,stroke:#3f51b5,stroke-width:2px,color:#1a237e;
    classDef support fill:#f0f4c3,stroke:#8bc34a,stroke-width:2px,color:#33691e;
```
