Nexa AI is a smart, voice-activated virtual assistant built with the MERN stack and powered by Google's Gemini API. Just speak your command β Nexa listens via the browser's built-in Speech-to-Text API, sends it to Gemini for an intelligent response, and replies back with a natural voice. You can also instruct Nexa to open websites, play YouTube videos, search the web, and much more β all hands-free.
- π€ Voice Activation β Say your assistant's wake word to trigger commands
- π€ AI Responses β Powered by Google Gemini AI for smart, natural replies
- π Text-to-Speech β Assistant speaks back in your chosen language & voice
- π Web Actions β Opens Google, YouTube, LinkedIn, Instagram, Maps & more
- π΅ YouTube Playback β Play any song or video via voice command
- ποΈ Real-time Info β Get current date, time, day, weather instantly
- π¬ Chat Mode β Type queries when you don't want to use voice
- π Dashboard β Visual stats: total queries, voice vs chat breakdown, weekly activity
- π History Log β Browse all past interactions with search & filter
- π§ Custom Persona β Choose your assistant's name, avatar & personality
- π Multi-language β English, Hindi, Marathi voice support
- π Auth System β Secure register/login with JWT cookies
| Layer | Technology |
|---|---|
| Frontend | React.js (Vite), React Router |
| Backend | Node.js, Express.js |
| Database | MongoDB (Mongoose) |
| AI Engine | Google Gemini API |
| Auth | JWT (HTTP-only cookies) |
| Voice | Web Speech API (SpeechRecognition + SpeechSynthesis) |
| Image Upload | Cloudinary |
| Styling | Inline styles (custom dark cyber theme) |
NEXA_AI/
βββ Frontend/
β βββ src/
β β βββ pages/
β β β βββ Home.jsx # Voice assistant main page
β β β βββ Chat.jsx # Text chat interface
β β β βββ Dashboard.jsx # Stats & analytics
β β β βββ History.jsx # Interaction log
β β β βββ customize.jsx # Assistant persona setup
β β β βββ Auth.jsx # Login / Register
β β βββ components/
β β β βββ Navbar.jsx # Sidebar navigation
β β β βββ Animation.jsx # Neural background canvas
β β βββ contextAPI/
β β βββ Usercontext.jsx # Global state management
β βββ vercel.json # Vercel SPA + API proxy config
β βββ vite.config.js
β
βββ Backend/
βββ controller/
β βββ usercontroler.js # User, history, dashboard logic
β βββ authcontroler.js # Register, login, logout
βββ models/
β βββ user.js # MongoDB user schema
βββ routes/
β βββ userRoutes.js
β βββ authRoutes.js
βββ middleware/
β βββ isAuth.js # JWT verification
β βββ multer.js # File upload
βββ config/
β βββ cloudinary.js
βββ gemini_api.js # Gemini AI integration
βββ index.js
- Node.js v18+
- MongoDB Atlas account
- Google Gemini API key
- Cloudinary account
git clone https://github.com/Sakshi123509/Nexa_AI.git
cd Nexa_AIcd Backend
npm installCreate .env file in /Backend:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
GEMINI_API_KEY=your_gemini_api_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretnpm run devcd Frontend
npm install
npm run devCreate .env file in /Frontend:
VITE_API_URL=http://localhost:5000Frontend runs on http://localhost:5173
Backend runs on http://localhost:5000
- Register β Create your account
- Setup Persona β Go to _PERSONA and choose assistant name & avatar
- Go to Assistant page β Click Start Listening
- Say the wake word β e.g., "Hey Nexa, what is the weather today?"
- NEXA responds β speaks back + opens relevant apps/links
| Command | Action |
|---|---|
[wake word] search React tutorials |
Opens Google Search |
[wake word] play Kesariya on YouTube |
Opens YouTube |
[wake word] what time is it |
Speaks current time |
[wake word] open Instagram |
Opens Instagram |
[wake word] open maps Mumbai |
Opens Google Maps |
[wake word] what is machine learning |
AI explanation via Gemini |
| Variable | Description |
|---|---|
MONGODB_URI |
MongoDB Atlas connection string |
JWT_SECRET |
Secret key for JWT tokens |
GEMINI_API_KEY |
Google Gemini AI API key |
CLOUDINARY_CLOUD_NAME |
Cloudinary cloud name |
CLOUDINARY_API_KEY |
Cloudinary API key |
CLOUDINARY_API_SECRET |
Cloudinary API secret |
| Variable | Description |
|---|---|
VITE_API_URL |
Backend server URL |
---## πΈ Screenshots
## π Deployment- Frontend β Vercel
- Backend β Render
- Database β MongoDB Atlas
{
"rewrites": [
{
"source": "/api/:path*",
"destination": "https://nexa-ai-wy87.onrender.com/api/:path*"
},
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
Made with β€οΈ by Sakshi
β Star this repo if you found it helpful!





