Miffy is an AI-powered medical assistant platform that helps users check symptoms, get structured triage guidance, locate nearby care, and navigate their health journey — through a friendly, voice-enabled chatbot interface.
- Powered by Google Gemini 2.5 Flash for fast, context-aware medical conversations
- Conversational memory — the full chat history is sent with every message so Gemini remembers prior symptoms, answers, and concerns across the session
- Patient intake flow — on first conversation, collects name, age, gender, weight, height, current medications, allergies, and prior surgeries before giving triage
- Structured triage output when symptoms are described:
- Severity · Immediate Need for Attention · See a Doctor If · Next Steps · Possible Conditions · Disclaimer
- Multilingual — detects the language of each user message and replies in the same language (English, Hindi, Marathi, Urdu, Kannada, Telugu, Odia, Bhojpuri, and more)
- Quick-prompt chips on the welcome screen for one-tap symptom entry
- Click the mic button and speak your symptoms — no typing required
- Uses the browser's MediaRecorder API to capture audio locally
- Audio is sent to the backend where Gemini transcribes it (bypasses Chrome's SpeechRecognition which requires Google's speech servers)
- Live recording and transcribing status indicators with pulse animation
- When the conversation ends (user says "bye", "thank you", or "thanks"), a consultation report PDF downloads automatically
- Report is generated by Gemini from the full chat history and includes:
- Patient Information · Reason for Consultation · Symptoms Summary
- Medical History Reported by Patient · Suggested Areas for Clinical Review · Follow-up Questions
- Built with PDFKit on the backend
- Interactive map powered by OpenStreetMap & Overpass API
- Detects your approximate location via GPS or IP geolocation fallback
- Shows hospitals, clinics, and pharmacies within a 5 km radius
- Includes a legend and radius circle for clarity
- Falls back to prominent Delhi hospitals (AIIMS, Safdarjung, Apollo, Fortis, Apollo Pharmacy, MedPlus) if location detection fails
- One-click emergency trigger from the navbar
- Detects location via GPS with IP-based fallback
- Shows a confirmation popup with a Google Maps link
- Auto-hides after a few seconds
Services and ports:
| Service | Path | Port | Purpose |
|---|---|---|---|
| Main Frontend | frontend/ |
Vite default | React 19 SPA — landing page, map, dashboard |
| Main Backend | backend/ |
4000 | Express 5 + MongoDB (doctors, admin, uploads) |
| Auth Server | backend/authServer/ |
5000 | JWT auth microservice (login / signup) |
| Chatbot Server | MediMateBot/server/ |
8080 | Gemini 2.5 Flash — chat, transcribe, report |
| Chatbot Client | MediMateBot/client/ |
Vite default (HTTPS) | React chat UI |
Chatbot API endpoints (MediMateBot/server/server.js):
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/chat |
Send message + history → Gemini → structured reply |
POST |
/transcribe |
Send base64 audio → Gemini → transcript text |
POST |
/report |
Send full history → Gemini → download PDF |
| Layer | Technologies |
|---|---|
| Chatbot Frontend | React 19, Vite 7, Framer Motion, @vitejs/plugin-basic-ssl (HTTPS) |
| Chatbot Backend | Express 4, @google/generative-ai, PDFKit, CORS, dotenv |
| Main Frontend | React 19, Vite 7, Tailwind CSS 4, React Router 7, Framer Motion, Leaflet, Axios |
| Main Backend | Express 5, Mongoose / MongoDB, JWT + Bcrypt, Multer + Cloudinary, Joi |
| AI Model | Google Gemini 2.5 Flash |
Chatbot backend:
cd MediMateBot/server
npm installChatbot frontend:
cd MediMateBot/client
npm installMain frontend:
cd frontend
npm installAuth backend:
cd backend/authServer
npm installMain backend:
cd backend
npm installMediMateBot/server/.env
GEMINI_API_KEY=your_google_gemini_api_keybackend/authServer/.env
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret_keybackend/.env
MONGODB_URI=your_mongodb_uri
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_SECRET_KEY=your_cloudinary_secret
PORT=4000All services run independently — each needs its own terminal.
Chatbot backend (port 8080):
cd MediMateBot/server
npm startChatbot frontend (HTTPS, Vite default port):
cd MediMateBot/client
npm run devOpens on
https://localhost:5173. On first visit Chrome will show a self-signed certificate warning — click Advanced → Proceed to localhost. HTTPS is required for microphone access.
Main frontend:
cd frontend
npm run devAuth backend (port 5000):
cd backend/authServer
npm run devMain backend (port 4000):
cd backend
npm run serverThe mic button uses the browser's native MediaRecorder API (no external libraries):
- User clicks mic → browser requests microphone permission
- Audio is recorded locally as a
webmblob - User clicks mic again to stop recording
- Blob is converted to base64 and
POSTed to/transcribe - The backend sends the audio to Gemini 2.5 Flash for transcription
- The transcript is returned and automatically sent as a chat message
Note: Voice input requires Chrome and microphone permission. The chatbot frontend must be running on HTTPS (handled automatically by the Vite dev config).
When the user says "bye", "thank you", or "thanks" at the end of a session:
- The full conversation history is
POSTed to/report - Gemini generates a structured clinical summary in plain text
- The backend renders it as a PDF using PDFKit with a report ID, timestamp, and disclaimer
- The PDF downloads automatically in the browser
The MediMate Bot UI is styled to match the main Miffy landing page:
- Dark navy-to-teal gradient background matching the landing page hero
- Glassmorphism header with bot avatar, gradient title text, and live "Online" status
- Welcome screen with quick-prompt chips for one-tap symptom entry
- User messages — teal gradient pill bubbles (right-aligned)
- Bot messages — white frosted glass cards with soft shadow (left-aligned)
- Unified pill input bar — text field, mic button, and send button in one rounded container
- Slide-in message animations consistent with landing page motion style
