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.
- Natural chat or voice interactions
- Human-like tone and friendly responses
- Smart context understanding powered by Google Gemini AI
- Google search with direct result links
- News, sports, finance & trending topics
- Wikipedia summaries
- Fast fallback search when query not matched
- Play YouTube videos or search playlists
- Spotify music links
- Trending music & entertainment lookups
- Time, date, day, month queries
- Calculator
- Calendar
- Notes
- Reminders & alarms
- City-wise weather information
- Google Maps routing
- Flight status & booking helpers
- Hotel search
- Latest headlines
- Cricket & football live scores
- Sports news summaries
Quick-launch links to:
- Instagram β’ Facebook β’ Twitter/X β’ WhatsApp Web β’ Telegram β’ Snapchat β’ LinkedIn
- Live stock prices
- Crypto price updates
- Finance news
- Image generation
- Code generation
- Document summarization
- Smart conversation fallback
- 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
- 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
- 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)
git clone https://github.com/shreyashpatel5506/VirtualAssistant.git
cd VirtualAssistant# Install root dependencies
npm install
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate 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_idCreate a .env file in the frontend directory (optional):
VITE_API_URL=http://localhost:8080/apiTerminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
cd frontend
npm run devThe application will be available at:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8080
# Build frontend
npm run build
# Start backend (serves both API and frontend)
npm startVirtualAssistant/
βββ 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
- Sign Up: Create an account with email verification (OTP)
- Customize Assistant: Set your assistant's name and avatar
- Start Chatting: Use text or voice commands to interact with your assistant
- 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?"
The application uses JWT-based authentication with HTTP-only cookies for secure session management. Passwords are hashed using bcrypt.
Placeholder for application screenshots
- 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
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
We follow conventional commit messages:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Example: feat: Add voice recognition support
- Gemini API integration may require API key configuration
- Some features may not work in production without proper environment variables
This project is licensed under the ISC License.
Shreyash Patel
- GitHub: @shreyashpatel5506
- Project Link: https://github.com/shreyashpatel5506/VirtualAssistant
If you like this project, please give it a star β on GitHub. It motivates further development and helps the project grow!
- 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.