Skip to content

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.

License

Notifications You must be signed in to change notification settings

pkparthk/Buddy-AI

Repository files navigation

πŸ€– 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

    git clone https://github.com/pkparthk/Buddy-AI.git
    cd Buddy-AI
  2. Set up the backend

    # 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:

    # Copy the template
    cp .env.example .env

    Edit .env file and add your API keys:

    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

    cd my-app
    npm install

Running the Application

  1. Start the backend server

    python api.py
  2. Start the frontend (in a new terminal)

    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

Optional APIs

πŸ“ 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 - See the complete voice interaction experience!

πŸ“ License & Usage

This project is open source and available under the MIT 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


πŸš€ Transform your computer interaction with Buddy AI - Your intelligent personal assistant powered by cutting-edge AI technology!

Built with ❀️ by Parth Kothari

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published