Sahaay is a comprehensive healthcare companion and Smart Health Surveillance & Early Warning platform. It simplifies medical management, supports community health reporting, and helps detect and prevent water-borne disease outbreaks in vulnerable communities.
This project addresses the development of a Smart Health Surveillance and Early Warning System that can:
- Collect health data from local clinics, ASHA workers, and community volunteers via mobile apps or SMS.
- Use AI/ML models to detect patterns and predict potential outbreaks based on symptoms, water quality reports, and seasonal trends.
- Integrate with water testing kits or IoT sensors to monitor water source contamination (turbidity, pH, bacterial presence).
- Provide real-time alerts to district health officials and local governance bodies.
- Include a multilingual mobile interface for community reporting and awareness (including tribal languages).
- Offer dashboards for health departments to visualize hotspots, track interventions, and allocate resources.
| Requirement | Sahaay Feature |
|---|---|
| Collect health data from community | Community posts, health records, family health, water quality reporting |
| AI/ML outbreak prediction | Outbreak risk engine (symptoms + water quality + area aggregation); AI report analysis |
| Water quality integration | Water Quality page: manual test kit reporting (turbidity, pH, bacterial presence) |
| Alerts for officials | Outbreak Risk dashboard with risk levels by area; Alert schema for future push/email |
| Multilingual / tribal languages | Language selection: English, Hindi, Assamese (NER) |
| Dashboards for health depts | Outbreak Risk page: hotspots, risk by area, symptom and water-fail counts |
- AI Medical Report Analysis: Upload medical PDFs to get detailed summaries, extracted vitals, and dietary recommendations using Google Gemini AI.
- Outbreak Risk & Surveillance: AI-driven early warning by area using symptom and water quality data (last 14 days).
- Water Quality Reporting: Submit and view water source test results (manual kits/sensors): turbidity, pH, bacterial presence.
- Nearby Care Finder: Locate hospitals, clinics, and pharmacies near you with an interactive map interface.
- Health & Vitals Monitoring: Track essential health metrics like Blood Pressure, Glucose, Heart Rate, and more.
- Family Health Management: Manage health records and appointments for family members in one place.
- Community Support: Join specific groups (e.g., Diabetes Support, Cardiac Care) to share experiences and get advice.
- Multilingual: English, Hindi, Assamese for community and tribal language support.
- Secure Authentication: Robust user authentication system using JWT.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Database: MongoDB (Mongoose)
- AI Integration: Google Gemini (via
google-generative-aiSDK) - Maps: Google Maps JavaScript API
- PDF Processing:
pdf-parse,jspdf
Before you begin, ensure you have the following installed:
Run the app against a local MongoDB to avoid Atlas DNS/network issues (ENOTFOUND _mongodb._tcp.cluster0.mongodb.net).
-
Install and start MongoDB locally
- macOS (Homebrew):
brew tap mongodb/brew && brew install mongodb-community, thenbrew services start mongodb-community - Docker:
docker run -d -p 27017:27017 --name mongodb mongo:latest - Or use MongoDB Community Server for your OS.
- macOS (Homebrew):
-
Use env from the app directory Next.js loads
.envfrom themy-appdirectory (wherenext devruns). So you need a.envinsidemy-app:- Copy the example:
cp my-app/.env.example my-app/.env - If your
.envis at the repo root, copy it tomy-app/.envor createmy-app/.envwith at leastDB_URLandJWT_SECRET.
- Copy the example:
-
Set the database URL for local MongoDB In
my-app/.envset:DB_URL=mongodb://localhost:27017/sahaay JWT_SECRET=your_secure_jwt_secret_key
Add
GOOGLE_API_KEYand SMTP vars only if you need AI reports or email OTP. -
Run the dev server from
my-appcd my-app npm run devOpen http://localhost:3000 (or the port shown if 3000 is in use).
-
Clone the repository
git clone <repository_url> cd Sahaay
-
Install Dependencies
cd my-app npm install -
Environment Configuration Create a
.envfile in themy-appdirectory (seemy-app/.env.example). For local MongoDB use:DB_URL=mongodb://localhost:27017/sahaay JWT_SECRET=your_secure_jwt_secret_key
For Atlas use
DB_URL=mongodb+srv://<user>:<password>@cluster0.xxxxx.mongodb.net/sahaay. Optionally setGOOGLE_API_KEY,NEXT_PUBLIC_GOOGLE_API_KEY, and SMTP variables for AI and email. -
Run the Development Server
cd my-app npm run devThe application will be available at
http://localhost:3000(or another port if 3000 is busy).
Sahaay uses Behavior-Driven Development (BDD) with Cucumber for the surveillance and water quality API tests. Feature files are written in Gherkin (Given/When/Then).
| What’s tested | Location |
|---|---|
| Outbreak Risk API (all areas, by PIN, risk levels) | features/outbreak-risk.feature |
| Water Quality API (list, filter, submit, validation) | features/water-quality.feature |
| Step definitions | features/step_definitions/api.steps.js |
Run BDD tests (dev server must be running):
- Terminal 1 – start the app:
cd my-app npm run dev - Terminal 2 – run the tests (default:
http://localhost:3000):If the app runs on another port (e.g. 3002), set the base URL:cd my-app npm run test:bddBASE_URL=http://localhost:3002 npm run test:bdd
Expected result: 7 scenarios (7 passed), 33 steps (33 passed).
This is a hackathon project by dineshkorukonda @pavankarthikgaraga @nithinkumark