# garvit-821/jarvis architecture

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

- Interactive diagram: https://gitdiagram.com/garvit-821/jarvis
- Repository: https://github.com/garvit-821/jarvis

## Overview

##### Project Type and Purpose
- This is an open-source AI assistant designed for desktop use. It combines an interactive GUI, voice recognition, natural language processing, and task automation.
- The project draws inspiration from “JARVIS” in Iron Man, offering capabilities like executing commands, opening applications, fetching data (for example, from NASA datasets), and handling user interactions via voice or text.

##### Breaking Down the File Structure
- At the root level, you find several Python scripts (e.g., main.py, Jarvis.py, Automations.py, notepad_automation.py) that hint at the core logic and application start-up.
- The GUI directory contains files like JarvisUI.ui along with additional conversion hints (“to convert it to python code.txt”), clearly earmarking the user interface component.
- The “Functions_” directory holds modules such as “site_opener”. Inside it, a subdirectory relates to a personal website built with Streamlit (evidenced by “personal-website-streamlit-master” with its own app.py, pyproject.toml, requirements.txt, etc.), which implies a modular approach for extending capabilities.
- There’s a “NasaDataBase” directory with subfolders such as “Solar Bodies” and image resources, as well as a standalone Nasa.py, suggesting that part of the assistant’s functionality may be dedicated to interfacing with NASA-related data.
- The presence of a “Files” directory and additional assets like Images further reinforces usage of multimedia elements.
- The “_exe” folder indicates a build/distribution phase where the program is bundled, probably with dependencies (such as numpy and pywin32), for deployment.

a. GUI Component:
- Graphical User Interface, clearly including the JarvisUI.ui file and associated Python files (e.g., Jarvis_UI.py, Jarvis.py).
- That the GUI acts as the entry point for user interaction (text/voice commands).

b. Command Processing & Core Logic:
- Scripts like main.py, Automations.py, Features.py, and notepad_automation.py.
- This layer processes user commands, invokes appropriate functions (such as launching specific applications or handling automation tasks), and integrates natural language processing and voice recognition modules.

c. Modular/Plugin Components:
- That additional modules can be integrated into the assistant through this modular architecture.

d. Data and External Integrations:
- NASA-related components (Nasa.py and NasaDataBase) as a specialized module. This module might handle data retrieval, processing, or display tasks pertaining to solar bodies and related imagery.
- If there is any external API communication (for voice recognition or weather updates, as the README suggests), represent these external services as separate components that feed data into your system.

e. Build and Deployment Infrastructure:

##### Architectural Patterns and Design Principles
- A modular design allows for extensibility and scalability – system components are decoupled and can be updated or replaced independently.
- There is a clear separation of concerns: the UI (GUI) is independent from core logic, which is further separated from auxiliary functions (plugins, automation, data integrations).
- The system follows a plug-and-play model where new functionalities (like additional automation or data modules) can be added with minimal interference in other parts of the system.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interface Layer
    subgraph "User Interface Layer"
        GUI1["JarvisUI.ui"]:::gui
        GUI2["Jarvis_UI.py"]:::gui
        GUI3["Jarvis.py"]:::gui
    end

    %% Core Command Processing
    subgraph "Core Command Processing"
        CP1["main.py"]:::core
        CP2["Automations.py"]:::core
        CP3["Features.py"]:::core
        CP4["notepad_automation.py"]:::core
    end

    %% Modular/Plugin Components
    subgraph "Modular/Plugin Components"
        MP1["Functions_/site_opener"]:::module
        MP2["personal-website-streamlit-master"]:::module
        MP3["app.py"]:::module
    end

    %% Data & External Integrations
    subgraph "Data & External Integrations"
        DS1["Nasa.py"]:::data
        DS2["NasaDataBase"]:::data
    end

    %% Deployment/Bundling
    subgraph "Deployment/Bundling"
        DEP1["_exe"]:::deploy
    end

    %% Connections between layers
    GUI1 -->|"sendsCommands"| CP1
    CP1 -->|"coordinates"| CP2
    CP1 -->|"coordinates"| CP3
    CP1 -->|"coordinates"| CP4
    CP1 -->|"usesPlugin"| MP1
    MP1 -->|"contains"| MP2
    MP2 -->|"includes"| MP3
    CP1 -->|"getsData"| DS1
    CP1 -->|"triggersDeploy"| DEP1

    %% Click Events for GUI Component
    click GUI1 "https://github.com/garvit-821/jarvis/blob/main/GUI/JarvisUI.ui"
    click GUI2 "https://github.com/garvit-821/jarvis/blob/main/GUI/Jarvis_UI.py"
    click GUI3 "https://github.com/garvit-821/jarvis/blob/main/GUI/Jarvis.py"

    %% Click Events for Core Command Processing
    click CP1 "https://github.com/garvit-821/jarvis/blob/main/main.py"
    click CP2 "https://github.com/garvit-821/jarvis/blob/main/Automations.py"
    click CP3 "https://github.com/garvit-821/jarvis/blob/main/Features.py"
    click CP4 "https://github.com/garvit-821/jarvis/blob/main/notepad_automation.py"

    %% Click Events for Modular/Plugin Components
    click MP1 "https://github.com/garvit-821/jarvis/tree/main/Functions_/site_opener"
    click MP2 "https://github.com/garvit-821/jarvis/tree/main/Functions_/site_opener/personal-website-streamlit-master"
    click MP3 "https://github.com/garvit-821/jarvis/blob/main/Functions_/site_opener/personal-website-streamlit-master/app.py"

    %% Click Events for Data & External Integrations
    click DS1 "https://github.com/garvit-821/jarvis/blob/main/Nasa.py"
    click DS2 "https://github.com/garvit-821/jarvis/tree/main/NasaDataBase"

    %% Click Event for Deployment/Bundling
    click DEP1 "https://github.com/garvit-821/jarvis/tree/main/_exe"

    %% Styles
    classDef gui fill:#BBE1FA,stroke:#1B4965,stroke-width:2px;
    classDef core fill:#CDEAC0,stroke:#3D550C,stroke-width:2px;
    classDef module fill:#F6C6EA,stroke:#9D4EDD,stroke-width:2px;
    classDef data fill:#FDE4B7,stroke:#AD8B00,stroke-width:2px;
    classDef deploy fill:#FFC9DE,stroke:#FF3399,stroke-width:2px;
```
