Skip to content

adizero/baby_sleep_tracker

Repository files navigation

Baby Sleep Tracker

Android app for tracking baby sleep times and diaper events. Designed with big, easy-to-tap buttons for parents who are half-asleep.

Features

  • Sleep tracking — one-tap start/stop with elapsed time display and awake timer
  • Breastfeeding tracking — left/right side timers with auto-switch, mutual exclusion with sleep
  • Diaper logging — Pee, Poo, or Both buttons
  • Activity logging — Stroll, Bath, and free-text Note events
  • Manual entry — add or edit past events with date/time pickers, duration adjustment buttons, and validation (future/pre-birth date guards); supports all entry types including HC
  • Bottle feeding — Donor, Pumped, and Formula tracking with configurable preset volumes; ml/oz support
  • White noise — built-in sound generator (white, pink, brown, gray, blue, violet, rain, storm) with volume, duration, and fade controls; tracked in history
  • High contrast viewer — built-in high contrast images for newborn visual stimulation with multiple patterns, color schemes (including three-color), and auto-advancement; viewing sessions tracked in history
  • Growth tracking — weight, height, and head circumference charts with WHO percentile curves, zoom/pan (pinch or double-tap-and-drag one-handed zoom), and percentile display; latest measurements shown on home screen; individual unit toggles (kg/lbs, cm/in) with auto-conversion
  • Sleep & feeding alarms — configurable alerts when baby sleeps too long or hasn't been fed (general feed and breast-specific), with custom ringtone selection, full-screen tap-to-dismiss overlay, and 15-minute interval scheduling
  • Development milestones — age-appropriate milestones for motor, vision, sleep, feeding, teeth, social, language, and cognitive development with fun facts; auto-scrolls to current age
  • Weather — location-based weather on calendar and home screen; current conditions, min/max temperature, hourly forecast for today and tomorrow; historical weather cached per-month; expandable weather card on home screen; powered by Open-Meteo API (no API key required)
  • Telemetry — optional live sensor card on home screen showing ambient noise level (dB), temperature, humidity, and barometric pressure from phone sensors; unavailable sensors shown grayed out; disabled by default to save battery
  • Calendar — monthly overview with color-coded activity dots, weather icons, and daily detail view; auto-selects current day; double-tap a day to jump to history
  • Statistics — sleep, feed, and diaper charts with trend lines (24h/72h/3/7/14/30 day ranges), hourly breakdown charts, day vs night sleep pie chart, scrollable charts for large ranges
  • Home dashboard — today's stats, time since last sleep/feed/diaper/bath/measurement, latest growth measurements with percentiles, weather card with hourly forecast, and optional telemetry card
  • Configurable units — individual toggles for weight (kg/lbs), length (cm/in), volume (ml/oz), temperature (°C/°F), and pressure (hPa/inHg); unit choices in entry forms are local and don't affect global settings
  • Configurable day/night hours — adjustable boundaries for day/night stats and auto theme switching
  • History — scrollable list of all entries with date jump, entry type filter, editable and deletable with undo
  • Dropbox sync — automatic cloud backup and merge across devices with immediate sync on changes; ID-based conflict resolution with modification epochs
  • Import/Export — plain text file format, easy to read and share
  • Theme — light, dark, or auto (switches based on configurable day/night hours)
  • Home screen widget — shows current status (Awake/Sleeping/Feeding) with elapsed time and color-coded background; optionally displays baby name and age on wider widgets (3+ cells); configurable layout (baby info left, right, or hidden); tapping opens the app
  • Survives app kill — active sleep/feed session persists via SharedPreferences

Data Format

Data is stored as a plain text file (chosen by the user via SAF). Each entry has a unique record ID for sync conflict resolution:

#a1b2c3d4 SLEEP 2026-03-02 08:15 - 09:30
#b2c3d4e5 FEEDL 2026-03-05 14:30 - 14:45
#c3d4e5f6 FEEDR 2026-03-05 14:46 - 15:10
#d4e5f6a7 PEE 2026-03-02 10:45
#e5f6a7b8 POO 2026-03-02 11:30
#f6a7b8c9 PEEPOO 2026-03-02 12:00
#a7b8c9d0 DONOR 2026-03-02 12:30 60ml
#b8c9d0e1 PUMPED 2026-03-02 15:00 90ml
#c9d0e1f2 FORMULA 2026-03-02 18:00 120ml
#d0e1f2a3 STROLL 2026-03-02 13:00 - 14:00
#e1f2a3b4 BATH 2026-03-02 18:00
#f2a3b4c5 NOTE 2026-03-02 19:00 First smile!
#a2b3c4d5 NOISE 2026-03-02 20:00 - 20:30 white
#b3c4d5e6 HC 2026-03-02 09:00 - 09:15 BW,RW
#c4d5e6f7 MEASURE 2026-03-02 10:00 3.500kg 51.0cm 35.0hc

Tech Stack

  • Kotlin
  • Jetpack Compose + Material 3
  • MVVM (ViewModel + StateFlow)
  • Navigation Compose
  • Canvas-based charts
  • Storage Access Framework (SAF)

Requirements

  • Android 8.0+ (API 26)
  • Android SDK 35

Build

./gradlew assembleDebug

APK output: app/build/outputs/apk/debug/app-debug.apk

License

Copyright (c) 2026 Adrian Kocis. Licensed under the MIT License.

About

Android app for tracking baby growth, sleep, feeding, diapers and activities with white noise generator, high contrast images generator & viewer, Dropbox sync, home screen widget, statistics, charts including WHO growth percentile graphs, baby developmental milestones screen with fun facts, and calendar — designed for half-asleep parents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages