Inspiration

Every month, almost half of Americans take a prescription drugs this month, but hardly anybody is aware of the effects of the drug inside them. Most medicines work by changing a protein, and many of those proteins have been mapped atom by atom in current databases through 3D models. I wanted to streamline this accessibility for everyone, starting from the medicine box in their cabinet.

What it does

Search a medicine or scan the UPC barcode on its box. MoleculeLens shows the protein the drug acts on in an interactive 3D model, with the drug glowing in its pocket where a drug-bound structure exists. Three plain-language cards explain what the protein does, what the drug changes, and why that helps and causes side effects in the user. You can also save your medicines to a virtual cabinet. If two medicines within the cabinet act on the same protein, you get a warning and a suggestion to ask your pharmacist about it. Study mode turns your cabinet, or all 81 medicines, into flashcards and quizzes.

How we built it

This was built using Expo SDK 57 and TypeScript in Expo Go. A generator script takes each medicine to ChEMBL for its target, UniProt for the protein's facts, and RCSB PDB for a drug-bound structure, falling back to AlphaFold. It writes a bundled hero list and a verification report I reviewed row by row. The 3D view is 3Dmol.js inside a WebView. Barcodes go UPC → NDC → openFDA, with RxNorm as a fallback. The AI never picks the protein. An optional Cloudflare Worker that asks Gemini to rephrase verified facts is built and tested, but not deployed due to errors during project creation in the site.

RevenueCat

The free mode includes unlimited lookups, 3D, the cards, a 3-medicine cabinet and every safety warning. Safety is never paywalled (always free). Lens Pro (monthly or yearly, 7-day free trial) unlocks an unlimited cabinet, side-effect and metabolism deep dives, and a shareable "how my medicines work" sheet. Study Pack is a one-time purchase for flashcards and quizzes. Everything runs on RevenueCat's Test Store inside Expo Go, with my own paywall screen. Expo Go never fires the customer-info listener, so the app re-fetches entitlements after every purchase.

Challenges we ran into

  • 3D in Expo Go: No native modules, so the viewer is 3Dmol.js in a WebView.
  • The NDC hidden in a UPC: A US drug barcode contains a 10-digit NDC, but the digits can split three ways. The app tries all three against openFDA, then RxNorm.
  • Salt and ester forms: ChEMBL often stores the mechanism on "atorvastatin calcium", not atorvastatin, and on fluticasone propionate rather than fluticasone. The generator follows parent links and seed overrides.
  • Honest fallbacks: Mouse structures, debated mechanisms, germ targets, the bacterial ribosome and ingredients with no protein target each needed their own truthful screen instead of a forced answer.

Accomplishments that we're proud of

  • 81 medicines, each traced to a database record.
  • 11 real drug-bound structures.
  • Safety warnings that are free for everyone.
  • A report that shows every flag instead of hiding it.

What we learned

Biology databases disagree about names, species and what counts as a target, so it became very important to check the actual data instead of just the code.

What's next for MoleculeLens Rx

  • Live ChEMBL lookup for any medicine
  • Reading ingredients from a label photo
  • Deploying the Worker
  • More hand-written explanations

Safety Statement

MoleculeLens Rx is educational only. It gives no prescribed doses or medical advice, and every warning includes "Ask your pharmacist". Animal structures are labelled to alert the viewer they are not looking at a human structure. Never change a prescribed medicine based on advice from MoleculeLens Rx without asking a pharmacist or doctor.

Built With

Share this project:

Updates

Submission history