An AI-powered virtual assistant built with React, Node.js, Express, MongoDB, and Google Gemini AI.
It can listen to your voice, respond with speech (US accent), search on Google & YouTube, open apps like Instagram/Facebook, show weather, answer general questions, and more.
- Features
- Tech Stack
- Installation & Setup
- Environment Variables
- Getting API Keys
- Usage
- Screenshots
- Future Improvements
- Author
- 🎙️ Voice recognition using Web Speech API
- 🗣️ Text-to-Speech (US accent) for smooth conversations
- 🤖 AI-powered responses using Google Gemini AI
- 🔍 Smart actions:
- Google Search
- YouTube Search (with channel detection)
- Weather lookup
- Calculator
- Social media shortcuts (Instagram, Facebook)
- 🖼️ Customizable Assistant Profile (name + avatar via Cloudinary)
- 📝 User history tracking stored in MongoDB
- 🔑 Authentication & Security with JWT and bcrypt
Frontend
- React 19
- React Router DOM
- Tailwind CSS 4
- Axios
Backend
- Node.js + Express 5
- MongoDB + Mongoose
- JWT for authentication
- bcryptjs for password hashing
- Multer & Cloudinary for image uploads
- Google Gemini AI (Generative Language API)
- Moment.js for date/time handling
git clone https://github.com/Sarg3n7/Virtual-AI-Assistant.git
cd Virtual-AI-Assistantcd backend
npm installcd ../frontend
npm installYou need to configure environment variables for both backend and frontend.
- Inside
backend/, create a.env.examplefile:
PORT=5000
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_api_key_here
CLOUDINARY_CLOUD_NAME=your_cloud_name_here
CLOUDINARY_API_KEY=your_cloudinary_api_key_here
CLOUDINARY_API_SECRET=your_cloudinary_api_secret_here- Copy
.env.exampleto.env:
cp .env.example .env- Fill in your actual credentials in
.env.
- Go to Google AI Studio → https://aistudio.google.com/app/apikey
- Sign in with your Google account.
- Click “Create API Key”.
- Copy the key and paste it into
.env:GEMINI_API_KEY=your_generated_key_here
- Go to Cloudinary → https://cloudinary.com
- Create a free account.
- After logging in, go to Dashboard.
- Copy your credentials:
- Cloud Name
- API Key
- API Secret
- Paste them into
.env:CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
cd backend
npx nodemoncd frontend
npm run dev- Frontend: http://localhost:5173
- Backend: http://localhost:5000
- 🌎 Multi-language support
- 🎵 Spotify/YouTube Music integration
- 📅 Calendar & reminders
- 💻 Desktop app version with Electron
Shashwat Shivam
Built with ❤️ using MERN + Gemini AI

