A Comprehensive Multilingual Medical Consultation App for Rural India
Connecting Rural India to Healthcare through AI-powered preliminary medical assessments
GramHealth AI is a cutting-edge healthcare application designed to bridge the healthcare gap in rural India. Using Google's Gemini AI, the app provides preliminary medical assessments through image analysis, video analysis, and voice-based symptom reporting. The application supports multiple Indian languages and offers an accessible, offline-capable solution for communities with limited access to healthcare facilities.
- ๐ค AI-Powered Diagnosis: Leverages Gemini 1.5 Pro for advanced medical image and video analysis
- ๐ Multilingual Support: Available in 6 languages - English, Hindi, Tamil, Bengali, Marathi, and Kannada
- ๐ธ Visual Analysis: Upload photos or videos of symptoms for detailed AI assessment
- ๐๏ธ Voice Input: Speak symptoms in your native language for hands-free consultation
- โฟ Accessibility First:
- Adjustable font sizes (100%, 125%, 150%)
- Dark mode support
- High contrast mode
- Screen reader friendly
- ๐ Detailed Reports:
- Bounding box detection on images
- Severity assessment with color-coded indicators
- Home remedies and doctor visit recommendations
- Confidence breakdown and explainability
- ๐ฑ Progressive Web App: Works offline and can be installed on mobile devices
- ๐จโโ๏ธ Doctor Portal: Share consultation codes with healthcare professionals
- ๐ Health History: Track past consultations and progression analysis
- ๐ Privacy-Focused: Local data storage with optional sharing
GramHealthAi/
โ
โโโ ๐ index.html # Main HTML entry point with Tailwind CDN
โโโ ๐ index.tsx # React app entry point
โโโ ๐ App.tsx # Main app component with routing and context
โโโ ๐ package.json # Project dependencies and scripts
โโโ ๐ vite.config.ts # Vite configuration
โโโ ๐ tsconfig.json # TypeScript configuration
โโโ ๐ metadata.json # App metadata and permissions
โโโ ๐ types.ts # TypeScript type definitions
โโโ ๐ constants.ts # App constants and translations
โโโ ๐ .gitignore # Git ignore rules
โ
โโโ ๐ pages/ # Application pages
โ โโโ Home.tsx # Home page with consultation history
โ โโโ Consultation.tsx # Main consultation interface
โ โโโ Report.tsx # Detailed analysis report viewer
โ โโโ DoctorPortal.tsx # Doctor collaboration interface
โ โโโ FamilyAccess.tsx # Family/caregiver access management
โ โโโ Community.tsx # Community features
โ
โโโ ๐ components/ # Reusable React components
โ โโโ PermissionScreen.tsx # Camera/microphone permission handler
โ โโโ LazyImage.tsx # Lazy-loaded image component
โ
โโโ ๐ services/ # Business logic and API services
โโโ geminiService.ts # Gemini AI integration
โโโ utils.ts # Utility functions (caching, haptics, TTS)
- Home.tsx: Landing page displaying consultation history with pagination and delete functionality
- Consultation.tsx: Core consultation flow - symptom input, media upload, voice recording
- Report.tsx: Comprehensive analysis results with visual overlays and recommendations
- DoctorPortal.tsx: Interface for healthcare professionals to review shared consultations
- FamilyAccess.tsx: Manage caregiver permissions and family member access
- Community.tsx: Community health features and discussion forums
- PermissionScreen.tsx: Handles browser permissions for camera and microphone with educational UI
- LazyImage.tsx: Performance-optimized image loading component
- geminiService.ts:
- Handles Gemini AI API integration
- Implements structured output schema for medical analysis
- Supports image, video, and text-based consultations
- Includes caching for improved performance
- utils.ts:
- Text-to-speech functionality
- Haptic feedback utilities
- Local storage caching mechanism
- Language-specific voice synthesis
- React 19.2.1 - Modern React with concurrent features
- TypeScript 5.8.2 - Type-safe development
- React Router DOM 7.10.1 - Client-side routing
- Vite 6.2.0 - Lightning-fast build tool and dev server
- Tailwind CSS 3.x - Utility-first CSS framework (via CDN)
- Lucide React 0.556.0 - Beautiful, consistent icons
- Custom CSS - Glassmorphism effects, animations, accessibility features
- Google Gemini AI (@google/genai 1.31.0) - Multimodal AI for medical analysis
- Web Speech API - Voice input and text-to-speech
- MediaDevices API - Camera and microphone access
- Canvas API - Image manipulation and bounding boxes
- html2pdf.js (via CDN) - PDF report generation
- LocalStorage API - Offline data persistence
- Service Worker Ready - PWA capabilities
- Node.js (v18 or higher recommended)
- npm or yarn package manager
- Google Gemini API Key (Get it here)
-
Clone the repository
git clone https://github.com/kulharshit21/GramHealthAi.git cd GramHealthAi -
Install dependencies
npm install
-
Configure Environment Variables
Create a
.env.localfile in the root directory:GEMINI_API_KEY=your_gemini_api_key_here
-
Run the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:3000
npm run buildThe optimized production build will be in the dist/ directory.
npm run preview- Grant camera and microphone permissions when prompted
- Complete the onboarding tutorial
- Accept the medical disclaimer
- Select your preferred language
- Click "Start New Consultation" on the home page
- Choose your input method:
- ๐ธ Upload Photo/Video - Capture or select media showing symptoms
- ๐๏ธ Voice Input - Describe symptoms verbally
- โจ๏ธ Text Input - Type symptom description
- Duration of symptoms
- Pain level (1-10 scale)
- Additional symptoms checklist
- Upload multiple images/videos if needed
- AI processes your input using Gemini 1.5 Pro
- View detailed diagnosis with:
- Visual bounding boxes on detected issues
- Severity assessment (High/Moderate/Healing)
- Confidence scores
- Home remedies
- When to see a doctor
- Recommended medical tests
- Download PDF report
- Share with doctor via WhatsApp
- Generate consultation code for Doctor Portal
- Save to consultation history
GramHealth AI is built with accessibility as a core principle:
- ๐ค Font Scaling: 3 sizes (Normal, Large, Extra Large)
- ๐ Dark Mode: Reduces eye strain in low-light conditions
- ๐๏ธ High Contrast Mode: Enhanced visibility for visual impairments
- ๐ฏ Touch Targets: Minimum 60x60px for easy tapping
- ๐ฃ๏ธ Text-to-Speech: Reads diagnoses and recommendations aloud
- โฟ Screen Reader Support: ARIA labels and semantic HTML
- ๐ Multilingual: Native language support for regional users
- Local Storage: All data stored on device by default
- No Mandatory Cloud Sync: Opt-in sharing only
- Secure API Calls: Environment-based API key management
- Medical Disclaimer: Clear warnings about AI limitations
- HIPAA Awareness: Designed with healthcare privacy in mind
| Language | Code | Native Name | Flag |
|---|---|---|---|
| English | en |
English | ๐ฌ๐ง |
| Hindi | hi |
เคนเคฟเคเคฆเฅ | ๐ฎ๐ณ |
| Tamil | ta |
เฎคเฎฎเฎฟเฎดเฏ | ๐ฎ๐ณ |
| Bengali | bn |
เฆฌเฆพเฆเฆฒเฆพ | ๐ฎ๐ณ |
| Marathi | mr |
เคฎเคฐเคพเค เฅ | ๐ฎ๐ณ |
| Kannada | kn |
เฒเฒจเณเฒจเฒก | ๐ฎ๐ณ |
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a 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
- Follow TypeScript best practices
- Maintain accessibility standards
- Add translations for all new UI text
- Test on multiple screen sizes
- Ensure offline functionality works
- Gemini API requires internet connectivity
- Video analysis may take longer on slower connections
- Browser permission denials require manual reset
- Some languages may have limited TTS voice quality
This project is currently unlicensed. Please contact the repository owner for usage permissions.
Harshit Kulkarni
- GitHub: @kulharshit21
- Google Gemini Team - For the powerful multimodal AI API
- React Community - For excellent documentation and tools
- Tailwind CSS - For the utility-first CSS framework
- Lucide Icons - For beautiful, consistent iconography
For issues, questions, or suggestions:
- ๐ง Open an Issue
- ๐ฌ Start a Discussion
Made with โค๏ธ for Rural India
Disclaimer: This app provides preliminary assessments only. Always consult qualified healthcare professionals for medical decisions.