case study · Health · Hackathon winner · Pharmaholics Hackathon

PharmaCycle.AI

Near-expiry medicine, redistributed before it’s wasted.

Role
Full-stack engineering
Timeline
Jun 2026
Status
Live
Links
live ↗code ↗
Stack
Next.js 16Tailwind v4ExpressPrismaPostgreSQL (Neon)GeminiTesseract.jsCloudinary

A peer-to-peer exchange where Nigerian pharmacies list and trade near-expiry stock, so medicine reaches patients instead of the bin, and scarcity in one pharmacy is solved by surplus in another.

01

The problem

Community pharmacies lose money on stock that expires on their shelves, while a pharmacy down the road runs out of the same drug. There is no simple, trusted way for them to find each other and swap.

Who it’s for

Community pharmacies and healthcare facilities in Nigeria, plus consumers looking for scarce medicine.

02

Goals & constraints

Goals

  • Listing stock should take a photo, not a form.
  • Surface what’s about to expire before it does.
  • Speak the language of Nigerian regulation (NAFDAC numbers, not generic batch codes).

Constraints

  • Pharmacists are busy and on the counter, not at a desk
  • Network and API limits are real in local pharmacies

03

Approach

  1. 1.

    Camera-first listing

    Photograph the packaging and the app auto-fills name, strength, form and category. A QR and barcode mode uses the browser’s native BarcodeDetector and beeps on a match.

  2. 2.

    Two OCR engines

    Gemini handles semantic recognition; Tesseract.js runs in the browser as a fallback when the network or API limits fail.

  3. 3.

    Insights, not just inventory

    Charts flag near-expiry, low-stock and out-of-stock items, with AI notes on demand shifts like malaria-season spikes.

04

Architecture

A Next.js frontend and an Express backend, deployed separately.

  1. 01Next.js app (camera, scanner, dashboards)
  2. 02Express REST API with JWT auth (listings, transfers, analytics)
  3. 03Prisma → Neon Postgres, with fail-soft reconnects and pooling
  4. 04Cloudinary + Multer for images

05

Key decisions

NAFDAC-native validation

Using regional regulatory numbers made the product feel built for Nigerian pharmacies, and it’s what pharmacists actually look for on a pack.

Fail soft everywhere

OCR falls back to the browser, the database client reconnects and returns a clean 503, and uploads are capped at 5 MB.

!

Challenges

Reading real packaging

Glare, curved boxes and tiny print. Two engines and an editable preview before saving made it workable.

✓

Outcome & lessons

  • 2nd place at the Pharmaholics Hackathon.
  • Live demo with prefilled pharmacy and consumer accounts.

What I learned

  • Domain vocabulary is a feature.
  • Browser APIs (camera, BarcodeDetector, Web Audio) go further than people think.

What’s next

  • Verified pharmacy onboarding
  • Transfer logistics between nearby pharmacies
next projectWhisperLag→