SafeDose
Trust and Transparency
The problem SafeDose solves
Counterfeit medicines kill over 1 million people every year globally. In India alone, the WHO estimates that 25% of medicines sold are substandard or falsified. A rural farmer buying a ₹10 paracetamol has no way to know if it's genuine or a sugar pill with a fake label. Existing solutions are either too expensive (NFC tags), too basic (single-layer batch lookup), or inaccessible to non-English speakers.
SafeDose solves this by giving every consumer the power to verify any medicine in seconds using just their phone camera. Our 6-layer verification engine checks batch existence, cryptographic hash integrity, QR clone detection, geographic diversion, expiry validation, and supply chain completeness to generate a trust score from 0 to 100. No app download needed. No special hardware. Just scan and know.
For the 70% of India that doesn't speak English, SafeDose includes a voice AI assistant powered by Sarvam AI that speaks in 10 Indian languages including Hindi, Tamil, Bengali, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, and Odia. Users can also report counterfeit medicines through voice in their native language.
Challenges we ran into
Challenges We Ran Into
QR Code Detection from Real-World Photos Our QR scanner worked perfectly with clean, screen-displayed QR codes but consistently failed when users uploaded photos of real medicine packaging. The QR codes in photos were often small within large high-resolution images, had poor lighting, or low contrast. We solved this by implementing multi-scale image processing that attempts detection at multiple zoom levels, along with contrast enhancement and inverted color attempts to handle varied lighting conditions.
Web Speech API Inconsistencies on Mobile The browser's Speech Recognition API behaved very differently across devices. On mobile, interim results were being concatenated with final results, causing words to repeat in the transcript (e.g., "दवाईदवाईदवाई एक्सपायर" instead of "दवाई एक्सपायर"). We fixed this by properly separating isFinal results from interim results and only displaying the combined output. Additionally, the microphone needed time to initialize, causing the first word to be cut off. We resolved this by waiting for the onaudiostart event before prompting the user to speak.
Sarvam AI Model Migration (Bulbul v2 to v3) Mid-development, we upgraded from Sarvam AI's Bulbul v2 to v3 for better voice quality. However, v3 had different API parameters. The pitch and loudness parameters from v2 were no longer supported, the speaker voice names changed, and the default sample rate was different. Our TTS calls silently failed until we read the documentation carefully and updated all parameters. We also had to balance audio quality (higher sample rate) against loading speed for a smooth demo experience.
Cryptographic Hash Synchronization Our verification engine uses SHA-256 hashes to validate medicine authenticity. Every time we re-seeded the database for testing, new hashes were generated. But the fallback QR mapping in our scan page still referenced old hashes from previous seed runs, causing hash validation to fail even for genuine medicines. This taught us the importance of keeping all references in sync whenever seed data changes.
Audio Echo When Switching Languages When a user changed the voice language while the AI was still speaking in the previous language, both audio streams would play simultaneously, creating an echo effect. We solved this by fully destroying the previous Audio object (pause, clear source, force release) before creating a new one, and adding a stale-request guard so responses from old fetch calls are discarded if the language changed during the API round-trip.
Multilingual Voice Accessibility Building voice AI that works in 10 Indian languages was challenging beyond just translation. Each language has different script rendering, different speech patterns, and different TTS pronunciation characteristics. We had to test each language individually and ensure the welcome prompts, issue prompts, and success messages sounded natural when spoken by the TTS engine, not just when read as text.
Figma to Responsive Code Translating our designer's Figma mockup for the hero section into responsive, pixel-perfect code required multiple iterations. The layered pill and bottle assets needed absolute positioning with a unified scale variable so we could adjust the entire composition with a single constant during the live demo. We also had to handle overflow visibility so assets could extend beyond their container without being clipped.
Tracks Applied (4)
Gemini
Major League Hacking
MongoDB
Major League Hacking
Sarvam.ai
Sarvam.ai
Open Innovation
HackPrix
Technologies used

