Inspiration
Modern parenting suffers from a pervasive "fragmented care paradox": paper-based checkup sheets, immunization records, and vision prescriptions are scattered across drawers; pediatric myopia is surging due to unchecked screen time and lack of sunlight; and multi-caregiver coordination (parents, grandparents, babysitters) often results in missed doses or duplicate feedings.
Worse, querying generic LLMs about pediatric symptoms frequently triggers dangerous medical hallucinations—such as unvetted drug dosages or pseudo-diagnoses. We built aibaby around one clear ethos: "Utility first, persistent records, strict privacy compliance, and safe AI assistance."
What it does
aibaby is an all-in-one, AI-powered parenting and growth companion that bridges clinical pediatric standards with family collaboration:
- 8-Ledger Health Suite: Tracks growth metrics, outpatient medical visits, prescriptions, allergies, vaccinations, lab test indicators, vision trends, and daily feedings.
- Scientific Growth & Vision Charts: Compares height, weight, and head circumference against WHO and national standards via interactive percentile curves, while monitoring axial length ($AL$) and daily outdoor sunlight.
- Multilingual Medical OCR: Ingests paper health slips, lab sheets, and prescription receipts via photo capture, auto-classifying and digitizing them into structured records.
- Guardrailed AI Advisor with Action Capsules: Delivers evidence-informed parenting guidance that strictly avoids medical prescribing, automatically converting dialogue into actionable app events ([Log to Illness Ledger], [Set Clinic Reminder]).
- Dual-Mode Experience: Features a comprehensive Parent Dashboard alongside a biometric-locked Child Mode that only displays an eye-care countdown timer.
How we built it
We built a Monorepo architecture combining a native iOS app (SwiftUI + Swift Charts), an asynchronous FastAPI backend (PostgreSQL, Redis, MinIO), an administrative operations portal (Vue 3 + Vite).
Core Mathematical & Pediatric Models
LMS Growth Percentiles & Piecewise Linear Interpolation: Aligned with WHO Standards and WS/T 423-2022. The demographic LMS formulation standardizes raw measurements into $Z$-scores: $$Z = \begin{cases} \dfrac{\left(\dfrac{X}{M(t)}\right)^{L(t)} - 1}{L(t) \cdot S(t)} & \text{if } L(t) \neq 0 \[2ex] \dfrac{\ln\left(X / M(t)\right)}{S(t)} & \text{if } L(t) = 0 \end{cases}$$ On-device, the client computes exact percentiles via piecewise linear interpolation across standard reference bands ($P_3, P_{50}, P_{97}$): $$\text{Percentile}(X) = 3 + \frac{X - P_3(t)}{P_{50}(t) - P_3(t)} \times (50 - 3) \quad \text{for } X \in [P_3(t), P_{50}(t)]$$
Vision Acuity & Myopia Dynamics: Normalizes regional notation (China's 5-point scale $L$, Snellen fraction $20/d$) into decimal acuity $V$ and LogMAR: $$V = 10^{(L - 5)} = \frac{20}{d}, \quad \text{LogMAR} = -\log_{10}(V)$$ Encourages the 20-20-20 eye-care rule and tracks daily outdoor light exposure ($T_{\text{outdoor}} \ge 120\text{ min}$) to inhibit abnormal axial elongation ($\Delta AL \le 0.2\text{ mm/year}$).
Weighted Multilingual OCR Classification: Classifies mixed-language medical documents (English, Chinese, Japanese, Korean) into 7 distinct document types using weighted keyword frequency scoring: $$S(T, c) = \sum_{w_i \in \mathcal{W}_c} \omega_i \cdot \mathbb{I}\left(w_i \in \text{lower}(T)\right)$$
Challenges we ran into
- Parsing Heterogeneous Medical Documents: Paper bills feature messy handwriting, mixed units ($\text{in} \to \text{cm}$, $\text{lb} \to \text{kg}$), and idiosyncratic lab markers (
↑,↓,H,L). Hardcoded regex broke easily, while raw LLM calls were slow and costly. We resolved this by creating a 3-tier hybrid pipeline: Script Disambiguation $\to$ Deterministic Regex Parsers $\to$ Fallback Schema-Constrained LLM Extractor (strictly restricted to extraction with zero medical interpretation). - Medical Safety & Hallucination Guardrails: Panicked parents frequently ask high-risk questions (e.g., "What dosage of antibiotic should I give?"). We engineered a three-layer circuit breaker: an input keyword interceptor that immediately diverts to emergency guidelines, strict system prompt boundaries, and an output token monitor that intercepts phrases like "recommend taking" or "diagnosed with".
- Adaptive Large-Screen Layouts (iPad / Tablets): Swift Charts and interactive modal sheets suffered from keyboard occlusion and broken touch hitboxes on wide screens. We engineered reusable SwiftUI extensions (
padResponsiveDetentsandpadAdaptableContentShape) to deliver seamless tablet responsiveness.
Accomplishments that we're proud of
- End-to-End Clinical-to-Digital Flow: Effortlessly snapping a photo of an immunization sheet or lab test and seeing it immediately plotted against WHO growth bands and vaccination schedules.
- Physical Sandboxing for Children: Creating a genuinely safe Child Mode that provides only an eye-care timer, mathematically and physically isolating children from social feeds, data tables, and AI chatbots in compliance with COPPA and GDPR-K.
- Zero-Friction Family Co-Parenting: Scaling records to up to 5 family members using clean 6-character invite codes, powered by a unified authorization interceptor (
get_owned_child) that required zero breaking changes across 100+ backend endpoints. - Zero-Hallucination AI Architecture: Delivering an AI parenting assistant that empathetically comforts parents and coordinates logistics without ever crossing the line into unlicensed diagnosis.
What we learned
- AI Must Scribe, Not Prescribe: In pediatric care, generative AI shouldn't pretend to be a doctor. Its true superpower is acting as a tireless digital scribe—normalizing chaotic records, charting trends against validated medical models, and organizing family schedules.
- Privacy Is an Architecture, Not a Checkbox: Child data security must be hard-coded into database relationships, sandboxed UI routes, and private MinIO storage streams from day one.
- Architectural Restraint Over Raw Complexity: Centralizing permissions and validation logic in the data layer kept our clients blazing fast, resilient offline, and easy to maintain across platforms.
What's next for AiBaby
- On-Device Small Language Models (SLMs): Deploying localized, quantized models directly to iOS devices to achieve 100% offline, privacy-first medical record parsing.
- Sensor-Driven Outdoor Tracking: Integrating Apple HealthKit, ambient light sensors, and CoreMotion to automatically log sunlight exposure without manual stopwatch entry.
- Expanded Pediatric Registries: Incorporating additional localized pediatric growth tables (CDC, Japanese MHLW, Korean KDCA) to support diverse global families.
Log in or sign up for Devpost to join the conversation.