A multilingual healthcare platform providing AI-powered symptom analysis, doctor appointments, medicine ordering, and voice-enabled health assistance for rural communities.
- Real-time Symptom Analysis: AI-powered analysis using OpenRouter/Gemini
- Voice Agent: Voice-enabled health consultation via WebSocket
- Urgency Detection: Automatic triage (Low/Medium/High/Emergency)
- Chat History: Persistent conversation tracking
- Doctor Directory: Browse and book appointments with verified doctors
- Medicine Store: Order medicines with stock management
- Order Tracking: Real-time order status updates
- SOS Emergency: Quick access emergency button
- 3 Languages: English, Hindi (เคนเคฟเคเคฆเฅ), Marathi (เคฎเคฐเคพเค เฅ)
- Complete Translation: All UI elements, medical terms, and responses
- Easy Switching: One-click language change
- Responsive Design: Optimized for all screen sizes
- Touch-Friendly: 44px minimum touch targets
- Progressive Web App: Offline support via service worker
- Fast Loading: Code-splitting and lazy loading
- Firebase Auth: Secure user authentication
- Role-Based Access: Admin and user roles
- Protected Routes: Secure admin dashboard
- Environment Variables: Sensitive data protection
- Python 3.11+
- Node.js 18+
- Firebase Account (for authentication & database)
- API Keys (OpenRouter, Gemini, Serper)
git clone <your-repo-url>
cd GramHealth# Create virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
# Install dependencies
cd backend
pip install -r requirements.txt
# Configure environment
copy .env.example .env # Windows
# cp .env.example .env # macOS/Linux
# Edit .env file with your API keys
# OPENROUTER_API_KEY=your_key_here
# GEMINI_API_KEY=your_key_here
# SERPER_API_KEY=your_key_here
# Run Flask server
python app.pyBackend runs on http://localhost:5000
cd backend
python voice_agent.pyVoice agent WebSocket runs on ws://localhost:8002
cd terna
npm install
# Optional: Configure frontend environment
copy .env.example .env.local # Windows
# cp .env.example .env.local # macOS/Linux
# Run development server
npm run devFrontend runs on http://localhost:5173
GramHealth/
โโโ backend/
โ โโโ app.py # Flask API server
โ โโโ voice_agent.py # FastAPI voice WebSocket
โ โโโ requirements.txt # Python dependencies
โ โโโ .env.example # Environment template
โ
โโโ terna/
โ โโโ src/
โ โ โโโ components/ # Reusable React components
โ โ โโโ pages/ # Admin pages
โ โ โโโ locales/ # Translation files (en/hi/mr)
โ โ โโโ App.jsx # Main homepage
โ โ โโโ Doctor.jsx # Doctor directory
โ โ โโโ Medicine.jsx # Medicine store
โ โ โโโ Cart.jsx # Shopping cart
โ โ โโโ MyOrders.jsx # Order history
โ โ โโโ AskAI.jsx # AI chat interface
โ โ โโโ VoiceAgent.jsx # Voice consultation
โ โ โโโ firebase.js # Firebase config
โ โ
โ โโโ public/
โ โ โโโ sw.js # Service worker
โ โโโ package.json
โ โโโ vite.config.js
โ
โโโ .gitignore
โโโ README.md
- Sign up at openrouter.ai
- Get API key from Keys page
- Add to
backend/.env:OPENROUTER_API_KEY=sk-or-v1-...
- Get API key from Google AI Studio
- Add to
backend/.env:GEMINI_API_KEY=...
- Sign up at serper.dev
- Get API key from dashboard
- Add to
backend/.env:SERPER_API_KEY=...
- Create project at Firebase Console
- Enable Authentication (Email/Password, Google)
- Create Firestore Database
- Update
terna/src/firebase.jswith your config
- React 19 + Vite 7 - Fast modern development
- React Router 7 - Client-side routing
- Firebase - Authentication & Firestore database
- i18n - Multilingual support
- Flask 3 - REST API server
- FastAPI - WebSocket voice agent
- LangGraph - AI workflow orchestration
- OpenRouter - Multi-model AI access
- Gemini - Voice agent AI
- Git - Version control
- npm/pip - Package management
- Service Worker - Offline support
cd terna
npm run build
npm run preview # Test production build# Use production WSGI server
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app:appโ ๏ธ Never commit.envfiles - Already excluded in.gitignoreโ ๏ธ Firebase config infirebase.jsis safe - Client-side keys are meant to be public- โ
API keys use environment variables - Keep
.envfiles private - โ Role-based access control - Admin routes protected
- Connect GitHub repository
- Set build command:
cd terna && npm run build - Set publish directory:
terna/dist - Add environment variables if needed
- Connect GitHub repository
- Select
backendfolder - Add environment variables (API keys)
- Deploy!
- Fork repository
- Create feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Open Pull Request
This project is for educational purposes. Modify as needed.
For issues or questions, please open a GitHub issue.
- OpenRouter for AI model access
- Firebase for backend infrastructure
- React & Vite communities
- Rural healthcare workers inspiration
Built with โค๏ธ for rural healthcare accessibility