Inspiration
The idea for Swaddle came from watching a friend take direct medical advice from a general AI chatbot for his baby, dosages, medicine names, and all, without verifying it, and without consulting a pediatrician first. That moment made the risk obvious: AI can be genuinely useful for parents navigating baby health, but only if it's built with real guardrails, not treated as a substitute for a doctor. That gap, between "AI that sounds confident" and "AI that knows its own limits," became the core design constraint for this project.
What it does
Swaddle is a unified platform for baby care that brings together:
- An AI Baby Assistant that takes symptoms and age, and returns possible causes, home-care guidance, and clear red-flag criteria for when to see a doctor, but is deliberately constrained to never suggest specific medicines or dosages.
- A Prescription Extractor that uses OCR plus GPT-5.6 to structure an uploaded prescription into medicine name, dosage, and frequency: extraction only, with no claim of medical validation, routed into a review queue.
- Age-filtered developmental content: rhymes, educational videos, sound activities, and simple color-matching games.
- Age- and context-aware product recommendations for toys, pharmacy supplies, and essentials.
- A pediatrician consultation booking flow (demo/mocked; real-time video is a roadmap item, not something I claim works today).
How I built it
The idea, problem framing, feature scope, data model, and system architecture are entirely my own design. I made every product decision, including which features to build safely and which to explicitly leave out of this version (real pharmacy integrations, live video consults, payments) rather than fake them.
From there, every line of implementation, including the FastAPI backend, React/TypeScript frontend, database models, OCR pipeline, and the GPT-5.6-powered structured endpoints, was generated through Codex, prompted task-by-task: scaffold the monorepo, build the symptom-check endpoint under strict safety constraints, build the prescription extractor, build the content and product APIs, build the React pages. Each piece was smoke-tested before moving to the next prompt, so I could catch issues early rather than debugging one giant generated codebase at the end.
GPT-5.6 sits inside the running application itself, not just inside Codex. It powers the symptom-check reasoning and the prescription text structuring, called through the OpenAI Responses API for strict, structured JSON output. Deterministic server-side code handles the parts that shouldn't be left to a model: red-flag overrides, fixed medical disclaimers, validation, and auth.
Challenges I ran into
- Drawing the safety line correctly. The hardest part wasn't the code. It was deciding exactly where AI assistance should stop and a human professional should take over. That's why the assistant is constrained to never name medicines, and the prescription tool only extracts, never validates.
- Keeping Codex-generated code coherent across many small prompts. Building task-by-task (rather than one huge spec) kept each piece reviewable, but required care to keep shared types and API contracts consistent across the client and server.
- Backend deployment: getting the FastAPI service, Postgres, and the GPT-5.6 API calls working reliably outside local Docker was deferred as a post-hackathon step given the timeline.
What I learned
That the real design work in an "AI for baby health" product isn't the AI integration itself. It's figuring out what the AI should refuse to say. The friend's story that inspired this project is the same lesson in reverse: an AI that answers everything confidently is more dangerous than one that knows when to say "talk to a pediatrician instead."
Built With
- alembic
- codex
- docker
- fastapi
- gpt-5.6
- jwt
- npm
- openai-api
- postgresql
- pytesseract
- pytest
- python
- react
- rest-api
- sqlalchemy
- tailwindcss
- tesseract-ocr
- typescript
- uvicorn
- vite
Log in or sign up for Devpost to join the conversation.