Skip to content

shreyashpatel5506/virtual-assistant-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

445 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Virtual AI Voice & Text Assistant

A modern, full-stack voice and chat assistant powered by AI (Gemini). Built with React, Node.js, Express, and MongoDB. This assistant can handle voice commands, perform web searches, control media, manage tasks, and much more through an intuitive web interface.

Tech Stack License

✨ Features

πŸ—£οΈ Conversational AI

  • Natural chat or voice interactions
  • Human-like tone and friendly responses
  • Smart context understanding powered by Google Gemini AI

πŸ” Search & Knowledge

  • Google search with direct result links
  • News, sports, finance & trending topics
  • Wikipedia summaries
  • Fast fallback search when query not matched

🎡 Media Control

  • Play YouTube videos or search playlists
  • Spotify music links
  • Trending music & entertainment lookups

πŸ› οΈ Utilities

  • Time, date, day, month queries
  • Calculator
  • Calendar
  • Notes
  • Reminders & alarms

🌦️ Weather & Travel

  • City-wise weather information
  • Google Maps routing
  • Flight status & booking helpers
  • Hotel search

πŸ“° News & Sports

  • Latest headlines
  • Cricket & football live scores
  • Sports news summaries

πŸ“± Social Apps

Quick-launch links to:

  • Instagram β€’ Facebook β€’ Twitter/X β€’ WhatsApp Web β€’ Telegram β€’ Snapchat β€’ LinkedIn

πŸ’Ή Finance

  • Live stock prices
  • Crypto price updates
  • Finance news

πŸ€– Built-in AI Tools

  • Image generation
  • Code generation
  • Document summarization
  • Smart conversation fallback

πŸ› οΈ Tech Stack

Frontend

  • React 19 - UI library
  • Vite - Build tool and dev server
  • Tailwind CSS - Styling
  • Framer Motion - Animations
  • Zustand - State management
  • React Router - Routing
  • Axios - HTTP client
  • React Hot Toast - Notifications

Backend

  • Node.js - Runtime environment
  • Express 5 - Web framework
  • MongoDB - Database
  • Mongoose - ODM
  • JWT - Authentication
  • Bcrypt - Password hashing
  • Multer - File uploads
  • Cloudinary - Image storage
  • Nodemailer - Email service
  • Google Gemini AI - AI integration

πŸ“‹ Prerequisites

  • Node.js (v20.x or higher)
  • MongoDB (local or cloud instance)
  • npm or yarn
  • Google Gemini API key
  • Cloudinary account (for image uploads)
  • Gmail account (for OTP emails)

πŸš€ Installation

1. Clone the repository

git clone https://github.com/shreyashpatel5506/VirtualAssistant.git
cd VirtualAssistant

2. Install dependencies

# Install root dependencies
npm install

# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../frontend
npm install

3. Environment Variables

Create a .env file in the backend directory:

# Server Configuration
PORT=8080
NODE_ENV=development
FRONTEND_URL=http://localhost:5173

# Database
MONGO_URI=your_mongodb_connection_string

# JWT Secret
JWT_SECRET=your_jwt_secret_key

# Email Configuration (for OTP)
MY_MAIL=your_email@gmail.com
MY_PASSWORD=your_app_password

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# Gemini AI Configuration
GEMINI_API_URL=https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY

# Optional: API Template (for document generation)
APITEMPLATE_API_KEY=your_api_key
APITEMPLATE_TEMPLATE_ID=your_template_id

Create a .env file in the frontend directory (optional):

VITE_API_URL=http://localhost:8080/api

4. Run the application

Development Mode

Terminal 1 - Backend:

cd backend
npm run dev

Terminal 2 - Frontend:

cd frontend
npm run dev

The application will be available at:

  • Frontend: http://localhost:5173
  • Backend API: http://localhost:8080

Production Mode

# Build frontend
npm run build

# Start backend (serves both API and frontend)
npm start

πŸ“ Project Structure may be different

VirtualAssistant/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ cloudinary.js      # Cloudinary configuration
β”‚   β”‚   └── db.js              # MongoDB connection
β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ auth.controller.js # Authentication logic
β”‚   β”‚   └── token.js           # JWT token utilities
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ auth.middleware.js # Authentication middleware
β”‚   β”‚   └── multer.js          # File upload middleware
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   └── user.model.js      # User schema
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.route.js      # Authentication routes
β”‚   β”‚   └── geminiRoute.js     # AI assistant routes
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── index.js           # Server entry point
β”‚   β”œβ”€β”€ gemini.js              # Gemini AI integration
β”‚   └── package.json
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable components
β”‚   β”‚   β”œβ”€β”€ Context/           # React context providers
β”‚   β”‚   β”œβ”€β”€ pages/             # Page components
β”‚   β”‚   β”œβ”€β”€ stores/            # Zustand state stores
β”‚   β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”‚   β”œβ”€β”€ assets/           # Static assets
β”‚   β”‚   β”œβ”€β”€ App.jsx           # Main app component
β”‚   β”‚   └── main.jsx          # Entry point
β”‚   └── package.json
β”œβ”€β”€ .gitignore
β”œβ”€β”€ package.json
└── README.md

🎯 Usage

Getting Started

  1. Sign Up: Create an account with email verification (OTP)
  2. Customize Assistant: Set your assistant's name and avatar
  3. Start Chatting: Use text or voice commands to interact with your assistant

Example Commands

  • General: "How are you?", "Tell me a joke"
  • Search: "Search Google for React tutorials"
  • Media: "Play Ed Sheeran on Spotify", "Search YouTube for cooking recipes"
  • Time: "What time is it?", "What's today's date?"
  • Tools: "Open calculator", "Open calendar"
  • Weather: "What's the weather in London?"
  • News: "Show me latest news"
  • Finance: "What's the stock price of Apple?"

πŸ” Authentication

The application uses JWT-based authentication with HTTP-only cookies for secure session management. Passwords are hashed using bcrypt.

πŸ“Έ Screenshots

Placeholder for application screenshots

🚧 Future Improvements

  • Offline mode support
  • Multi-language voice support
  • Personalization profiles
  • Smart home integrations
  • Chat history & memory persistence
  • Voice command customization
  • Mobile app (React Native)
  • Real-time collaboration features
  • Advanced analytics dashboard
  • Plugin system for extensibility

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ Commit Message Guidelines

We follow conventional commit messages:

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation changes
  • style: - Code style changes (formatting, etc.)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks

Example: feat: Add voice recognition support

πŸ› Known Issues

  • Gemini API integration may require API key configuration
  • Some features may not work in production without proper environment variables

πŸ“œ License

This project is licensed under the ISC License.

πŸ‘€ Author

Shreyash Patel

⭐ Support

If you like this project, please give it a star ⭐ on GitHub. It motivates further development and helps the project grow!

πŸ™ Acknowledgments

  • Google Gemini AI for the powerful AI capabilities
  • All the open-source libraries that made this project possible
  • Contributors and users of this project

Note: Make sure to configure all environment variables before running the application. The Gemini API key is required for the assistant to function properly.

About

πŸŽ™οΈ Virtual AI Voice Assistant - A modern full-stack voice and chat assistant powered by Google Gemini AI. Built with React, Node.js, Express, and MongoDB.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors