Multilingual symptom checker with AI health assistant, mental wellness tools, and GPS-based facility finder โ in Bengali, Hindi & English. Works offline.
๐ Live App: https://swahealthy-1.onrender.com
- What is SwaHealthy?
- โญ Quick Stats
- Features
- ๐ฌ Demo & Screenshots
- Tech Stack
- Run Locally
- Project Structure
- API Endpoints
- Supported Languages
- Contributing
- License
SwaHealthy is a multilingual, offline-capable Progressive Web App (PWA) that helps rural and semi-urban residents in West Bengal check their symptoms, receive first-aid guidance, and find the nearest government health facility โ all in their preferred language.
An independent project designed and built by Pratyush.
| Feature | Count |
|---|---|
| ๐ฅ Health Conditions | 20+ |
| ๐ Symptoms Database | 40+ |
| ๐บ๏ธ West Bengal Facilities | 10+ |
| ๐จโโ๏ธ Sample Doctors | 5+ |
| ๐ Languages Supported | 3 (EN, BN, HI) |
| ๐ฑ Responsive Design | Mobile-First |
| โก Offline Capability | Full PWA Support |
- Symptom Checker โ Select symptoms by body area; rule-based engine matches 20+ conditions with weighted scoring
- Severity Classification โ Color-coded results: ๐ข Low / ๐ Medium / ๐ด High
- AI Health Assistant โ Groq-powered Llama 3 chatbot answers health questions in real time
- Photo Analysis โ Upload images of skin conditions, rashes, or wounds for AI-powered visual assessment via OpenRouter
- Doctor Appointments โ Browse specialists, check availability, and book consultation slots
- Mental Wellness โ PHQ-9 and GAD-7 assessments, mood tracking, journaling, and crisis detection
- Facility Finder โ GPS-based map showing nearest PHCs, hospitals & Jan Aushadhi stores (Haversine distance)
- Multilingual โ Full support for English, Bengali (เฆฌเฆพเฆเฆฒเฆพ), and Hindi (เคนเคฟเคเคฆเฅ)
- Offline PWA โ Works without internet after first load via Service Worker caching
- Session History โ Last 10 checks stored locally; shareable summary for doctor visits
- Emergency SOS โ One-tap access to 108 Ambulance, 100 Police, 112, and 1091 Women Helpline
- User Profiles โ Google OAuth login with age/gender personalisation
Here's a visual walkthrough of SwaHealthy on mobile:
All screenshots showcase the app's key features:
- โ Loading & Splash screen
- โ Home with personalized greeting & symptom selection
- โ AI-powered diagnosis results with first-aid guidance
- โ Duration tracking for symptom monitoring
- โ Emergency SOS contacts (108, 100, 112, 1091)
- โ GPS-based facility finder for hospitals & Jan Aushadhi
- โ Mental wellness with mood tracking & journaling
- โ AI health assistant (MindCare) for symptom queries
- โ AI chat interface for health conversations
- โ Dedicated assistant page
- โ Doctor appointment booking system
| Layer | Technology |
|---|---|
| Backend | Python 3.10+ + Flask |
| Database | SQLite |
| Frontend | HTML5 + CSS3 + Vanilla JS |
| Maps | Leaflet.js + OpenStreetMap |
| AI Assistant | Groq API (Llama 3) |
| Photo Analysis | OpenRouter API (vision model) |
| Authentication | Google OAuth + Flask-Login |
| Offline | PWA Service Worker |
| Hosting | Render.com |
# 1. Clone the repository
git clone https://github.com/pauldev-hub/swahealthy.git
cd swahealthy/swahealthy
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the app
python run.pyThen open your browser at http://localhost:5000
On first run, the database is automatically created and seeded with 40 symptoms, 20 conditions, 10 West Bengal facilities, and 5 sample doctors.
swahealthy/
โโโ run.py # App entry point
โโโ config.py # Flask configuration
โโโ requirements.txt
โโโ backend/
โ โโโ routes/
โ โ โโโ main.py # Core routes (diagnosis, facilities, history)
โ โ โโโ auth.py # Google OAuth login/logout
โ โ โโโ appointments.py # Doctor booking endpoints
โ โโโ models/
โ โ โโโ schema.py # Database schema
โ โ โโโ helpers.py # Haversine, DB utilities
โ โ โโโ seed.py # Symptoms, conditions, doctors seed data
โ โโโ services/
โ โโโ engine.py # Rule-based diagnosis engine
โ โโโ photo_analyzer.py # OpenRouter vision integration
โโโ frontend/
โโโ templates/
โ โโโ base.html # Shared layout (nav, SOS, AI sheet)
โ โโโ pages/
โ โโโ index.html # Symptom selection
โ โโโ results.html # Diagnosis results + facility map
โ โโโ history.html # Past diagnoses
โ โโโ appointments.html # Doctor booking UI
โ โโโ ai_analysis.html # Photo upload + AI analysis
โ โโโ wellness.html # Mental health assessments
โ โโโ profile.html # User profile
โโโ static/
โโโ css/style.css
โโโ js/app.js
โโโ js/translations.js # i18n strings (EN/BN/HI)
โโโ pwa/
โโโ manifest.json
โโโ service-worker.js
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Home โ symptom selection |
/diagnose |
POST | Run symptom diagnosis |
/results |
GET | Diagnosis results page |
/facilities |
GET | Nearby hospitals + Jan Aushadhi |
/analyze-photo |
POST | AI photo analysis |
/chat |
POST | AI health assistant |
/history |
GET, DELETE | User diagnosis history |
/appointments |
GET | Browse doctors |
/book-appointment |
POST | Book a slot |
/wellness |
GET | Mental wellness page |
/wellness/phq9 |
POST | PHQ-9 depression assessment |
/wellness/gad7 |
POST | GAD-7 anxiety assessment |
/profile |
GET, POST | User profile |
/login |
GET | Google OAuth login |
/logout |
GET | Logout |
| Code | Language |
|---|---|
en |
English (default) |
bn |
เฆฌเฆพเฆเฆฒเฆพ โ Bengali |
hi |
เคนเคฟเคเคฆเฅ โ Hindi |
Language preference is stored in localStorage and applied to all UI labels, symptom names, condition names, and first-aid steps.
SwaHealthy is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified health provider for medical concerns.
- National Health Portal India
- WHO First Aid Guidelines
- Government of West Bengal PHC Directory
- Flask Documentation
- Leaflet.js
- Groq API
- OpenRouter
We welcome contributions! Whether it's bug fixes, new features, translations, or documentation improvements, your help makes SwaHealthy better.
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and test thoroughly
- Commit with clear messages:
git commit -m "Add feature: description" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request with a description of your changes
- ๐ Translations โ Add more languages or improve existing ones
- ๐ Bug Reports โ Report issues you find
- โจ Feature Requests โ Suggest improvements
- ๐ฑ UI/UX โ Design improvements and responsive fixes
- ๐ Documentation โ Help improve README and comments
- ๐งช Testing โ Write unit tests and integration tests
SwaHealthy is licensed under the MIT License โ see the LICENSE file for details.
You are free to use, modify, and distribute this project, as long as you include the original license and copyright notice.
- Pratyush โ Creator & Developer
- Groq โ AI Assistant API
- OpenRouter โ Vision Model Integration
- OpenStreetMap & Leaflet โ Mapping Services
- West Bengal Health Department โ Public Health Data
For questions, feedback, or bug reports, please open an issue on GitHub.
Created with โค๏ธ for rural health in West Bengal










