A comprehensive, privacy-first AI-powered medical assistant built with Next.js, React, and Google Gemini AI. This application provides professional medical guidance, symptom assessment, emergency triage, test result analysis, appointment booking, and family health management in multiple languages.
- User Registration - Complete signup form with validation
- User Login - Secure authentication with demo credentials
- Demo Accounts - Pre-configured accounts for testing
- Route Protection - Automatic redirect for unauthenticated users
- Session Management - Persistent login state
- Logout Functionality - Secure session termination
- Google Gemini AI Integration - Advanced medical reasoning and analysis
- Multilingual Support - 4 languages: English, Hindi, Spanish, French
- Multiple Consultation Modes:
- General Medical Consultation
- Symptom Triage Assessment
- Emergency Medical Guidance
- Second Opinion Consultation
- Real-time Chat Interface - Stream-based responses for instant feedback
- Medical Context Awareness - Tailored responses based on consultation type
- Multi-language Voice Synthesis - Native voices for each supported language
- Speech-to-Text - Voice input with language detection
- Text-to-Speech - AI responses spoken in selected language
- Voice Speed Control - Optimized speech rates for each language
- Voice Interruption - Stop speech with keyboard shortcuts (Space/Escape)
- Automatic Voice Selection - Smart voice mapping for each language
- File Upload Support - PDF, JPG, PNG, TXT formats (up to 10MB)
- AI-Powered Analysis - Automatic value extraction from lab reports
- Reference Range Comparison - Normal vs. abnormal result identification
- Risk Assessment - Overall health status and urgency evaluation
- Personalized Recommendations - Actionable health advice
- Manual Entry Mode - Add test results manually for analysis
- Sample Data Analysis - Demo with realistic medical data
- GPS Location Detection - Automatic location services
- Nearby Hospital Finder - Real-time hospital location mapping
- Emergency Contact Integration - Quick access to emergency numbers
- Emergency Triage - Immediate threat assessment
- Critical Action Guidance - Step-by-step emergency instructions
- Location-based Services - Country-specific emergency protocols
- Smart Date Validation - Prevents past date selection
- Phone Number Validation - Format verification for different countries
- Appointment Categories - Specialized booking for different medical needs
- Time Slot Management - Available appointment time selection
- Booking Confirmation - Email/SMS confirmation system
- Calendar Integration - Sync with personal calendar
- Family Member Profiles - Individual health records for family members
- Age-based Recommendations - Tailored advice for different age groups
- Family Health Dashboard - Overview of family health status
- Shared Health Records - Family health history tracking
- Pediatric Guidance - Specialized advice for children
- Elderly Care Support - Senior-specific health recommendations
- Secure File Upload - Medical document storage
- Document Organization - Categorized health records
- Search and Filter - Easy record retrieval
- Privacy Protection - Local storage with encryption
- Export Functionality - Download health records
- Record Sharing - Secure sharing with healthcare providers
- Medication Tracking - Dosage and schedule management
- Reminder System - Medication reminder notifications
- Drug Interaction Check - Safety verification
- Side Effect Monitoring - Adverse reaction tracking
- Refill Reminders - Prescription renewal alerts
- Medication History - Complete medication timeline
- Dark/Light Theme Toggle - User preference with smooth transitions
- Responsive Design - Optimized for desktop, tablet, and mobile
- Accessibility Features - WCAG compliant interface
- Modern UI Components - Beautiful, intuitive design
- Loading States - Smooth user feedback
- Error Handling - Graceful error recovery
- Offline Support - Basic functionality without internet
- TypeScript - Type-safe development
- Next.js 14 - Latest React framework with App Router
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component library
- Real-time Updates - Live data synchronization
- Progressive Web App - Installable web application
- SEO Optimized - Search engine friendly
| Language | Code | Voice Support | Medical Context |
|---|---|---|---|
| English | en |
โ Native | Global medical standards |
| Hindi | hi |
โ Native | Indian medical context |
| Spanish | es |
โ Native | Spanish medical terminology |
| French | fr |
โ Native | French medical standards |
- Node.js 18+
- npm or pnpm
- Google Gemini AI API key
git clone <repository-url>
cd ai-doctor-assistant
npm installCreate .env.local:
GOOGLE_GENERATIVE_AI_API_KEY=your_api_key_here
DEBUG=false- Visit Google AI Studio
- Create API key
- Add to
.env.local
npm run dev- Visit
/loginor/signup - Use demo credentials or create new account
- Access protected features after authentication
- Navigate to "AI Consultation"
- Select consultation mode (General/Triage/Emergency)
- Choose language preference
- Enable voice features if desired
- Start chatting with AI medical assistant
- Go to "Test Results"
- Upload medical reports or enter manually
- AI analyzes and provides insights
- Review recommendations and risk assessment
- Access "Emergency" page
- Allow location access for nearby hospitals
- Get immediate medical guidance
- Contact emergency services if needed
- Visit "Appointments"
- Select appointment type and date
- Enter contact information
- Confirm booking
- Access "Family Health"
- Add family member profiles
- Track individual health records
- Get age-appropriate recommendations
ai-doctor-assistant/
โโโ app/ # Next.js app directory
โ โโโ api/ # API routes
โ โ โโโ chat/ # AI consultation API
โ โ โโโ analyze-test-results/ # Test analysis API
โ โ โโโ book-appointment/ # Appointment booking API
โ โ โโโ emergency-location/ # Location services API
โ โ โโโ triage-assessment/ # Triage API
โ โ โโโ upload-records/ # Health records API
โ โ โโโ stream-chat/ # Streaming chat API
โ โโโ login/ # Authentication pages
โ โโโ signup/ # User registration
โ โโโ chat/ # AI consultation page
โ โโโ triage/ # Symptom triage page
โ โโโ test-results/ # Test analysis page
โ โโโ emergency/ # Emergency services page
โ โโโ appointments/ # Appointment booking page
โ โโโ family/ # Family health page
โ โโโ records/ # Health records page
โ โโโ medications/ # Medication management page
โ โโโ settings/ # User settings page
โโโ components/ # React components
โ โโโ ui/ # UI component library
โ โโโ auth-guard.tsx # Route protection
โ โโโ app-sidebar.tsx # Main navigation sidebar
โ โโโ top-navigation.tsx # Top navigation bar
โ โโโ theme-provider.tsx # Dark/light theme provider
โ โโโ medical-translator.tsx # Language translation
โ โโโ emergency-modal.tsx # Emergency modal
โ โโโ medical-disclaimer.tsx # Medical disclaimers
โโโ lib/ # Utility functions
โ โโโ utils.ts # General utilities
โ โโโ voice-manager.ts # Voice management system
โโโ hooks/ # Custom React hooks
โโโ public/ # Static assets
โโโ styles/ # Global styles
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # TypeScript type checking- Not a replacement for professional medical advice
- Not for diagnosis or treatment decisions
- Always consult qualified healthcare providers
- India: Call 108 or 102
- United States: Call 911
- Europe: Call 112
- Visit nearest emergency room immediately
- AI provides educational guidance only
- For diagnosis/treatment, consult licensed providers
- Use as supplementary information source
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Check the
/docsfolder for detailed guides - Medical Questions: Consult healthcare professionals
- Telemedicine Integration - Video consultation capabilities
- Wearable Device Sync - Health tracker integration
- Health Analytics - Trend analysis and insights
- Multi-language Expansion - Additional language support
- Two-Factor Authentication - Enhanced security
- Social Login - Google, Facebook, Apple integration
Built with โค๏ธ for better healthcare accessibility
This application prioritizes user privacy and data security while providing valuable health information and guidance.