About MedShelf

Inspiration

MedShelf grew out of a practical problem I experienced while living away from home. Like many people, I originally relied on the medication features built into my phone to remind me when to take routine medicine. Those reminders were useful for individual doses, but they did not help me manage the larger problem: how much medicine I still had, what I needed to bring back to my school dorm, and what I would need to purchase the next time I returned home.

I tried solving this with an Excel spreadsheet. I recorded the medicines I owned, checked which ones were running low or expiring, and used the spreadsheet to plan what I needed to restock. It worked, but maintaining it became tiring. Every dose, quantity change, and trip between home and school created another manual update. The experience made me realize that medication management involves more than remembering a time on a calendar. For people living away from home, traveling, caring for relatives, or keeping a longer-term supply, it is also an inventory and planning problem.

A second inspiration came from the medication leaflets themselves. The print is often extremely small, the language can be technical, and a folded leaflet may contain a large amount of important information in a format that is difficult to navigate. This can be frustrating even for younger readers and can become a significant accessibility problem for older people. Photographs taken under poor lighting, foreign-language instructions, and dense warning sections make the information even harder to use.

These two experiences led me to combine medication routines, remaining supply, and leaflet accessibility into one application. MedShelf is designed to help users understand what they have, remember what they have planned to take, estimate when supplies are running low, and preserve important leaflet information in a clearer and more reviewable format.

What MedShelf Does

MedShelf is a safety-first medication tracker built around the full life cycle of managing medicine. Users can add routine medicines with schedules, record doses as taken, skipped, or missed, and track how much supply remains. When a dose is marked as taken, the application updates the remaining quantity and uses the schedule and dose amount to estimate how many days of supply are left. Low-stock warnings and restock search links help users prepare before they run out.

The application also supports non-routine medicines. Some medicines are stored for occasional use and should not be forced into a repeating daily schedule. MedShelf allows these items to remain in the inventory system so users can still monitor their quantity and storage information.

For difficult medication leaflets, users can upload images and inspect them in a full-screen viewer with thumbnails, zoom, panning, rotation, brightness, and contrast controls. Browser-side OCR can read supported images without requiring a paid service, and users can correct the recognized text before it is processed further.

Most importantly, extracted information is treated as a draft. MedShelf displays confidence levels and source snippets beside the extracted claims so users can compare them with the original leaflet. Uncertain fields can be edited or removed, and the guidance remains in a needs review state until the user explicitly approves it. Prescriptions, medicine labels, pharmacists, clinicians, and user-entered instructions remain the sources of truth.

How I Built It

I built MedShelf as a full-stack web application using React, Vite, and TypeScript for the frontend, with FastAPI and SQLite on the backend. I developed the project iteratively through Codex, dividing the work into milestones rather than attempting to generate the entire application at once.

The first milestones established the frontend and backend structure, database models, API routes, medicine forms, and demo data. I then added schedules and dose logs, connected completed doses to inventory changes, and built the dashboard for today’s medicines and low-stock warnings. Later milestones introduced leaflet uploads, image viewing, OCR, structured extraction, and the review-and-approval workflow.

The extraction system uses a provider-based architecture. The public demonstration can run with browser-side OCR and a mock extraction provider, allowing judges to test the core product without paid API calls. The application also includes an optional OpenAI Responses API provider configured for GPT-5.6. Model output is validated as structured data, stored with its original source material, and kept separate from approved guidance until a user reviews it.

Codex was used throughout the development process to plan features, implement the React and FastAPI components, debug integration problems, run checks, and polish the final demonstration flow. GPT-5.6 in Codex was also used for the final submission-readiness review, including checking the project against the competition requirements and refining the demonstration script.

Challenges I Faced

The largest challenge was designing the AI-assisted portion responsibly. Medication information is a high-stakes domain, so a fluent summary can become dangerous when it silently fills gaps, misreads an image, or presents uncertainty as fact. I had to design the workflow around traceability and user control. The extractor is instructed to use only the supplied leaflet text, preserve uncertainty, avoid inferring missing dosage information, and attach source snippets and confidence levels to its output.

OCR introduced a related challenge. Medication leaflets may be folded, photographed at an angle, printed in tiny type, or captured under uneven lighting. OCR cannot be assumed to produce perfect text. Instead of hiding that limitation, MedShelf lets the user inspect the original image, improve its visibility, edit the OCR result, paste text manually, or keep the uploaded leaflet without creating extracted guidance.

Another challenge was connecting medication schedules to inventory in a way that remained understandable. A reminder system only needs to know when a dose occurs, while an inventory system also needs the dose quantity, remaining stock, schedule frequency, skipped or missed doses, and manual corrections. I had to ensure that tracking a completed dose changed the inventory while leaving the user’s care plan untouched.

Finally, I needed the project to remain easy to test during a short judging session. That meant preparing seeded demonstration data, predictable review states, a local-first OCR path, recoverable failures, and a setup process that could run without an external paid service.

What I Learned

This project taught me that adding AI to a sensitive workflow requires more than selecting a model and displaying its response. The surrounding product design is equally important. Source grounding, structured outputs, visible confidence, recoverable errors, and explicit approval can make AI assistance more transparent and useful.

I also learned the value of progressive enhancement. MedShelf remains useful as a manual medicine and inventory tracker even when OCR or an AI provider is unavailable. Browser OCR adds convenience, and the optional OpenAI provider adds more capable extraction and simplification, but the fundamental workflow does not depend on either feature being perfect.

Working iteratively with Codex also showed me how useful milestone-driven development can be. Breaking the application into the tracker, scheduling, inventory, uploads, extraction, review, and final polish made it easier to test each part independently and revise the architecture as the product became more complete.

What Comes Next

The next steps for MedShelf would include expiration-date tracking, notifications, calendar export, barcode scanning, caregiver profiles, voice readout for leaflet instructions, and more localized restock options. I would also like to strengthen multilingual support and conduct accessibility testing with older users and caregivers.

The long-term goal is to make medication organization less exhausting while preserving a clear boundary around medical decision-making. MedShelf should help people keep track of their routines, supplies, and source information without pretending to replace a prescription, pharmacist, or clinician.

Built With

  • accessibility
  • codex
  • docker
  • fastapi
  • gpt-5.6
  • inventory-management
  • medication-tracking
  • ocr
  • openai
  • openai-responses-api
  • progressive-web-app
  • python
  • react
  • render
  • rest-api
  • sqlite
  • tesseract.js
  • typescript
  • vite
Share this project:

Updates