The Problem
A medicine can look completely legitimate and still be dangerous.
Substandard and falsified medicines remain a serious public-health problem, particularly in environments where informal medicine markets, limited connectivity, and difficult verification processes intersect.
Existing authentication methods can require users to scratch an authentication panel, enter a code, send an SMS, and wait for a response. Every additional step creates friction between a person and the information they need.
That led me to a simple question:
What if verifying medicine could be as simple as pointing a camera at it?
Inspiration
I built Credo around the idea that medicine authentication should be designed for the reality of its users, not for an ideal environment with perfect connectivity and unlimited technical resources.
I did not want to build another system where a user uploads an image to a server, waits for a cloud model, and then receives a result.
I wanted the critical verification process to happen directly on the device.
A smartphone should be able to look at medicine packaging, extract its identifying information, check that information locally, and produce a verdict even when the internet is unavailable.
That became the foundation of Credo.
The Solution
Credo is an Edge AI medical authenticity platform that combines on-device computer vision, offline verification, and regulatory intelligence.
The consumer-facing experience is intentionally simple.
A user points the scanner at a medicine package.
Credo uses Tesseract.js running through WebAssembly to perform OCR directly inside the browser. The application extracts identifying information such as the medicine's batch number without requiring the image to be uploaded to a cloud service.
Once the batch number is extracted, Credo checks it against a locally stored verification database using the browser's native IndexedDB API.
For example, when Credo identifies:
PA2128L
the application can match it against a known counterfeit alert and immediately return:
COUNTERFEIT DETECTED
A known-valid batch such as:
VALID123
can instead return:
AUTHENTIC
The important distinction is that the core verification path does not depend on an active internet connection.
Offline-First by Design
Offline capability is not an additional feature I added at the end.
It is part of Credo's architecture.
The application can keep verification data locally in the browser, allowing OCR and database matching to continue when connectivity disappears.
That creates a different architecture from a conventional cloud-first AI application:
Camera → Edge OCR → Local Database → Verdict
rather than:
Camera → Upload → Cloud AI → Server → Response
This reduces latency, reduces unnecessary data transmission, and makes the verification experience more resilient in low-connectivity environments.
The medicine image does not need to leave the device simply to determine whether an extracted batch number appears in a known counterfeit database.
From Verification to Intelligence
While solving the individual verification problem, I realized that every scan could represent something larger.
One counterfeit scan tells you about one medicine.
A large number of counterfeit scans can reveal where problems are occurring.
That led me to build the second part of Credo: the Intelligence Dashboard.
The verification application can send scan telemetry to a Python FastAPI backend, where events can be aggregated and visualized geographically.
The consumer experience answers:
“Is this medicine authentic?”
The intelligence layer asks:
“Where are counterfeit medicines appearing?”
The dashboard can surface counterfeit alerts, scan locations, timestamps, and emerging geographic clusters.
This creates a progression from:
Scan → Verify → Detect → Map → Investigate
The goal is not simply to identify individual counterfeit products, but to turn individual verification events into actionable intelligence for detecting potential counterfeit distribution patterns.
How I Built It
I deliberately chose a lightweight stack.
Frontend
- Vanilla JavaScript
- Semantic HTML5
- Native CSS
- Tesseract.js
- WebAssembly
- IndexedDB
Backend
- Python
- FastAPI
- SQLAlchemy
- SQLite
- Pydantic
I intentionally avoided React, Vue, and other frontend frameworks.
That decision was not simply about preference. Credo is designed around a constrained environment where unnecessary client-side overhead can work against the product's goals.
Using native browser technologies also gave me direct access to capabilities such as IndexedDB while keeping the frontend architecture small and transparent.
The Technical Challenge
The hardest part was not displaying a red or green result.
It was making the path from physical packaging → OCR → meaningful batch identifier → verification reliable enough to demonstrate.
Pharmaceutical packaging contains dense information, small fonts, reflections, multiple numbers, unusual character combinations, and visually similar characters.
OCR can confuse characters such as O and 0, or I and 1.
That meant I had to think beyond simply asking an OCR engine to “read everything.”
The verification flow needed to focus on extracting the information that actually matters for authentication and then matching that information against structured records.
I also had to design around the limitations of browser-based AI and offline storage while keeping the experience responsive enough to feel instantaneous.
What I Learned
Credo changed the way I think about AI systems.
Before building it, it was easy to think about AI primarily as a model: input goes to a model, the model produces an output, and the application displays the result.
Building an edge-first system made it clear that AI architecture is just as important as AI capability.
Where computation happens matters.
What data leaves the device matters.
What happens when the network disappears matters.
And in a safety-sensitive workflow, the interface communicating the result matters just as much as obtaining the result.
I also learned that constraints can produce better product decisions.
Instead of treating unreliable connectivity as something the application simply has to tolerate, I designed the core verification workflow so that it did not need connectivity in the first place.
The Hackathon Challenge
Building Credo during a hackathon meant making difficult tradeoffs.
There are many directions this project could go: stronger pharmaceutical image recognition, larger verification datasets, more sophisticated anomaly detection, stronger geospatial analytics, and deeper integration with regulatory infrastructure.
I could not build all of that in one hackathon.
So I focused on proving the most important idea end-to-end:
Can a browser perform edge OCR, verify a medicine locally while offline, produce an immediate verdict, and feed the resulting intelligence into a regulatory dashboard?
Credo demonstrates that architecture as a working prototype.
Why It Matters
Medicine authentication should not be a process that users avoid because it is inconvenient.
The critical question is not simply whether verification technology exists.
It is whether people can actually use it when they need it.
Credo reduces the interaction to its essential action:
Point. Scan. Verify.
At the same time, it creates a path from individual verification events to broader counterfeit intelligence.
For the person holding the medicine, Credo provides an immediate answer.
For regulators, the accumulated data can reveal patterns worth investigating.
That is the idea behind Credo:
Move verification to the edge. Turn verification events into intelligence. Protect people at scale.
What's Next for Credo
The next step is taking Credo from a hackathon prototype to a real-world medicine authentication network.
I want to expand its computer vision beyond OCR to analyze packaging features, security markings, holograms, and other visual signals of authenticity.
The offline database could become a continuously synchronized registry, allowing devices to receive updated counterfeit alerts whenever connectivity becomes available while keeping critical verification available offline.
With enough scan data, Credo could also detect counterfeit hotspots, recurring suspicious batches, and unusual geographic patterns, giving regulators earlier visibility into potential counterfeit distribution.
Longer term, I want to validate Credo through field testing with pharmacies, medicine vendors, healthcare workers, and regulatory stakeholders.
Today, Credo verifies a medicine. Next, it can help map the counterfeit medicine ecosystem.
Built With
- css
- fastapi
- indexeddb
- node.js
- python
- sqlalchemy
- sqlite
- tesseract.js

Log in or sign up for Devpost to join the conversation.