# makcuai/eventuri-ai-makcu architecture

> Architecture diagram of the GitHub repository makcuai/eventuri-ai-makcu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/makcuai/eventuri-ai-makcu
- Repository: https://github.com/makcuai/eventuri-ai-makcu

## Overview

##### Project type and purpose
- This is a Windows desktop AI-powered aimbot and detection GUI.
- Key purpose: capture game frames, run YOLO model inference (v8–v12 in .pt, .onnx, .engine formats) on GPU (CUDA or DirectML), display results in a CustomTkinter GUI, and drive mouse movements or a USB serial device for aim assistance.

##### File structure
- Top‐level: setup scripts (.bat), README, source folder `src/`.
- `src/` contains:
- `main.py`, `Eventuri-AI.py`: application entry points (GUI bootstrap and control loop).
- `capture.py`: screen/frame capture functionality.
- `detection.py`: orchestrates model loading and inference.
- `models/`: directory of multiple YOLO models (Torch, ONNX, TensorRT engines).
- `mouse.py`, `windmouse_smooth.py`, `patch.py`: modules for mouse or hardware-driven aim movement.
- `config.py`: profile management, saving/loading user settings.
- `setup_cuda.py`, `setup_directml.py`: preparation of runtime environment.
- `gui_*.py`: GUI layout, callbacks, constants, and sections.

##### README for additional insights
- Confirms dual-mode GPU support (CUDA 12.6 or DirectML).
- Emphasizes a polished modern UI built on CustomTkinter.
- Profiles, device support (USB serial VID:PID), class selection per game, multi-mode aimbot.

##### Components and interactions
a. Main components
- GUI Layer (CustomTkinter)
- Module
- Inference Engine
- Model Repository (ONNX, .pt, TensorRT .engine)
- Device/Mouse Control Module
- Configuration/Profile Manager
- Environment Setup Subsystem (CUDA or DirectML)
- External Dependencies: GPU drivers, USB serial devices
b. Relationships and interactions
1. GUI Layer triggers Capture → passes frames to Inference Engine.
2. Inference Engine loads selected model from Model Repository (ONNX/PyTorch/TensorRT) using appropriate runtime (DirectML or CUDA).
3. Detection results feed into Mouse Control Module (either OS mouse events via `mouse.py`/`windmouse_smooth.py` or serial packets via `patch.py` to external device).
4. Configuration Manager provides GUI parameters (model path, classes, sensitivity, aimbot mode).
5. Setup scripts (`install_setup_cuda.bat`, `install_setup_directml.bat`) prepare environment before runtime.
c. Architectural patterns/design principles
- Modular separation: UI vs. core logic vs. hardware interface.
- Plug-and-play model loader supporting multiple backends.
- Profile/config abstraction for persistency.
- Batch or live inference loop pattern (capture → preprocess → infer → postprocess → act).
d. Key technologies/frameworks
- Python 3.x, CustomTkinter for UI
- PyTorch, ONNX Runtime, TensorRT
- DirectML/CUDA 12.6
- PySerial or equivalent for USB serial communication

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Entry Points
    subgraph "Application Entry Points"
        direction TB
        MainPy["main.py"]:::core
        EventuriAI["Eventuri-AI.py"]:::core
    end

    %% GUI Layer
    subgraph "GUI Layer" 
        direction TB
        GUILaunch["GUI Launch"]:::ui
        GUICallbacks["gui_callbacks.py"]:::ui
        GUIConstants["gui_constants.py"]:::ui
        GUISections["gui_sections.py"]:::ui
    end

    %% Core Logic
    subgraph "Core Logic" 
        direction TB
        Capture["capture.py"]:::core
        InferenceEngine["detection.py"]:::core
        Config["config.py"]:::core
    end

    %% Model Repo
    ModelRepo["Model Repository (models/)"]:::core

    %% Environment Setup
    subgraph "Environment Setup Subsystem"
        direction TB
        SetupCUDA["setup_cuda.py"]:::core
        SetupDML["setup_directml.py"]:::core
        InstallCUDA["install_setup_cuda.bat"]:::core
        InstallDML["install_setup_directml.bat"]:::core
    end

    %% Device Control
    subgraph "Device/Mouse Control Module"
        direction TB
        MousePy["mouse.py"]:::hw
        WindMouse["windmouse_smooth.py"]:::hw
        PatchMod["patch.py"]:::hw
    end

    %% External Dependencies
    subgraph "External Dependencies"
        direction TB
        GPUDriver["GPU Drivers"]:::ext
        USBDevice["USB Serial Device (VID:PID)"]:::ext
    end

    %% Data Flows
    MainPy -->|starts| EventuriAI
    EventuriAI -->|initializes| GUILaunch
    GUILaunch -->|uses| GUICallbacks
    GUILaunch -->|uses| GUIConstants
    GUILaunch -->|renders| GUISections

    GUILaunch -->|loads settings| Config
    Config -->|provides parameters| GUILaunch

    GUILaunch -->|triggers capture| Capture
    Capture -->|frames| InferenceEngine

    Config -->|model selection| InferenceEngine
    ModelRepo -->|loads model| InferenceEngine

    SetupCUDA -->|initializes CUDA runtime| InferenceEngine
    SetupDML -->|initializes DirectML| InferenceEngine
    InstallCUDA -->|prepares environment| SetupCUDA
    InstallDML -->|prepares environment| SetupDML

    GPUDriver -->|provides GPU compute| InferenceEngine

    InferenceEngine -->|detection results| MousePy
    InferenceEngine -->|detection results| WindMouse
    InferenceEngine -->|detection results| PatchMod

    PatchMod -->|serial output| USBDevice

    %% Click Events
    click MainPy "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/main.py"
    click EventuriAI "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/Eventuri-AI.py"
    click GUICallbacks "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/gui_callbacks.py"
    click GUIConstants "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/gui_constants.py"
    click GUISections "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/gui_sections.py"
    click Capture "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/capture.py"
    click InferenceEngine "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/detection.py"
    click ModelRepo "https://github.com/makcuai/eventuri-ai-makcu/tree/main/src/models/"
    click MousePy "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/mouse.py"
    click WindMouse "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/windmouse_smooth.py"
    click PatchMod "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/patch.py"
    click Config "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/config.py"
    click SetupCUDA "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/setup_cuda.py"
    click SetupDML "https://github.com/makcuai/eventuri-ai-makcu/blob/main/src/setup_directml.py"
    click InstallCUDA "https://github.com/makcuai/eventuri-ai-makcu/blob/main/install_setup_cuda.bat"
    click InstallDML "https://github.com/makcuai/eventuri-ai-makcu/blob/main/install_setup_directml.bat"

    %% Styles
    classDef ui fill:#D0E8FF,stroke:#0050A0,color:#003060;
    classDef core fill:#E0FFE0,stroke:#008000,color:#006000;
    classDef hw fill:#FFEFD0,stroke:#E08A00,color:#A06000;
    classDef ext fill:#F0F0F0,stroke:#666666,color:#333333;
```
