Inspiration
While recovering from colitis, a salmonella infection, and hair loss at the same time, one of us was taking eight medications a day. A chatbot could answer the questions - don't drink tea or milk near the iron, space the iron six hours from the antibiotic - but it couldn't be lived with. It forgot everything between sessions, so conditions had to be retyped constantly, and logging a dose meant writing a paragraph.
What it does
PillAI keeps a structured medical record (active ingredients, allergies, pregnancy status, kidney and liver function, foods and supplements) and makes dose logging a single tap: Taken, Missed, or Snooze. It answers questions by voice or text, routes emergency phrases in English and Arabic locally, and ships two layouts - a standard one and a simple, large-type one for older users.
How we built it
Flutter client, dependency-free Node backend, GPT-5.6 Terra through the Responses API. The core design rule: the model never writes medical wording. It classifies intent and picks from a fixed enum under a strict JSON schema; every user-facing sentence comes from a server-owned template. Emergency detection is deterministic and runs before any network call, so the model cannot talk it down. The API key lives only on the server, never in the Flutter build.
Challenges
The hardest problem was deciding what the AI is not allowed to do. We have no verified clinical database, so the app cannot prove a combination is safe or invent a dose interval - and it says so instead of guessing. Missed doses are recorded but never given a made-up replacement time. Getting that restraint right, with four labeled provenance states (live, fallback, no-key, emergency), took more work than the happy path.
What we learned
Graceful degradation matters more than uptime in health software. When our API quota ran out mid-testing, the app fell back to deterministic guidance and labeled it honestly - exactly as designed, without anyone touching it.
What's next
Durable storage, a verified clinical database so interaction claims can cite a versioned source, and a shared answer store keyed on clinical facts rather than composed replies.
Built With
- codex
- dart
- flutter
- gpt-5.6
- javascript
- json-schema
- node.js
- openai
- responses-api

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