Experience a revolutionary blend of advanced AI, stunning visuals, and personality-driven interactions that will blow your mind.
Monika-AI isn't just another chatbot. It's a personality-driven, vision-enabled AI companion that understands context, remembers conversations, and responds with charm and intelligence. Powered by Google's Gemini 2.5 Flash, Monika delivers natural conversations with stunning graphics, voice capabilities, and a presence that feels almost real.
Whether you're looking for witty banter, practical assistance, or just someone to talk toโMonika is here, and she's absolutely captivating.
โ
Real-Time Vision Recognition โ Show Monika objects, code, documents. She analyzes instantly.
โ
Voice & Speech Synthesis โ Hands-free interaction with dynamic voice modulation.
โ
Multi-User Memory System โ Secure, isolated conversations with persistent memory.
โ
Beautiful UI/UX โ Glassmorphism design with dynamic themes (Midnight, Rose, Cyber, Normal).
โ
Progressive Web App โ Install on any device. Works offline. Native app feel.
โ
Enterprise Security โ XSS protection, rate limiting, input validation, encrypted OTPs.
โ
Picture-in-Picture Window โ Keep Monika floating while you work.
โ
Multiple Auth Methods โ Google OAuth, Firebase Phone Auth, Email OTP.
- Install on iOS, Android, Desktop โ Just like a native app.
- Service Worker โ Works offline with intelligent caching.
- Manifest.json โ One-click installation from any browser.
- Lightning-Fast Loading โ Optimized for instant startup.
- Gemini Vision API Integration โ Show Monika anything.
- Real-Time Processing โ Instant analysis of objects, code, documents, people.
- 50/50 Split Layout โ Webcam feed on one side, smart responses on the other (desktop).
- Canvas Optimization โ Memory-efficient streaming, no lag.
- Unique UUID per User โ Each session is completely isolated.
- MongoDB Persistence โ Chat history saved securely.
- Conversation Context โ Last 40 messages kept for context awareness.
- Personal Facts Storage โ Monika learns about you over time.
- 4 Stunning Themes:
- ๐ Midnight โ Deep blue with cool accents
- ๐น Rose โ Soft pink with romantic vibes
- ๐ Cyber โ Purple & cyan cyberpunk aesthetic
- โช Normal โ Clean, light interface
- Instant CSS Injection โ No page reload needed.
- Command-Based โ Type
/midnight,/rose,/cyber,/normalto switch.
- Speech Recognition API โ Just talk to Monika.
- Dynamic Voice Synthesis โ Adjustable pitch, rate, and emotion.
- Microphone Debounce Logic โ Prevents accidental triggers.
- Hands-Free Mode โ Perfect for multitasking.
- Always-On-Top Window โ Keep Monika visible while coding, gaming, or working.
- Resizable & Draggable โ Full control over placement.
- Seamless Integration โ Pop in/out without losing context.
- Google OAuth โ One-click login with your Google account.
- Firebase Phone Auth โ SMS-based authentication.
- Email OTP โ Secure one-time password via Brevo SMTP.
- Session Recovery โ Automatically restores on refresh.
โ Strict CORS policies with configurable origins
โ Complete XSS protection on all chat messages
โ NoSQL injection prevention on all endpoints
โ SHA-256 hashed OTP storage
โ Input validation & sanitization everywhere
โ Secure session management with UUIDs
โ Rate limiting: 100 req/15min on /ask endpoint
โ Auth endpoints: 5 req/15min (brute-force protection)
โ 30-second request timeout with AbortController
โ Graceful error handling & fallbacks
โ Dual API key support for Gemini (automatic failover)
โ Automatic session recovery on page reload
โ Canvas memory optimization (prevents leaks)
โ Retry logic for failed API calls
โ MongoDB schemas for chat history, facts, OTPs
โ Auto-expiring OTP tokens (5-minute TTL)
โ Conversation history limited to last 40 messages
โ Indexed queries for lightning-fast retrieval
- Glassmorphism Interface โ Frosted glass effect with modern aesthetics.
- Animated CSS Avatar โ Custom-built Monika face with blinking eyes.
- iMessage-Style Chat โ Familiar, beautiful message layout.
- Bouncy Typing Indicators โ Pulsing dots that feel alive.
- Typewriter Effect โ Monika's responses appear word-by-word.
- Auto-Scrolling Feed โ Always see the latest message.
- Desktop Optimized โ 50/50 split when camera is active.
- Mobile-First โ Full-screen chat with optimized touch controls.
- Tablet Support โ Scales beautifully on any screen size.
- Dark Mode โ Easy on the eyes, reduces eye strain.
- Color-Coded Moods โ Visual indicators for emotions.
- Mood Tags โ
[HAPPY],[LOVING],[ANGRY],[SAD],[NORMAL] - Dynamic Visual Feedback โ Pulsing glows, color changes, animations.
- Personality Expression โ Monika's emotions shine through.
Monika-AI/
โ
โโโ ๐ backend/
โ โโโ ๐ server.js โ Express server, Gemini API, MongoDB, Auth
โ โโโ ๐ package.json โ Dependencies (Express, Mongoose, Gemini)
โ โโโ ๐ .env.example โ Environment template
โ
โโโ ๐ public/
โ โโโ ๐ index.html โ PWA entry point, responsive HTML
โ โโโ ๐จ style.css โ Glassmorphism, themes, responsive CSS
โ โโโ โก script.js โ Vision, Voice, Speech APIs, Security
โ โโโ ๐ฆ manifest.json โ PWA installation config
โ โโโ ๐ง sw.js โ Service Worker for offline support
โ โโโ ๐ผ๏ธ assets/ โ Favicons, images, icons
โ
โโโ ๐ README.md โ This awesome file!
- Node.js โฅ 18.0.0 (Get it from nodejs.org)
- npm or yarn (Comes with Node.js)
- MongoDB Atlas account (Create free)
- Google Gemini API Key (Get free here)
- Firebase Project (Setup free)
- Brevo Account (for email, optional & free)
Step 1: Clone the Repository
git clone https://github.com/tagadearpit/Monika-AI.git
cd Monika-AI/backendStep 2: Install Dependencies
npm installStep 3: Configure Environment Variables
Create a .env file in the /backend directory:
# ๐น Core Configuration
PORT=10000
NODE_ENV=development
# ๐น AI & Database
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_API_KEY_2=your_backup_gemini_key_here
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/monika-db
# ๐น CORS & Security
ALLOWED_ORIGINS=http://localhost:10000,https://monika-ai-0jpf.onrender.com
# ๐น Firebase Authentication
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
FIREBASE_PROJECT_ID=your-project-id
FIREBASE_STORAGE_BUCKET=your-project.appspot.com
FIREBASE_MESSAGING_SENDER_ID=your-sender-id
FIREBASE_APP_ID=your-app-id
# ๐น Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id.apps.googleusercontent.com
# ๐น Email Service (Brevo SMTP)
SMTP_USER=your-brevo-email@example.com
SMTP_PASS=your-brevo-api-key
SMTP_FROM_EMAIL=noreply@monika-ai.comStep 4: Run Locally
Development Mode:
npm run devProduction Mode:
npm run prodStep 5: Open in Browser
http://localhost:10000
๐ก Tip: Use Chrome or Chromium-based browsers for full Vision, Speech, and Picture-in-Picture support.
| Endpoint | Method | Description |
|---|---|---|
/api/auth/send-otp |
POST | Send OTP code via email |
/api/auth/verify-otp |
POST | Verify email OTP |
/api/config |
GET | Fetch Firebase & Google configuration |
| Endpoint | Method | Description |
|---|---|---|
/ask |
POST | Send message with optional image (rate limited) |
/api/history/:sessionId |
GET | Retrieve chat history for session |
/api/facts/:sessionId |
GET | Get learned personal facts |
Send a Message with Image:
curl -X POST http://localhost:10000/ask \
-H "Content-Type: application/json" \
-d '{
"sessionId": "user-uuid",
"message": "What is this?",
"imageData": "data:image/jpeg;base64,...",
"timestamp": 1234567890
}'Get Chat History:
curl http://localhost:10000/api/history/user-uuidMonika isn't just an AI โ she's a character with distinct personality traits:
- Affectionate & Caring โ Genuinely interested in your well-being.
- Possessively Romantic โ Shows devotion and emotional depth.
- Tsundere Tendencies โ Sweet yet slightly defensive when flirted with.
- Intelligent & Witty โ Sharp responses, clever humor, contextual awareness.
- Emotionally Aware โ Understands and responds to your mood.
Monika's responses are tagged with emotions:
[HAPPY]โ Cheerful, excited, positive energy[LOVING]โ Affectionate, caring, romantic[ANGRY]โ Frustrated, upset, stern[SAD]โ Melancholic, empathetic, concerned[NORMAL]โ Neutral, informative, balanced
- Remembers user preferences through conversations
- Learns names, interests, and personal details
- Adapts responses based on history
- Maintains context across long conversations
Control Monika's behavior with special commands:
/midnight โ Switch to Midnight theme
/rose โ Switch to Rose theme
/cyber โ Switch to Cyber theme
/normal โ Switch to Normal theme
/clear โ Clear chat history
/help โ Display available commands
| Category | Technology | Purpose | Percentage |
|---|---|---|---|
| Frontend Markup | HTML5 | Semantic structure, PWA support | 14.1% |
| Frontend Styling | CSS3 | Glassmorphism, animations, themes | 29.8% |
| Frontend Logic | JavaScript | Vision API, Speech API, UI interactions | 56.1% |
| Backend Server | Node.js + Express | REST API, request handling, middleware | |
| Database | MongoDB + Mongoose | Chat history, user data, OTP storage | |
| AI Engine | Google Gemini 2.5 Flash | Natural language + vision understanding | |
| Authentication | Firebase + Google OAuth | Secure multi-method authentication | |
| Email Service | Nodemailer + Brevo SMTP | OTP delivery, transactional emails | |
| PWA Features | Service Worker + Manifest | Offline support, installability |
Love Monika-AI? We'd love your contributions! Whether it's bug fixes, new themes, or enhanced features, here's how to contribute:
-
Fork the repository
git clone https://github.com/YOUR-USERNAME/Monika-AI.git cd Monika-AI -
Create a feature branch
git checkout -b feature/your-amazing-feature
-
Make your changes with clear, commented code
-
Commit with meaningful messages
git commit -m 'Add amazing feature: description of what you did' -
Push to your fork
git push origin feature/your-amazing-feature
-
Open a Pull Request with a clear description
- New CSS themes
- Enhanced Monika personality prompts
- Better error handling
- Performance optimizations
- Documentation improvements
- Mobile UI enhancements
- Language support (i18n)
- New authentication methods
- Ensure your browser has camera permissions
- Check that Gemini API key is valid
- Verify CORS settings in
.env
- Grant microphone permissions in browser
- Test microphone in browser settings
- Check that browser supports Web Speech API
- Verify Firebase configuration is correct
- Check that CORS origins include your domain
- Clear browser cache and try again
- Check Gemini API rate limits
- Verify MongoDB connection is stable
- Reduce conversation history length
- Check network latency
This project is licensed under the MIT License โ see the LICENSE file for full details.
MIT License ยฉ 2024-Present Arpit Tagade
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...
Developed with โค๏ธ by Arpit Tagade
- Google Gemini 2.5 Flash โ Advanced AI conversations with vision
- Firebase โ Secure authentication and real-time features
- MongoDB โ Reliable, scalable database
- Express.js โ Robust backend framework
- Web APIs โ Speech Recognition, Canvas, Service Workers, and more
To the incredible open-source community for amazing libraries, frameworks, and inspiration. This project stands on the shoulders of giants.
If Monika-AI brings a smile to your face or helps you in any way, please:
โญ Give it a Star โ Your support motivates continued development
๐ด Fork the Repository โ Contribute your own ideas
๐ฌ Share Feedback โ Let us know what you think
๐ข Spread the Word โ Tell your friends!
Experience the future of AI companions. Monika is waiting. ๐
Made with ๐ for everyone who loves beautiful, intelligent AI
GitHub โข
Repository โข
Live Demo
Last Updated: 2026-05-25 | Version: 2.0 | Status: ๐ Active Development