# sharuuuuuhh/jarvis architecture

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

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

## Overview

JARVIS is a Java desktop voice assistant. The main workflow is microphone capture, WhisperFlow transcription, intent parsing and command construction, polymorphic execution, then GUI and spoken feedback. Commands also cover application launching, reminders, telemetry, web search, media control, shortcuts, general queries and help. SQLite DAOs persist reminders, settings, shortcuts and interaction logs, while a scheduler raises due reminders. The map follows the README and source-index references; unsampled implementation details and their links are kept conservative.

Main entry points: [`src/com/jarvis/core/JarvisEngine.java`](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/JarvisEngine.java) (Jarvis Engine), [`src/com/jarvis/speech/WhisperFlowService.java`](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WhisperFlowService.java) (WhisperFlow), [`src/com/jarvis/commands`](https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/commands) (Command Actions), [`src/com/jarvis/scheduler/ReminderScheduler.java`](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/scheduler/ReminderScheduler.java) (Reminder Scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interaction"]
  node_gui["Swing Assistant UI"]
  node_gui_parts["UI Components"]
end

subgraph group_speech["Speech I/O"]
  node_recorder["Audio Capture"]
  node_audio_format["Audio Formatting"]
  node_whisper_flow["WhisperFlow"]
  node_recognizer["Speech Recognition"]
  node_mock_recognizer["Mock Recognizer"]
  node_tts["Windows Speech"]
  node_audio_player["Audio Effects"]
end

subgraph group_orchestration["Command Orchestration"]
  node_engine["Jarvis Engine<br/>[JarvisEngine.java]"]
  node_parser["Intent Parser<br/>[CommandParser.java]"]
  node_factory["Command Factory"]
  node_registry["Command Registry"]
  node_context["Command Context"]
  node_command_lifecycle["Command Lifecycle"]
  node_command_result["Command Result<br/>[CommandResult.java]"]
  node_config["Configuration<br/>[ConfigManager.java]"]
end

subgraph group_actions["Assistant Actions"]
  node_commands["Command Actions"]
  node_reminder_scheduler["Reminder Scheduler"]
end

subgraph group_persistence["Persistence"]
  node_database[("SQLite Database")]
  node_reminder_dao["Reminder DAO<br/>[ReminderDAO.java]"]
  node_interaction_dao["Interaction Log DAO"]
  node_other_daos["Settings &amp; Shortcuts DAOs"]
end

node_user(("User"))
node_cloud{{"Whisper API"}}
node_os{{"Desktop OS"}}
node_browser{{"Web Browser"}}
node_speakers{{"Speakers"}}

node_user -->|"uses"| node_gui
node_gui -->|"renders"| node_gui_parts
node_gui -->|"submits input"| node_engine
node_engine -->|"controls transcription"| node_whisper_flow
node_whisper_flow -->|"captures audio"| node_recorder
node_recorder -->|"formats audio"| node_audio_format
node_whisper_flow -->|"dispatches audio"| node_recognizer
node_recognizer -.->|"sends audio"| node_cloud
node_whisper_flow -->|"falls back"| node_mock_recognizer
node_whisper_flow -.->|"returns transcript"| node_engine
node_engine -->|"parses text"| node_parser
node_engine -->|"builds context"| node_context
node_engine -->|"requests command"| node_factory
node_factory -->|"resolves command"| node_registry
node_engine -->|"executes command"| node_commands
node_command_lifecycle -->|"logs interaction"| node_interaction_dao
node_command_lifecycle -->|"returns result"| node_command_result
node_engine -->|"receives result"| node_command_result
node_engine -.->|"updates display"| node_gui
node_engine -.->|"speaks response"| node_tts
node_tts -.->|"outputs speech"| node_speakers
node_engine -->|"plays feedback"| node_audio_player
node_audio_player -.->|"plays tones"| node_speakers
node_commands -.->|"launches apps"| node_os
node_commands -.->|"opens searches"| node_browser
node_commands -->|"manages reminders"| node_reminder_dao
node_engine -->|"coordinates alarms"| node_reminder_scheduler
node_reminder_scheduler -->|"checks reminders"| node_reminder_dao
node_reminder_scheduler -->|"announces alarms"| node_tts
node_reminder_scheduler -->|"plays alarm"| node_audio_player
node_reminder_dao -->|"reads and writes"| node_database
node_interaction_dao -->|"writes logs"| node_database
node_other_daos -->|"persists settings"| node_database
node_config -.->|"configures speech"| node_tts

click node_gui "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/gui/JarvisMainFrame.java"
click node_gui_parts "https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/gui"
click node_engine "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/JarvisEngine.java"
click node_recorder "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioRecorderService.java"
click node_audio_format "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioFormatHelper.java"
click node_whisper_flow "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WhisperFlowService.java"
click node_recognizer "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WhisperApiClient.java"
click node_mock_recognizer "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/MockSpeechRecognizer.java"
click node_parser "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandParser.java"
click node_factory "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandFactory.java"
click node_registry "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandRegistry.java"
click node_context "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/CommandContext.java"
click node_command_lifecycle "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/AbstractCommand.java"
click node_command_result "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/CommandResult.java"
click node_commands "https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/commands"
click node_tts "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WindowsTTSService.java"
click node_audio_player "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioPlayerService.java"
click node_reminder_scheduler "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/scheduler/ReminderScheduler.java"
click node_database "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/DatabaseManager.java"
click node_reminder_dao "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/ReminderDAO.java"
click node_interaction_dao "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/InteractionLogDAO.java"
click node_other_daos "https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/database"
click node_config "https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/ConfigManager.java"

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_gui,node_gui_parts,node_user,node_browser toneBlue
class node_recorder,node_audio_format,node_whisper_flow,node_recognizer,node_mock_recognizer,node_tts,node_audio_player toneAmber
class node_engine,node_parser,node_factory,node_registry,node_context,node_command_lifecycle,node_command_result,node_config,node_cloud toneMint
class node_commands,node_reminder_scheduler toneRose
class node_database,node_reminder_dao,node_interaction_dao,node_other_daos,node_os,node_speakers toneIndigo
```

## Components

### User Interaction

- [Swing Assistant UI](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/gui/JarvisMainFrame.java): `src/com/jarvis/gui/JarvisMainFrame.java`
- [UI Components](https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/gui): `src/com/jarvis/gui`

### Speech I/O

- [Audio Capture](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioRecorderService.java): `src/com/jarvis/audio/AudioRecorderService.java`
- [Audio Formatting](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioFormatHelper.java): `src/com/jarvis/audio/AudioFormatHelper.java`
- [WhisperFlow](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WhisperFlowService.java): `src/com/jarvis/speech/WhisperFlowService.java`
- [Speech Recognition](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WhisperApiClient.java): `src/com/jarvis/speech/WhisperApiClient.java`
- [Mock Recognizer](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/MockSpeechRecognizer.java): `src/com/jarvis/speech/MockSpeechRecognizer.java`
- [Windows Speech](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/speech/WindowsTTSService.java): `src/com/jarvis/speech/WindowsTTSService.java`
- [Audio Effects](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/audio/AudioPlayerService.java): `src/com/jarvis/audio/AudioPlayerService.java`

### Command Orchestration

- [Jarvis Engine](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/JarvisEngine.java): `src/com/jarvis/core/JarvisEngine.java`
- [Intent Parser](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandParser.java): `src/com/jarvis/commands/CommandParser.java`
- [Command Factory](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandFactory.java): `src/com/jarvis/commands/CommandFactory.java`
- [Command Registry](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/CommandRegistry.java): `src/com/jarvis/commands/CommandRegistry.java`
- [Command Context](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/CommandContext.java): `src/com/jarvis/core/CommandContext.java`
- [Command Lifecycle](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/commands/AbstractCommand.java): `src/com/jarvis/commands/AbstractCommand.java`
- [Command Result](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/CommandResult.java): `src/com/jarvis/core/CommandResult.java`
- [Configuration](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/core/ConfigManager.java): `src/com/jarvis/core/ConfigManager.java`

### Assistant Actions

- [Command Actions](https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/commands): `src/com/jarvis/commands`
- [Reminder Scheduler](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/scheduler/ReminderScheduler.java): `src/com/jarvis/scheduler/ReminderScheduler.java`

### Persistence

- [SQLite Database](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/DatabaseManager.java): `src/com/jarvis/database/DatabaseManager.java`
- [Reminder DAO](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/ReminderDAO.java): `src/com/jarvis/database/ReminderDAO.java`
- [Interaction Log DAO](https://github.com/sharuuuuuhh/jarvis/blob/main/src/com/jarvis/database/InteractionLogDAO.java): `src/com/jarvis/database/InteractionLogDAO.java`
- [Settings & Shortcuts DAOs](https://github.com/sharuuuuuhh/jarvis/tree/main/src/com/jarvis/database): `src/com/jarvis/database`

### Other components

- **User**
- **Whisper API**
- **Desktop OS**
- **Web Browser**
- **Speakers**

## Connections

- User → Swing Assistant UI: uses (evidence: `README.md`)
- Swing Assistant UI → UI Components: renders (evidence: `src/com/jarvis/gui/JarvisMainFrame.java`)
- Swing Assistant UI → Jarvis Engine: submits input (evidence: `src/com/jarvis/gui/JarvisMainFrame.java`)
- Jarvis Engine → WhisperFlow: controls transcription (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- WhisperFlow → Audio Capture: captures audio (evidence: `src/com/jarvis/speech/WhisperFlowService.java`)
- Audio Capture → Audio Formatting: formats audio (evidence: `src/com/jarvis/audio/AudioRecorderService.java`)
- WhisperFlow → Speech Recognition: dispatches audio (evidence: `src/com/jarvis/speech/WhisperFlowService.java`)
- Speech Recognition → Whisper API: sends audio (evidence: `README.md`)
- WhisperFlow → Mock Recognizer: falls back (evidence: `src/com/jarvis/speech/WhisperFlowService.java`)
- WhisperFlow → Jarvis Engine: returns transcript (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Jarvis Engine → Intent Parser: parses text (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Jarvis Engine → Command Context: builds context (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Jarvis Engine → Command Factory: requests command (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Command Factory → Command Registry: resolves command (evidence: `src/com/jarvis/commands/CommandFactory.java`)
- Jarvis Engine → Command Actions: executes command (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Command Lifecycle → Interaction Log DAO: logs interaction (evidence: `src/com/jarvis/commands/AbstractCommand.java`)
- Command Lifecycle → Command Result: returns result (evidence: `src/com/jarvis/commands/AbstractCommand.java`)
- Jarvis Engine → Command Result: receives result (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Jarvis Engine → Swing Assistant UI: updates display (evidence: `README.md`)
- Jarvis Engine → Windows Speech: speaks response (evidence: `README.md`)
- Windows Speech → Speakers: outputs speech (evidence: `README.md`)
- Jarvis Engine → Audio Effects: plays feedback (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Audio Effects → Speakers: plays tones (evidence: `README.md`)
- Command Actions → Desktop OS: launches apps (evidence: `README.md`)
- Command Actions → Web Browser: opens searches (evidence: `README.md`)
- Command Actions → Reminder DAO: manages reminders (evidence: `src/com/jarvis/commands/ReminderCommand.java`)
- Jarvis Engine → Reminder Scheduler: coordinates alarms (evidence: `src/com/jarvis/core/JarvisEngine.java`)
- Reminder Scheduler → Reminder DAO: checks reminders (evidence: `src/com/jarvis/scheduler/ReminderScheduler.java`)
- Reminder Scheduler → Windows Speech: announces alarms (evidence: `src/com/jarvis/scheduler/ReminderScheduler.java`)
- Reminder Scheduler → Audio Effects: plays alarm (evidence: `src/com/jarvis/scheduler/ReminderScheduler.java`)
- Reminder DAO → SQLite Database: reads and writes (evidence: `src/com/jarvis/database/ReminderDAO.java`)
- Interaction Log DAO → SQLite Database: writes logs (evidence: `src/com/jarvis/database/InteractionLogDAO.java`)
- Settings & Shortcuts DAOs → SQLite Database: persists settings (evidence: `src/com/jarvis/database/SettingsDAO.java`)
- Configuration → Windows Speech: configures speech (evidence: `src/com/jarvis/speech/WindowsTTSService.java`)
