Just A Rather Very Intelligent System - Your personal AI assistant inspired by Tony Stark's JARVIS
JARVIS is a sophisticated AI-powered virtual assistant that combines voice recognition, natural language processing, and system automation to create an intelligent companion for your digital life. Built with modern web technologies and a futuristic UI inspired by Iron Man's JARVIS, this assistant provides seamless voice-controlled interactions and smart automation capabilities.
The system features a beautiful glassmorphism interface with animated backgrounds, arc reactor-style visualizations, and real-time status indicators. It processes voice commands through advanced speech recognition, executes system operations, manages productivity tasks, and provides intelligent responses through integration with the GROQ AI API.
Key Capabilities:
- Voice-First Interface - Natural speech recognition and text-to-speech
- AI-Powered Responses - Intelligent conversations using GROQ LLM
- System Control - Native OS automation and app management
- Productivity Suite - Notes, todos, reminders, and smart routines
- Context Awareness - Remembers commands and learns user patterns
- Modular Architecture - Easily extensible command system
- Voice recognition with real-time processing
- Text-to-speech with natural voice synthesis
- Conversational AI powered by GROQ API
- Context-aware command interpretation
- Smart suggestions and quick commands
- Application launcher (VS Code, Spotify, Brave, etc.)
- Brightness control with voice commands
- Volume control and audio management
- Screenshot capture with automatic saving
- System monitoring (CPU, memory, disk usage)
- File search and organization
- Smart Notes - Voice-to-text note taking and retrieval
- Todo Management - Task creation, completion tracking
- Multi-Timer System - Multiple named timers with audio alerts
- Stopwatch - Precision timing with voice control
- Advanced Calculator - Math operations and unit conversions
- Date & Time - Current time and date information
- Water reminders with customizable intervals
- Posture check reminders
- Eye rest with 20-20-20 rule timer
- Break reminders for productivity
- Wellness routine automation
- Morning Routine - Opens calendar, email, news, weather
- Work Mode - Launches dev tools, enables focus mode
- End Workday - Closes work apps, disables notifications
- Focus Sessions - Distraction-free work periods
- Latest news headlines with Google News integration
- File search across system directories
- System performance monitoring
- Quick web searches and navigation
Frontend:
- EJS Templates - Server-side rendering
- TailwindCSS - Modern utility-first styling
- Custom CSS Animations - Arc reactor, grid backgrounds, glassmorphism
- Web Speech API - Voice recognition and synthesis
Backend:
- Node.js & Express - High-performance server
- GROQ API - Advanced language model integration
- NewsAPI - Real-time news data
- File System APIs - Local data persistence
Architecture:
- Command Pattern - Modular, extensible command system
- Event-Driven - Real-time voice processing
- JSON Storage - Lightweight data persistence
- Error Handling - Robust error management and logging
AI_virtual_assistant/
├── 📁 commands/ # Modular command system
│ ├── BaseCommand.js # Abstract command class
│ ├── VoiceCommands.js # Voice-specific commands
│ ├── SystemCommands.js # OS integration commands
│ ├── ProductivityCommands.js # Notes, todos, timers
│ └── CommandRegistry.js # Command management
├── 📁 controllers/ # Request handlers
│ └── assistantController.js
├── 📁 services/ # External integrations
│ └── llmService.js # GROQ API integration
├── 📁 routes/ # API endpoints
│ └── virtualRoute.js
├── 📁 views/ # Frontend templates
│ └── main.ejs # Main UI interface
├── 📁 utils/ # Helper functions
│ ├── platform.js # OS detection utilities
│ └── logger.js # Logging system
├── 📁 data/ # Local storage
│ ├── notes.json # User notes
│ └── todos.json # Task management
└── 📄 index.js # Application entry point
- Node.js (v16 or higher)
- npm or yarn
- GROQ API Key (free at console.groq.com)
- NewsAPI Key (free at newsapi.org)
- Modern web browser with Web Speech API support
- macOS 10.14 (Mojave) or later
- Terminal with Accessibility permissions (for advanced features)
- Windows 10 version 1903 or later
- Windows 11 (recommended for best experience)
- PowerShell 5.1+ (usually pre-installed)
- Ubuntu 18.04+, Debian 10+, or equivalent
- Audio system (ALSA/PulseAudio)
- X11 or Wayland display server
- Optional:
espeakfor enhanced TTS
- Clone the repository
git clone https://github.com/Harsh9934-debug/AI_virtual_assistant.git
cd jarvis-ai-assistant/AI_virtual_assistant- Install dependencies
npm install- Environment Configuration
# Copy environment template
cp .env.example .env
# Edit .env file with your API keys
GROQ_API_KEY=your_groq_api_key_here
NEWS_API_KEY=your_news_api_key_here
PORT=3000- Start the application
npm start
# or
node index.js- Open in browser
http://localhost:3000
- "What time is it?" - Get current time and date
- "Take note: Buy groceries" - Save a quick note
- "Add task: Call dentist" - Create a todo item
- "Set timer for 5 minutes" - Start a countdown timer
- "Increase brightness by 20%" - Adjust screen brightness
- "Open Spotify" - Launch applications
- "Today's news" - Get latest headlines
- "Start morning routine" - Execute smart automation
- "Water reminder every hour" - Set health reminders
- What time is it? - Instant time check
- Take note: Meeting at 3 - Quick note creation
- Add task: Call John - Rapid task addition
- Morning routine - One-click automation
- Water reminder every hour - Health tracking
| Command | Description | Example |
|---|---|---|
open [app] |
Launch applications | "Open VS Code" |
set brightness to [%] |
Control screen brightness | "Set brightness to 75%" |
set volume to [%] |
Adjust system volume | "Set volume to 50%" |
take screenshot |
Capture screen | "Take a screenshot" |
system status |
Check performance | "Show system status" |
| Command | Description | Example |
|---|---|---|
take note: [text] |
Save notes | "Take note: Important meeting" |
read notes |
Retrieve saved notes | "Show my notes" |
add task: [text] |
Create todo items | "Add task: Buy milk" |
todo list |
View pending tasks | "Show my tasks" |
complete task: [text] |
Mark tasks done | "Complete task: groceries" |
| Command | Description | Example |
|---|---|---|
set timer for [time] |
Start countdown | "Set timer for 10 minutes" |
start stopwatch |
Begin timing | "Start stopwatch" |
stop stopwatch |
End timing | "Stop stopwatch" |
what time is it |
Current time | "What time is it?" |
| Command | Description | Example |
|---|---|---|
water reminder every [time] |
Hydration alerts | "Water reminder every hour" |
break reminder every [time] |
Work break alerts | "Break reminder every 25 minutes" |
posture check |
Posture reminder | "Check my posture" |
eye rest |
20-20-20 rule timer | "Start eye rest" |
- Endpoint:
https://api.groq.com/openai/v1/chat/completions - Model:
llama3-8b-8192 - Features: Natural language processing, context awareness
- Endpoint:
https://newsapi.org/v2/top-headlines - Features: Real-time news, country-specific headlines
- Animated Grid Background - Dynamic moving grid pattern
- Glassmorphism Effects - Modern frosted glass containers
- Arc Reactor Animation - Rotating circles with pulsing core
- Voice Wave Visualization - Real-time audio feedback
- Status Indicators - Visual system status with animations
- Voice Activation Button - Large, prominent activation
- Stop Control - Emergency stop functionality
- Command History - Scrollable interaction log
- Quick Commands - One-click common actions
- System Information - Version and status display
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
To add new commands:
- Create a new command class extending
BaseCommand - Implement
matches()andexecute()methods - Register in
CommandRegistry.js - Update this README with usage examples
- Location:
./data/notes.json - Format: JSON with timestamp and content
- Commands: "take note", "read notes"
- Location:
./data/todos.json - Format: JSON with completion status
- Commands: "add task", "todo list", "complete task"
Voice Recognition Not Working
- Check browser permissions for microphone access
- Ensure you're using HTTPS or localhost
- Try Chrome/Edge (better Web Speech API support)
API Errors
- Verify your GROQ API key in
.envfile - Check NewsAPI key validity
- Ensure internet connectivity
Timer Not Speaking
- Check system volume settings
- Verify TTS permissions on macOS
- Test with:
say "hello"in terminal (Mac)
File Operations Failing
- Check file system permissions
- Verify paths exist for note/todo storage
- Ensure write permissions in project directory
JARVIS is designed to work seamlessly across multiple operating systems with platform-specific optimizations:
- Voice Commands: Native
saycommand integration - System Control: AppleScript automation
- App Launching: Native
open -acommands - Brightness Control: System Events integration
- Volume Control: AppleScript audio management
- Screenshots: Native
screencaptureutility - File Operations: Spotlight search (
mdfind) - Special Features:
- Focus mode (Do Not Disturb)
- System shortcuts integration
- Native notification sounds
- Voice Commands: PowerShell speech synthesis
- System Control: WMI (Windows Management Instrumentation)
- App Launching: Native
startcommand - Brightness Control: WMI monitor methods
- Volume Control: NirCmd or PowerShell audio
- Screenshots: PowerShell screen capture
- File Operations:
wherecommand and PowerShell - Special Features:
- Windows Store app integration
- Task Manager automation
- Registry operations (advanced)
- Voice Commands:
espeakorfestivalTTS - System Control: SystemD and native Linux commands
- App Launching: Desktop file execution
- Brightness Control:
xrandror/sys/class/backlight - Volume Control: ALSA/PulseAudio integration
- Screenshots:
scrotorgnome-screenshot - File Operations:
findandlocatecommands - Special Features:
- Desktop environment integration (GNOME, KDE, XFCE)
- Package manager integration
# Enable accessibility permissions for terminal
# System Preferences > Security & Privacy > Accessibility > Add Terminal
# Install optional dependencies
brew install node npm
# For enhanced voice synthesis (optional)
# System Preferences > Accessibility > Spoken Content# Install Node.js from nodejs.org
# No additional permissions required for basic features
# For enhanced system control (optional)
# Install NirCmd: https://www.nirsoft.net/utils/nircmd.html
# Add to PATH for advanced volume control# Install dependencies
sudo apt update
sudo apt install nodejs npm espeak alsa-utils
# For screenshot functionality
sudo apt install scrot
# For brightness control (laptop users)
# May require adding user to video group
sudo usermod -a -G video $USER| Feature | macOS | Windows | Linux | Notes |
|---|---|---|---|---|
| Voice Recognition | ✅ | ✅ | ✅ | Browser-based, universal |
| Text-to-Speech | ✅ | ✅ | ✅ | Native TTS on all platforms |
| App Launching | ✅ | ✅ | ✅ | Platform-specific commands |
| Brightness Control | ✅ | ✅ | Linux: Laptop only | |
| Volume Control | ✅ | ✅ | Windows: May need NirCmd | |
| Screenshots | ✅ | ✅ | ✅ | All platforms supported |
| File Search | ✅ | ✅ | ✅ | Optimized per platform |
| System Monitoring | ✅ | ✅ | ✅ | Cross-platform Node.js |
| Notes & Todos | ✅ | ✅ | ✅ | File-based, universal |
| Timers & Alerts | ✅ | ✅ | ✅ | All platforms supported |
Legend: ✅ Full Support |
JARVIS automatically detects your operating system and uses appropriate commands:
// Automatic platform detection
const platform = process.platform;
// 'darwin' = macOS
// 'win32' = Windows
// 'linux' = Linux
// Commands adapt automatically
const volumeCommand = {
darwin: 'osascript -e "set volume 5"',
win32: 'nircmd.exe setsysvolume 50',
linux: 'amixer set Master 50%'
};- ✅ Chrome/Chromium (Recommended) - Full support
- ✅ Microsoft Edge - Full support
- ✅ Safari (macOS) - Full support
⚠️ Firefox - Limited speech recognition- ❌ Internet Explorer - Not supported
- macOS: Chrome, Safari, Edge
- Windows: Chrome, Edge
- Linux: Chrome, Chromium
- macOS: Best native integration, fastest voice processing
- Windows 11: Excellent performance, modern TTS
- Windows 10: Good performance, may need additional setup
- Linux: Solid performance, highly customizable
- RAM: ~50-100MB (lightweight)
- CPU: Minimal when idle, moderate during voice processing
- Disk: ~20MB base installation + data files
- Network: Only for AI API calls and news updates
"Operation not permitted" errors
- Grant Terminal accessibility permissions
- System Preferences > Security & Privacy > Accessibility
Voice commands not working
- Check microphone permissions in browser
- System Preferences > Security & Privacy > Microphone
Volume control not working
- Install NirCmd utility for advanced audio control
- Some features may require administrator privileges
PowerShell execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserAudio/TTS not working
# Install audio dependencies
sudo apt install espeak espeak-data
sudo apt install alsa-utils pulseaudio
# Test audio
espeak "Hello World"Brightness control not working
# Add user to video group
sudo usermod -a -G video $USER
# Logout and login againPermission denied for file operations
# Ensure proper permissions
chmod 755 ./data
mkdir -p ./data