Skip to content
Back to the quest

Baby Tracking for New Parents

ParPair

One shared logbook for every feeding, nap, and diaper change.

Role
iOS Developer & Product Researcher
Duration
In development
Year
2026
Category
iOS Development, Product Management

Project Overview

ParPair is an iOS app helping first-time parents track their baby's daily life — feedings, sleep, diapers, and activities — in one shared logbook. Built with SwiftUI and SwiftData, it grew out of research with real parents: interviews, personas, and empathy maps shaped the tracking concept before any interface work. It is an informational tracker, not medical advice. The app is in active development at Apple Developer Academy.

The Problem

First-time parents are flooded with generic advice but lack an understandable picture of their own baby's patterns — and juggling feeds, naps, and diaper changes across two exhausted caregivers means details constantly slip through.

The Solution

A shared, structured logbook modeled directly on how parents actually track: typed logs for food (breastfeeding, formula, pumped milk, solids), sleep (naps vs. nights), diapers, and activities like tummy time — anchored to a baby profile that computes age displays such as “D+61, 8w5d” the way pediatric guidance is written.

Ni'mah at the ParPair showcase booth: live app demo on iPhone, project poster with tech stack, and TestFlight QR
ParPair app logo

What I Owned

  • Developed the app in Swift: the SwiftData model layer (Baby plus Food, Diaper, Sleep, and Activity logs with typed enums and cascade relationships)
  • Built the Home experience — baby profiles with the live age engine and quick actions
  • Conducted user research and parent interviews
  • Developed personas and empathy maps that defined the tracking concept
  • Shaped the product concept and validation approach

What the Team Owned

  • Team — design iteration, playtesting with target users, and feature planning

Current Status

ParPair is a working build, demoed live at the Apple Developer Academy showcase and distributed to testers via TestFlight. The SwiftData schema (Baby plus Food, Diaper, Sleep, and Activity logs with typed enums), baby profiles with live age calculation, quick actions, and summary insights are implemented and running — the photo shows the real app in hand at the booth.

Code Highlights

Models/Baby.swift
@Model
final class Baby {
    @Attribute(.unique) var id: UUID
    var name: String
    var birthday: Date

    /// Start of day prevents time-of-day discrepancies
    var daysSinceBirth: Int {
        let calendar = Calendar.current
        let startOfBirth = calendar.startOfDay(for: birthday)
        let startOfToday = calendar.startOfDay(for: Date())
        return calendar.dateComponents(
            [.day], from: startOfBirth, to: startOfToday
        ).day ?? 0
    }

    /// Formats age to match pediatric guidance: "D+388, 55w3d"
    var ageDisplayString: String {
        let totalDays = daysSinceBirth
        let weeks = totalDays / 7
        let remainingDays = totalDays % 7
        return "D+\(totalDays), \(weeks)w\(remainingDays)d"
    }

    @Relationship(deleteRule: .cascade, inverse: \FoodLog.baby)
    var foodLogs: [FoodLog] = []
    @Relationship(deleteRule: .cascade, inverse: \SleepLog.baby)
    var sleepLogs: [SleepLog] = []
    // ...diaper and activity logs follow the same pattern
}

Baby Model & Age Engine: Every tracked log hangs off a baby profile, and parents read age the way pediatric guidance writes it — in days and weeks, not months. A SwiftData @Model with cascade relationships to every log type, plus a computed age engine that anchors on start-of-day so the count never flickers with the time of day.

Models/FoodLog.swift
@Model
final class FoodLog {
    var id: UUID
    var type: FoodType          // breastfeeding, formula, solids…
    var amount: Double?
    var feedingUnit: FeedingUnit?
    var startTime: Date
    var endTime: Date?
    var notes: String

    var baby: Baby?

    /// Session length, when an end time was recorded
    var duration: TimeInterval? {
        guard let endTime else { return nil }
        return endTime.timeIntervalSince(startTime)
    }
}

enum FoodType: String, Codable, CaseIterable {
    case breastfeeding = "Breastfeeding"
    case formula = "Formula"
    case solids = "Solids"
    case pumpedMilk = "Pumped Milk"
}

Typed Feeding Logs: Parents think in typed events — a breastfeed, a bottle, solids — each with different fields. Untyped notes would lose exactly the structure healthcare visits ask for. Each log is its own SwiftData model with a typed enum, optional amount and unit, and a computed duration — so the UI can render each feeding kind correctly without parsing.

ParPairApp.swift
@main
struct ParPairApp: App {
    let container: ModelContainer

    init() {
        do {
            let schema = Schema([
                Baby.self,
                FoodLog.self,
                DiaperLog.self,
                SleepLog.self,
                ActivityLog.self,
            ])
            let config = ModelConfiguration(
                schema: schema, isStoredInMemoryOnly: false
            )
            self.container = try ModelContainer(
                for: schema, configurations: [config]
            )
        } catch {
            fatalError("Could not initialize ModelContainer: \(error)")
        }
    }

    var body: some Scene {
        WindowGroup { ContentView() }
            .modelContainer(container)
    }
}

SwiftData Container Setup: All five models need one persistent store, initialized before any view renders — and a schema failure should be loud, not silent data loss. Build the ModelContainer in the App initializer from an explicit Schema, store on-device, and inject it into the environment once.

Key Learning

Research translates directly into schema: interviews revealed parents think in typed events (a feed, a nap, a change), so the data model is a set of typed logs hanging off a baby profile — and the age engine formats exactly the “D+61, 8w5d” notation parents see in pediatric guidance.

Technology Stack

SwiftSwiftUISwiftDataXcodeGit & GitHub