# avinashb722/jarvis-ai-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/avinashb722/jarvis-ai-assistant
- Repository: https://github.com/avinashb722/jarvis-ai-assistant

## Overview

JARVIS is a desktop AI assistant with a web control panel, voice interaction, authentication, AI responses, and system/phone automation. The principal workflow runs from the web UI or voice input through the Python runtime and command handling, then to AI processing or an action, with responses presented in the UI or spoken aloud. The README documents the main capabilities; source excerpts and the SOURCE INDEX substantiate selected module relationships. Some subsystem links rely on README-level architecture because their implementations were not sampled.

Main entry points: [`engine/command.py`](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/command.py) (Command Handling), [`main.py`](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/main.py) (Desktop Runtime), [`engine/dual_ai.py`](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/dual_ai.py) (Dual AI), [`www/main.js`](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/www/main.js) (Web Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_runtime["Desktop Runtime<br/>[main.py]"]
  node_commands["Command Handling<br/>[command.py]"]
  node_auth["Face Authentication<br/>[recoganize.py]"]
  node_fingerprint["Fingerprint Authentication"]
  node_database[("Assistant Database<br/>[db.py]")]
end

subgraph group_interaction["User Interaction"]
  node_web["Web Interface<br/>[main.js]"]
  node_voicein["Speech Input<br/>[speech_to_text.py]"]
  node_speechout["Speech Output<br/>[text_to_speech.py]"]
end

subgraph group_intelligence["AI and Personalization"]
  node_ai["Dual AI<br/>[dual_ai.py]"]
  node_personality["Personality Manager"]
  node_multilingual["Language Support"]
  node_ai_dj["AI DJ<br/>[ai_dj_enhanced.py]"]
end

subgraph group_capabilities["Assistant Capabilities"]
  node_system["System Automation<br/>[dual_ai.py]"]
  node_features["Assistant Features<br/>[features.py]"]
  node_phone["Phone Integration<br/>[phone.py]"]
  node_notifications["Phone Notifications"]
  node_history["Command History<br/>[command_history.py]"]
  node_proactive["Proactive Suggestions"]
end

node_user(("User"))
node_groq["Groq AI"]
node_gemini["Google Gemini"]

node_user -->|"uses"| node_web
node_user -->|"speaks to"| node_voicein
node_web -->|"controls"| node_runtime
node_voicein -->|"provides input"| node_commands
node_runtime -->|"dispatches"| node_commands
node_runtime -->|"authenticates with"| node_auth
node_runtime -->|"configures"| node_fingerprint
node_commands -->|"invokes"| node_ai
node_commands -->|"uses"| node_personality
node_commands -->|"uses"| node_multilingual
node_ai -->|"transforms responses"| node_personality
node_ai -->|"queries"| node_groq
node_ai -->|"queries"| node_gemini
node_commands -->|"executes commands"| node_system
node_commands -->|"dispatches features"| node_features
node_commands -->|"dispatches phone tasks"| node_phone
node_runtime -->|"starts monitoring"| node_notifications
node_commands -->|"records commands"| node_history
node_runtime -.->|"offers suggestions"| node_proactive
node_commands -->|"speaks responses"| node_speechout
node_commands -->|"updates interface"| node_web
node_commands -.->|"reads and writes"| node_database
node_runtime -.->|"provides capability"| node_ai_dj

click node_web "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/www/main.js"
click node_voicein "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/src/speech_to_text.py"
click node_runtime "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/main.py"
click node_commands "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/command.py"
click node_speechout "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/src/text_to_speech.py"
click node_ai "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/dual_ai.py"
click node_personality "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/personality_manager.py"
click node_multilingual "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/multilingual_support.py"
click node_ai_dj "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/ai_dj_enhanced.py"
click node_auth "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/auth/recoganize.py"
click node_fingerprint "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/auth/fingerprint_auth.py"
click node_system "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/dual_ai.py"
click node_features "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/features.py"
click node_phone "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/phone.py"
click node_notifications "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/phone_notifications.py"
click node_history "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/command_history.py"
click node_proactive "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/proactive_jarvis.py"
click node_database "https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/db.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runtime,node_commands,node_auth,node_fingerprint,node_database,node_user toneBlue
class node_web,node_voicein,node_speechout toneAmber
class node_ai,node_personality,node_multilingual,node_ai_dj toneMint
class node_system,node_features,node_phone,node_notifications,node_history,node_proactive toneRose
class node_groq,node_gemini toneIndigo
```

## Components

### Application Runtime

- [Desktop Runtime](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/main.py): `main.py`
- [Command Handling](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/command.py): `engine/command.py`
- [Face Authentication](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/auth/recoganize.py): `engine/auth/recoganize.py`
- [Fingerprint Authentication](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/auth/fingerprint_auth.py): `engine/auth/fingerprint_auth.py`
- [Assistant Database](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/db.py): `engine/db.py`

### User Interaction

- [Web Interface](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/www/main.js): `www/main.js`
- [Speech Input](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/src/speech_to_text.py): `src/speech_to_text.py`
- [Speech Output](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/src/text_to_speech.py): `src/text_to_speech.py`

### AI and Personalization

- [Dual AI](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/dual_ai.py): `engine/dual_ai.py`
- [Personality Manager](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/personality_manager.py): `engine/personality_manager.py`
- [Language Support](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/multilingual_support.py): `engine/multilingual_support.py`
- [AI DJ](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/ai_dj_enhanced.py): `engine/ai_dj_enhanced.py`

### Assistant Capabilities

- [System Automation](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/dual_ai.py): `engine/dual_ai.py`
- [Assistant Features](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/features.py): `engine/features.py`
- [Phone Integration](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/phone.py): `engine/phone.py`
- [Phone Notifications](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/phone_notifications.py): `engine/phone_notifications.py`
- [Command History](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/engine/command_history.py): `engine/command_history.py`
- [Proactive Suggestions](https://github.com/avinashb722/jarvis-ai-assistant/blob/main/proactive_jarvis.py): `proactive_jarvis.py`

### Other components

- **User**
- **Groq AI**
- **Google Gemini**

## Connections

- User → Web Interface: uses (evidence: `README.md`)
- User → Speech Input: speaks to (evidence: `README.md`)
- Web Interface → Desktop Runtime: controls (evidence: `README.md`)
- Speech Input → Command Handling: provides input (evidence: `README.md`)
- Desktop Runtime → Command Handling: dispatches (evidence: `main.py`)
- Desktop Runtime → Face Authentication: authenticates with (evidence: `main.py`)
- Desktop Runtime → Fingerprint Authentication: configures (evidence: `main.py`)
- Command Handling → Dual AI: invokes (evidence: `engine/command.py`)
- Command Handling → Personality Manager: uses (evidence: `engine/command.py`)
- Command Handling → Language Support: uses (evidence: `engine/command.py`)
- Dual AI → Personality Manager: transforms responses (evidence: `engine/dual_ai.py`)
- Dual AI → Groq AI: queries (evidence: `README.md`)
- Dual AI → Google Gemini: queries (evidence: `README.md`)
- Command Handling → System Automation: executes commands (evidence: `README.md`)
- Command Handling → Assistant Features: dispatches features (evidence: `engine/command.py`)
- Command Handling → Phone Integration: dispatches phone tasks (evidence: `engine/command.py`)
- Desktop Runtime → Phone Notifications: starts monitoring (evidence: `main.py`)
- Command Handling → Command History: records commands (evidence: `engine/command.py`)
- Desktop Runtime → Proactive Suggestions: offers suggestions
- Command Handling → Speech Output: speaks responses (evidence: `README.md`)
- Command Handling → Web Interface: updates interface (evidence: `README.md`)
- Command Handling → Assistant Database: reads and writes
- Desktop Runtime → AI DJ: provides capability
