Safety-first medical first-aid guidance for rural India
Firebase Auth • Encrypted API Keys • Rule-Based Triage • Hindi/Bhojpuri Voice
| Feature | Description |
|---|---|
| 🔐 Firebase Auth | Email/Password + Google login |
| 🔑 Encrypted API Keys | HMAC-signed, 7-day expiry, per-user limits |
| 🩺 Medical Triage | Rule-based symptom detection (zero AI hallucination) |
| 🌡️ Fever Check | Temperature classification with protocol-based steps |
| 🏥 Hospital Finder | Leaflet.js interactive maps for Bihar hospitals |
| 🎤 Voice I/O | Hindi, English, Bhojpuri speech recognition + TTS |
| 👨💼 Admin Panel | User management, usage tracking, key control |
| 📄 PDF Ingestion | Auto-extract medical data from uploaded PDFs |
| 💬 Free Tier | 3 free chats without login, then login required |
| 📖 API Documentation | Complete docs + Swagger/ReDoc |
# Clone
git clone https://github.com/amankumarhappy/mediobot.git
cd mediobot
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .env # Edit with your Firebase config
# Run
python app.py
# → http://localhost:8000- Sign up at the web UI
- Go to API Keys page
- Click Generate Key → Copy your
mb_xxxxxkey - Use in requests:
curl -X POST http://localhost:8000/fever \
-H "x-api-key: mb_your_key_here" \
-H "Content-Type: application/json" \
-d '{"temp": 102}'- Keys start with
mb_prefix - Expire after 7 days
- Only one active key per user
- Usage is counted and rate-limited
- HMAC-signed — cannot be forged
| Method | Endpoint | Auth | Description |
|---|---|---|---|
POST |
/auth/login |
Bearer | Login with Firebase token |
POST |
/auth/generate-key |
Bearer | Generate API key |
POST |
/fever |
API Key | Fever classification |
POST |
/triage |
API Key | Smart symptom triage |
POST |
/hospitals |
API Key | Hospital lookup |
POST |
/condition |
API Key | Condition lookup |
GET |
/protocols |
API Key | List all protocols |
POST |
/chat/free |
None | Free chat (3 limit) |
GET |
/admin/users |
Admin | User management |
mediobot/
├── app.py # FastAPI backend (auth, triage, admin)
├── database.py # SQLite + HMAC API key management
├── protocol.json # Medical protocol database
├── requirements.txt # Python dependencies
├── .env # Environment config (not in git)
├── static/
│ ├── index.html # Premium SPA UI
│ ├── style.css # Design system
│ ├── script.js # Firebase Auth + Chat + Admin
│ └── LOGO-removebg-preview.png
└── mediobot.db # SQLite database (auto-created)
Mediobot is NOT a diagnostic tool. It provides first-aid guidance based on verified protocols from WHO, MoHFW India, and AIIMS. Always consult a doctor for medical decisions. In emergencies, call 108 first.
NexaForce — Aman Kumar, Bihar, India 🇮🇳
Made with ❤️ for rural India
