https://github.com/pkparthk/buddy-ai
Buddy AI is a full-stack, AI-powered personal assistant that combines voice recognition, natural language processing, and advanced command interpretation. Built with Python (Flask) and React (TypeScript), it features smart web navigation, real-time system monitoring, weather/news APIs, and context-aware responses.
https://github.com/pkparthk/buddy-ai
api artificial-intelligence flask gtts machine-learning python react reactjs rest-api speechrecognition tailwindcss typescript
Last synced: 6 months ago
JSON representation
Buddy AI is a full-stack, AI-powered personal assistant that combines voice recognition, natural language processing, and advanced command interpretation. Built with Python (Flask) and React (TypeScript), it features smart web navigation, real-time system monitoring, weather/news APIs, and context-aware responses.
- Host: GitHub
- URL: https://github.com/pkparthk/buddy-ai
- Owner: pkparthk
- License: mit
- Created: 2025-01-08T15:00:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-31T16:10:07.000Z (8 months ago)
- Last Synced: 2025-10-08T23:35:25.319Z (6 months ago)
- Topics: api, artificial-intelligence, flask, gtts, machine-learning, python, react, reactjs, rest-api, speechrecognition, tailwindcss, typescript
- Language: Python
- Homepage: https://buddy-ai-puce.vercel.app
- Size: 279 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🤖 Buddy AI - Your Intelligent Personal Assistant
**Buddy AI** is an advanced full-stack AI-powered personal assistant that combines natural language processing and intelligent command interpretation. Built with Flask backend and React TypeScript frontend, it offers seamless voice interactions and smart automation capabilities.
## 🌟 Features
### 🎯 Core Capabilities
- **Voice Recognition & Speech Synthesis**: Natural voice interactions with gTTS (development mode)
- **Intelligent Command Processing**: Advanced pattern matching and AI-driven command interpretation
- **Dynamic Web Navigation**: Smart website opening with context-aware platform selection
- **Real-time System Monitoring**: CPU, memory, battery, and disk space monitoring using Psutil
- **AI-Powered Conversations**: Powered by Google Gemini AI for natural conversations
- **Production-Ready API**: Flask backend with CORS support and serverless deployment
### 🔧 Smart Command Categories
#### 🌐 Web & Search Intelligence
- **Smart Search**: Automatically chooses optimal platforms (YouTube, Google, Stack Overflow, GitHub)
- **Direct Website Access**: 30+ popular websites with intelligent URL resolution
- **Context-Aware Searches**: "Python tutorials" → YouTube, "JavaScript error" → Stack Overflow
#### 💻 System Control & Monitoring
- **Real-time System Information**: Battery, memory, CPU, and disk monitoring
- **Application Management**: Launch applications with smart detection
- **Cross-platform Support**: Windows, macOS, and Linux compatibility
#### 📊 External API Integration
- **Weather Services**: Real-time weather via OpenWeatherMap API (optional)
- **News Updates**: Latest news via News API integration (optional)
- **Mathematical Calculations**: Complex calculations and unit conversions
## 🏗️ Technical Architecture
### Backend (Flask API)
- **REST API**: Flask with CORS support and health monitoring endpoints
- **AI Integration**: Google Gemini AI for conversational capabilities
- **External APIs**: Weather, News, and location services (optional)
- **System Monitoring**: Real-time metrics using Psutil
- **Audio Processing**: gTTS for development environments (disabled in production)
- **Environment Management**: Production and development configurations
### Frontend (React TypeScript)
- **Modern UI**: React 18 with TypeScript and Tailwind CSS
- **Voice Interface**: Web Speech API integration for voice commands
- **Real-time Chat**: Interactive conversation interface with typing indicators
- **Responsive Design**: Mobile-first design with adaptive layouts
- **Quick Commands**: Pre-built shortcuts for common tasks
### Deployment
- **Backend**: Production-ready Flask app with serverless compatibility
- **Frontend**: Static build optimized for CDN deployment
- **Environment Configuration**: Separate dev/production settings
## 🛠️ Technology Stack
### Backend
- **Python 3.11+** with Flask 3.1.0
- **Google Generative AI** for Gemini integration
- **gTTS** for text-to-speech (development only)
- **Psutil** for system monitoring
- **Requests & BeautifulSoup** for web scraping
- **Flask-CORS** for cross-origin support
### Frontend
- **React 18** with TypeScript
- **Tailwind CSS** for styling
- **Vite** for build tooling and development server
- **Web Speech API** for voice recognition
### External Services
- **Google Gemini AI** (required)
- **OpenWeatherMap API** (optional)
- **News API** (optional)
## 🚀 Quick Start
### Prerequisites
- Python 3.8+
- Node.js 16+
- Google Gemini AI API Key
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/pkparthk/Buddy-AI.git
cd Buddy-AI
```
2. **Set up the backend**
```bash
# Install Python dependencies
pip install -r requirements.txt
# Create environment file
cp .env.example .env
```
3. **Configure API Keys**
Copy the example environment file and add your API keys:
```bash
# Copy the template
cp .env.example .env
```
Edit `.env` file and add your API keys:
```env
GEMINI_API_KEY=your_gemini_api_key_here
OPENWEATHER_API_KEY=your_openweather_api_key_here # Optional
NEWS_API_KEY=your_news_api_key_here # Optional
FLASK_ENV=development
```
4. **Set up the frontend**
```bash
cd my-app
npm install
```
### Running the Application
1. **Start the backend server**
```bash
python api.py
```
2. **Start the frontend (in a new terminal)**
```bash
cd my-app
npm run dev
```
3. **Access the application**
Open your browser and go to `http://localhost:5173`
## 🎯 Usage Examples
### Voice Commands
```
"Hey Buddy, open YouTube"
"Search for machine learning tutorials"
"What's the weather in Mumbai?"
"Open Visual Studio Code"
"What's my battery level?"
"Calculate 25 * 67"
"Search Python error on Stack Overflow"
"Open GitHub and search React"
```
### System Monitoring
```
"Check CPU usage"
"What's my memory status?"
"Show disk space"
"Battery information"
```
### Web Navigation
```
"Open Gmail"
"Go to Facebook"
"Visit Instagram"
"Launch Netflix"
"Open Google Drive"
```
## 🛠️ API Configuration
### Required APIs
- **Google Gemini AI**: For natural language processing
- Get your key at: https://makersuite.google.com/app/apikey
### Optional APIs
- **OpenWeatherMap**: For weather information
- Get your key at: https://openweathermap.org/api
- **News API**: For news updates
- Get your key at: https://newsapi.org/
## 📁 Project Structure
```
Buddy-AI/
├── api.py # Flask REST API server with CORS
├── main.py # Core voice processing and TTS logic
├── model.py # Enhanced Gemini AI integration
├── enhanced_commands.py # Advanced command processing engine
├── external_apis.py # Weather, news, and location APIs
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── render.yaml # Render deployment configuration
├── COMPLETE_DEPLOYMENT_GUIDE.md # Comprehensive deployment guide
├── DEPLOYMENT_CHECKLIST.md # Deployment checklist
└── my-app/ # React TypeScript frontend
├── src/
│ ├── components/
│ │ ├── BuddyAI.tsx # Main AI interface component
│ │ └── ui/ # Reusable UI components
│ └── App.tsx # Root React component
├── package.json # Frontend dependencies
├── tailwind.config.js # Tailwind CSS configuration
├── vite.config.ts # Vite build configuration
└── vercel.json # Vercel deployment settings
```
## 🚀 Deployment
### Local Development
1. **Backend**: `python api.py` (runs on http://localhost:5000)
2. **Frontend**: `npm run dev` (runs on http://localhost:5173)
### Production Deployment
- **Backend**: Deploy to serverless platforms (Render, Railway, etc.)
- **Frontend**: Deploy to CDN platforms (Vercel, Netlify, etc.)
## 🤝 Contributing
We welcome contributions! Please:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## 🎥 Demo
🎥 [Demo Video](https://vimeo.com/1078472414?share=copy) - See the complete voice interaction experience!
## 📝 License & Usage
This project is open source and available under the [MIT License](LICENSE). As a student project, feel free to use, modify, and learn from this code. If you use this project or parts of it, please provide attribution by linking back to this repository.
**Note**: This project uses external APIs (Google Gemini AI, OpenWeatherMap, News API) that may have their own terms of service and usage limits.
## 📞 Contact
- **Email**: [0xparthk@gmail.com](mailto:0xparthk@gmail.com)
- **GitHub**: [pkparthk](https://github.com/pkparthk)
---
**🚀 Transform your computer interaction with Buddy AI - Your intelligent personal assistant powered by cutting-edge AI technology!**
_Built with ❤️ by [Parth Kothari](https://github.com/pkparthk)_