Inspiration

In my house, like most homes in Tanzania, medicine labels are in English medical-speak. My family reads them in their second or third language. I watched people just... guess. Take the pill, hope it's right. Pharmacists will tell you what that leads to: wrong doses, bad combinations, or taking the same drug twice because it comes under two brand names. I kept thinking — the phone in your pocket can read anything. Why can't it read this for you?

What it does

You point your camera at any medicine box or pill sheet. MedLens reads it and tells you, in normal words: what this is, how people take it, what to watch out for, and when to stop and see a doctor. It speaks 7 languages, including Swahili, Arabic and Hindi.

My favorite part: MedLens remembers what you take. Every new scan gets checked against your list. Scan aspirin while ibuprofen is saved and you get a CAUTION card that explains the bleeding risk in one sentence. It even catches when two different brands secretly contain the same drug — that's how accidental overdoses happen. You can also set your dose and daily reminders for each medicine.

How I built it

It's one HTML file. No frameworks, no build tools — you can read the whole app in one sitting. Gemini 2.5 Flash does the reading (photos get shrunk on your phone first, so scans take about 3 seconds, and they're never stored). The name then gets checked against openFDA, the official US label database — on a match you see quotes from the real label, kept clearly separate from the AI text. A small Cloudflare Worker hosts it and keeps the AI key on the server, so anyone can try it without signing up for anything.

Challenges I ran into

Honestly? Stopping the AI from being confidently wrong. It would happily invent doses for prescription drugs, so I made it refuse — prescription medicines get "take it exactly as your doctor prescribed" and nothing else. Loose pills without packaging force a low-confidence warning. My interaction checker had a scary bug where the word "sodium" made two totally unrelated medicines look like an overdose risk — took me a while to realize I had to match whole ingredient names, not pieces. And my "VERIFIED" badge was overpromising, so I renamed it MATCHED, because that's what it actually proves.

Accomplishments I'm proud of

Someone with zero setup — no account, no API key — can open my link and scan a real medicine in about 10 seconds. The first real thing I ever scanned was a dental gel from our bathroom, a brand that doesn't even exist in the US, and MedLens got it right and was honest about what it couldn't verify.

What I learned

Let the AI read, but never let it decide. Every safety feature in MedLens is plain code I can point to and test — the AI is just the eyes. Also: building a health app is mostly deciding what your app must refuse to do. That surprised me.

What's next for MedLens

An offline pack of common medicines so it works with no internet at all, proper right-to-left layout for Arabic, getting a real pharmacist to review and grow my interaction table, and label databases beyond the US one.

Built With

Share this project:

Updates

Submission history