# Uganda VHT Co-Pilot 🇺🇬
> **AI-Enabled Community Health Tool** — Simplifying diagnostics, detecting malnutrition via computer vision, and delivering real-time outbreak alerts across Uganda's districts.
---
## 🚀 Quick Start
```bash
# Install dev server
npm install
# Run locally (opens at
localhost)
npm run dev
```
## 🔑 Setup (First Time)
1. **Get a free Groq API Key** → console.groq.com
2. Open the app → enter your key in the popup modal
3. Or click **"Use Demo Mode"** to explore without a key
---
## 📁 Project Structure
```
VHTcopilot/
├── public/
│ ├── index.html ← Main PWA app
│ ├── style.css ← Blue/white design system
│ ├── app.js ← All JS logic (Groq, CV, Map, Alerts)
│ ├── sw.js ← Service worker (offline)
│ └── manifest.json ← PWA installable manifest
├── firebase.json ← Firebase Hosting config
├── firestore.rules ← Firestore security rules
├── .firebaserc ← Firebase project alias
└── package.json
```
---
## 🧠 AI Features
| Feature | Technology | Status |
|---------|-----------|--------|
| Symptom Diagnostics | Groq API · LLaMA 3.3 70B | ✅ Live |
| Malnutrition Vision | TF.js + Vision API (CV Pipeline) | 🔬 Prototype |
| Outbreak Alerts | Firebase + Groq summaries | ✅ Demo |
| District Map | Leaflet.js + OpenStreetMap | ✅ Live |
| Offline Mode | Service Worker PWA | ✅ Live |
---
## 🖥️ Deploy to Firebase Hosting
```bash
# Install Firebase CLI
npm install -g firebase-tools
# Login
firebase login
# Initialize (first time only)
firebase init
# Deploy
npm run deploy
# → Live at:
vht-copilot-uganda.web.app
```
---
## 💻 Computer Vision Pipeline
```
Camera/Photo → MediaPipe Body Detection → MobileNetV2 Classification
→ Google Vision API Validation → Groq AI Recommendation
```
**MUAC Thresholds (WHO):**
- 🔴 12.5 cm → Normal — Monthly monitoring
---
## 🚨 Outbreak Alert Thresholds
| Disease | Alert Trigger |
|---------|--------------|
| Malaria | 15+ cases / …