# l33tkr3w/navtest architecture

> Architecture diagram of the GitHub repository l33tkr3w/navtest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/l33tkr3w/navtest
- Repository: https://github.com/l33tkr3w/navtest

## Overview

##### Main Components

a) Core System Components:
- Language Model Service (qwen2.5-coder, minicpm-v)
- Vision Model Service (AskUI/PTA-1)
- UI Automation Engine
- Screenshot Management System
- Logging System

b) External Integrations:
- Operating System UI Interface
- Browser Integration
- File System (for screenshots and logs)

##### Component Relationships

Use the following connection types:
- Double lines for API boundaries

##### Specific Implementation Details

a) UI Automation Features:
- Click Actions
- Type Actions
- Drag-and-Drop
- Hover Actions

b) Vision System:
- Screenshot Capture
- Element Detection
- Verification Logic

c) Browser Automation:
- Session Management
- Navigation Controls

##### Data Flow Representation

Following key flows:
1. User Input → Task Processing → Model Analysis → Action Execution
2. Screenshot Capture → Vision Model → Element Detection → Action Verification
3. Error Handling → Logging → Retry Logic

##### Important Notes

- A feedback loop system showing how the tool verifies actions
- Error handling pathways
- Interaction between language and vision models
- Demonstrate how the system interfaces with the OS

##### Technical Details

Annotations for:
- Python 3.8+ requirement
- Key dependencies (torch, transformers, Pillow, etc.)
- Operating system constraints (Windows-specific)
- Model versions and requirements

Remember to emphasize the feedback loop nature of the system, where actions are verified through screenshots and vision model analysis, as this is a key distinguishing feature of the architecture.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Main Components
    subgraph Entry
        UI[User Interface/Entry Point]
    end

    subgraph "AI Models"
        LM[Language Model Service]
        VM[Vision Model Service]
    end

    subgraph "Core Services"
        UAE[UI Automation Engine]
        SMS[Screenshot Management System]
        LOG[Logging System]
    end

    subgraph "External Systems"
        OS[Operating System UI]
        BR[Browser Integration]
        FS[File System]
    end

    subgraph "Automation Features"
        Click[Click Actions]
        Type[Type Actions]
        DnD[Drag-and-Drop]
        Hover[Hover Actions]
    end

    subgraph "Vision System"
        SC[Screenshot Capture]
        ED[Element Detection]
        VL[Verification Logic]
    end

    %% Relationships
    UI --> LM
    UI --> VM
    UI --> UAE
    
    LM --> UAE
    VM --> UAE
    
    UAE --> Click
    UAE --> Type
    UAE --> DnD
    UAE --> Hover
    
    UAE --> OS
    UAE --> BR
    
    SC --> VM
    VM --> ED
    ED --> VL
    VL --> UAE
    
    SMS --> FS
    LOG --> FS

    %% Click Events
    click UI "https://github.com/l33tkr3w/NavTest/blob/main/NavTest.py"

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef aiModel fill:#90EE90,stroke:#333
    classDef core fill:#ADD8E6,stroke:#333
    classDef external fill:#FFA07A,stroke:#333
    classDef support fill:#D3D3D3,stroke:#333
    
    class LM,VM aiModel
    class UAE,SMS core
    class OS,BR,FS external
    class LOG,SC,ED,VL support
    
    %% Legend
    subgraph Legend
        L1[AI Models]:::aiModel
        L2[Core Services]:::core
        L3[External Systems]:::external
        L4[Support Services]:::support
    end
```
