A robust, citizen-facing verification platform providing real-time anti-counterfeit checks and regulatory monitoring for the Indian healthcare ecosystem.
-
📜 License
- 🩺 SahiDawa — सही दवा
- 🚨 The Problem We're Solving
- ✨ What SahiDawa Does
- 🏗️ Architecture
- 🛠️ Tech Stack
- 🗺️ Roadmap & Phases
- 🚀 Getting Started
- 📁 Project Structure
- 🤝 Contributing
- 🌏 Supported Languages
- 📊 Data Sources (All Free & Public)
- 💬 Community
- 📜 License
- 👥 Contributors
- 🙏 Acknowledgements
- ❤️ Why Open Source?
India's healthcare supply chain faces significant infrastructural challenges that compromise patient safety:
| Systemic Challenge | Affected Population | Current Gap |
|---|---|---|
| 12–25% of medical circulation is substandard or counterfeit | 1.4 billion citizens | Lack of accessible, citizen-facing verification tools |
| 65% of the population resides in underserved rural districts | 900M+ individuals | Telemedicine platforms often require high-bandwidth connections |
| Linguistic diversity (22 official scheduled languages) | 500M+ non-Hindi speakers | Medical documentation is disproportionately English/Hindi |
SahiDawa addresses these gaps by providing an open-source, multilingual, and offline-capable verification layer that connects end-consumers directly to the Central Drugs Standard Control Organisation (CDSCO) registry.
SahiDawa operates as a decentralized counterfeit intelligence network, executing real-time pharmaceutical validation and telemetry.
- Scan & Verify: Cross-reference physical product batches against the CDSCO registry.
- Risk Triage: Flag active regulatory recalls and Look-Alike Sound-Alike (LASA) risks.
- Crowdsourced Telemetry: Aggregate consumer reports of suspicious pharmaceutical products.
- Geospatial Analytics: Map counterfeit clusters at the district level for regulatory visibility.
- Autonomous Alerts: Dispatch localized safety notifications when systemic risks are detected.
| Subsystem | Capability Description | Implementation Status |
|---|---|---|
| Verification Engine | Client-side barcode/QR scanning linked to CDSCO registry | ✅ Complete |
| Visual Validation | Cloudinary-accelerated packaging structural comparison | ✅ Complete |
| Multilingual Voice Triage | Speech-to-text processing across 22 regional languages | ✅ Complete |
| Geospatial Infrastructure | PostGIS-backed routing for state pharmacies and ASHA workers | ✅ Complete |
| Telemetry Dashboard | District-level aggregation of counterfeit incident reports | ✅ Complete |
| Regulatory Agent | Background worker continuously parsing CDSCO recall notices | ✅ Complete |
| Offline Resilience | Service worker architecture for zero-connectivity environments | ✅ Complete |
Major architectural decisions (Turborepo, Supabase, Redis, LangGraph, Next.js, and more) are documented as Architecture Decision Records (ADRs). Start with the ADR index and the foundational ADR 0006 — Record Architecture Decisions for the "why" behind our tech stack.
flowchart TD
A[Rural Citizen / Patient] -->|Scan Barcode / Voice Input| B[Next.js PWA Client]
B -->|API Request| C[Node.js Express API]
C <-->|Verify Data| D[(Supabase PostgreSQL)]
C <-->|Cache| E[(Redis Cache)]
B -->|Media Uploads| F[Python FastAPI Service]
F -->|Process Voice| G[Whisper ASR]
F -->|Analyze Image| H[OpenCV / TF Lite]
F -->|Medical Triage| I[Gemini / Groq / LangChain]
I --> C
J[LangChain CDSCO Poller] -->|Fetch Recalls| K[CDSCO Portal]
J -->|Update Alerts| D
- Next.js 16 — React 19 framework with App Router + SSR
- Tailwind CSS 4.0 — High-performance utility-first CSS
- shadcn/ui — UI components
- Workbox — PWA offline caching
- @zxing/browser — In-browser barcode/QR scanning
- Leaflet.js + OpenStreetMap — Maps (free, no API key)
- next-intl — i18n for 22 Indian languages
- Node.js 22 + Express 5.0 + TypeScript — API server
- Redis (Upstash free tier) — Drug lookup caching
- FastAPI + Python — ML microservice
- OpenCV Python — Server-side image preprocessing
- TensorFlow Lite — Fast packaging/logo classifier
- Whisper (Faster-Whisper) — Voice input, 22 languages
- Gemini 2.0 Flash + Groq LLaMA 3.1 — Dual-LLM for safety profiles & medical RAG
- LangChain / LangGraph — RAG pipeline + agent orchestration
- PostgreSQL + PostGIS — Primary DB + geo queries
- pgvector — Vector search for RAG
- Supabase — Managed Postgres (free tier for dev)
- Cloudinary — Medicine photo storage + image analysis
- Docker + Docker Compose — Containerization
- GitHub Actions — CI/CD
- Vercel — Frontend deployment (free)
- Railway — Backend deployment (free tier)
- Project scaffolding (Next.js + TypeScript + Tailwind)
- CDSCO drug database scraper + PostgreSQL schema
- Barcode/QR scanner UI (ZXing)
- Medicine lookup REST API
- Supabase integration
- GitHub Actions CI pipeline
- English UI with i18n setup
- PostGIS pharmacy + ASHA worker map (Leaflet.js)
- i18n system — 22 Indian language JSON files
- Cloudinary photo upload integration
- Offline PWA (Workbox cache strategies)
- FastAPI ML microservice scaffolding
- Redis caching for drug lookups
- OpenCV/TFLite packaging geometry detection
- TF Lite medicine image classifier
- Whisper ASR voice input (22 languages)
- Gemini + Groq dual-LLM health assistant
- CDSCO drug alert monitoring agent (LangGraph)
- Counterfeit heatmap + Recharts visualization
- Push notification system for district alerts
- WCAG 2.1 accessibility audit
- Lighthouse CI (target 90+ score)
- Docker Compose for self-hosting
- OpenAPI/Swagger documentation
- ABHA health card integration (optional)
- Public launch
- Database query optimization and scaling
- Enhanced security hardening and auditing
- Advanced error tracking and telemetry integration
- Continued language translation and localization
| Software | Minimum Version |
|---|---|
| Node.js | 20+ |
| Python | 3.10+ |
| Docker (optional) | 24+ |
git clone https://github.com/RatLoopz/sahidawa-india.git
cd sahidawa-india# Copy example environment files for both frontend and backend
cp .env.example apps/web/.env.local
cp .env.example apps/api/.envUpdate the environment variables in both files before running the project.
Install all dependencies for the entire monorepo workspaces from the root directory:
npm installStart all services (Next.js web app, Express API) concurrently using Turborepo:
npm run dev- Frontend: http://localhost:3000
- API Server: http://localhost:4000
- API Reference: http://localhost:4000/api/docs
| Command | Description |
|---|---|
npm install |
Install all workspace dependencies |
npm run dev |
Start development servers concurrently |
npm run build |
Build all projects for production |
npm run lint |
Run lint checks across workspaces |
If you encounter No matching version found errors while running npm install, it may be caused by the canary package versions used in this project.
Try running:
npm install --legacy-peer-depsor:
npm install --forceIf the issue still persists, you may temporarily downgrade package versions locally to get the project running on your machine.
⚠️ Important: Do not commit modifiedpackage.jsonorpackage-lock.jsonfiles created during local downgrades. Revert those changes before pushing your PR.
# Clone and start everything
git clone https://github.com/RatLoopz/sahidawa-india.git
cd sahidawa-india
cp .env.example .env
# Edit .env with your keys
docker compose up --build
# Frontend: http://localhost:3000
# API: http://localhost:4000
# ML service: http://localhost:8000
# API Docs: http://localhost:4000/api/docs# Ensure environment variables are set at the project root
cp .env.example .env
# Edit .env with your keys
# Start API Server
cd apps/api
npm install
npm run dev
# API Docs: http://localhost:4000/api/docsFor detailed setup instructions, see: ML Setup Guide
For local setup instructions, see: Local Setup Guide
For Docker setup instructions, see: Docker Setup Guide
For production deployment and environment variables, see: Deployment Setup Guide
Quick start:
cd apps/mlpython -m venv venv
source venv/bin/activatepython -m venv venv
.\venv\Scripts\Activate.ps1python -m venv venv
venv\Scripts\activate.batAfter activating the virtual environment, install the dependencies and start the service:
pip install -r requirements.txt
uvicorn main:app --reload --port 8000The repository is organized as a monorepo with separate applications for the frontend, backend, and machine learning services.
sahidawa-india/
├── apps/
│ ├── web/ # Next.js PWA frontend
│ │ ├── app/ # App Router pages
│ │ ├── components/ # Reusable UI components
│ │ ├── lib/ # Utilities, API clients
│ │ ├── messages/ # i18n JSON files (22 languages)
│ │ │ ├── en.json
│ │ │ ├── hi.json
│ │ │ ├── ta.json
│ │ │ └── ... # one file per language
│ │ └── public/ # Static assets
│ ├── api/ # Node.js + Express API
│ │ ├── src/
│ │ │ ├── routes/ # API route handlers
│ │ │ ├── services/ # Business logic
│ │ │ ├── middleware/ # Auth, rate limiting
│ │ │ └── db/ # Database models + migrations
│ │ └── tests/
│ └── ml/ # Python FastAPI ML service
│ ├── routers/ # ML API endpoints
│ ├── models/ # TF Lite models
│ ├── services/ # Whisper, OpenCV, LangChain
│ └── agent/ # CDSCO monitoring agent
├── packages/
│ └── shared/ # Shared TypeScript types
├── data/
│ └── seeds/ # CDSCO drug database seeds
├── docs/ # Project documentation
├── .github/
│ ├── workflows/ # GitHub Actions CI/CD
│ ├── ISSUE_TEMPLATE/ # Bug report, feature request templates
│ └── PULL_REQUEST_TEMPLATE.md
├── docker-compose.yml
├── docker-compose.prod.yml
└── README.md
We love contributions! SahiDawa is built entirely by the community.
👉 Read the CONTRIBUTING.md before submitting your first PR.
- Sync your fork with the latest
mainbranch. - Create a new feature branch for your changes.
- Follow the project's coding conventions.
- Run linting and tests before submitting.
- Update documentation if your changes affect usage.
To test performance audits on your local machine before pushing:
- Install the CLI globally:
npm install -g @lhci/cli - Build the web app:
cd apps/web && npm run build - Run the audit:
lhci autorun(insideapps/web)
This will start a local server, run Lighthouse tests against it, and report the scores directly in your terminal.
- Check open issues — look for
good-first-issuelabel - Comment on the issue saying you want to work on it
- Fork → branch → code → test → PR
- A maintainer will review within 24 hours
| Skill Level | What to pick |
|---|---|
| 🟢 Beginner | Language translations (messages/*.json), UI components, documentation, database seed data |
| 🟡 Intermediate | Barcode scanner, pharmacy map, Cloudinary integration, i18n wiring, API routes |
| 🔴 Advanced | Image classifier, Whisper ASR, LangChain RAG, CDSCO agent, PostGIS queries |
SahiDawa aims to support all 22 Indian scheduled languages. (We are just getting started! Help us translate.)
| Language | Status | Contributor |
|---|---|---|
| English | ✅ Complete | Core Team |
| Hindi (हिन्दी) | ✅ Complete | Community |
| Tamil (தமிழ்) | ✅ Complete | Community |
| Telugu (తెలుగు) | ✅ Complete | Community |
| Kannada (ಕನ್ನಡ) | ✅ Complete | Community |
| Malayalam (മലയാളം) | ✅ Complete | Community |
| Bengali (বাংলা) | ✅ Complete | Community |
| Gujarati (ગુજરાતી) | ✅ Complete | Community |
| Marathi (मराठी) | ✅ Complete | Community |
| Punjabi (ਪੰਜਾਬੀ) | ✅ Complete | Community |
| Odia (ଓଡ଼ିଆ) | ✅ Complete | Community |
| Assamese (অসমীয়া) | ✅ Complete | Community |
| Urdu (اردو) | ✅ Complete | Community |
| Sanskrit (संस्कृत) | ✅ Complete | Community |
| Maithili | ✅ Complete | Community |
| Kashmiri | ✅ Complete | Community |
| Konkani | ✅ Complete | Community |
| Sindhi | ✅ Complete | Community |
| Manipuri | ✅ Complete | Community |
| Dogri | 🔜 Open | — |
| Bodo | 🔜 Open | — |
| Santali | 🔜 Open | — |
| Source | Used For |
|---|---|
| CDSCO | Master medicine database — batch numbers, manufacturers, drug alerts |
| Jan Aushadhi Portal | Generic medicine store locations across India |
| PMJAY Hospital Locator | Ayushman Bharat empanelled hospitals |
| OpenStreetMap / Overpass API | Pharmacy locations, routing |
| NHP — National Health Portal | Drug monographs for RAG health assistant |
- Discord: Join SahiDawa Discord
- GitHub Discussions: Discuss ideas & questions
Yes. SahiDawa is completely free and open source.
Absolutely! You can contribute by improving documentation, translating content, testing features, reporting bugs, or suggesting enhancements.
Open a new issue using the Bug Report template available in this repository.
If you find SahiDawa useful, consider supporting the project by:
- ⭐ Starring the repository
- 🍴 Forking the project
- 🐞 Reporting bugs
- 💡 Suggesting new features
- 🤝 Contributing code or documentation
SahiDawa is licensed under the MIT License — free to use, modify, distribute, and deploy.
See LICENSE for full text.
Thank you to all the incredible people who have contributed to making SahiDawa a reality! 🙌
- CDSCO for the public drug database
- Google DeepMind & Groq for LLM infrastructure
- Cloudinary for media infrastructure
- Every contributor who believes healthcare is a right, not a privilege
SahiDawa is maintained as a public good. The platform operates independently to ensure transparent, uncompromised access to pharmaceutical safety data, free from commercial bias or paywalls.