Baby Tracker API

A privacy-first, self-hostable solution for tracking your babyโ€™s development.

Why Baby Tracker?

Baby Tracker is an open-source project that helps parents track their baby's daily activities, growth, and development with complete privacy control.

Unlike commercial alternatives that store sensitive data on third-party servers, Baby Tracker gives parents complete control over their baby's data with a self-hostable solution.

Built with Django REST Framework and designed with privacy and security in mind, Baby Tracker provides all the features of premium baby tracking apps while keeping your data under your control.

Key Benefits

  • Complete Data Privacy

    Your baby's data stays on your server, not in a corporate database.

  • AI-Powered Insights

    Get recommendations for feeding times and sleep patterns based on historical data.

  • Open Source

    Fully customizable and extendable to meet your specific needs.

  • Multi-Tenancy

    Complete tenant isolation ensures users can only access their own data.

Comprehensive Baby Tracking Features

Everything you need to monitor your baby's development

๐Ÿผ

Feeding Tracking

Track breastfeeding, bottle feeds, and solid food with detailed metrics like duration, amount, and side.

๐Ÿ˜ด

Sleep Monitoring

Record sleep sessions with start/end times and quality ratings to establish healthy sleep patterns.

๐Ÿงท

Diaper Changes

Log diaper changes with type and notes to monitor digestive health and patterns.

๐Ÿ“

Growth Milestones

Record height, weight, and other growth metrics to track development over time.

๐Ÿ‘จโ€โš•๏ธ

Doctor Appointments

Manage medical visits with notes, vaccinations, and follow-up information.

๐Ÿ’ก

AI Insights

Get AI-powered recommendations for feeding times and sleep patterns based on historical data.

Built with Modern Technologies

Baby Tracker is built with a robust tech stack designed for reliability, security, and performance.

The backend is powered by Django and Django REST Framework, providing a solid foundation for API development with built-in security features and excellent ORM capabilities.

PostgreSQL ensures data integrity and reliability, while JWT authentication provides secure access to the API endpoints.

๐Ÿ

Django

๐ŸŒ

Django REST

๐Ÿ˜

PostgreSQL

๐Ÿ”‘

JWT Auth

๐Ÿ“Š

Pandas

๐Ÿณ

Docker

Complete API Workflow Examples

Follow these step-by-step examples to understand how to use the Baby Tracker API for common workflows

Complete User Journey

This example demonstrates a complete workflow from user registration to tracking various baby activities.

1Register a New User

POST /api/register/
{ "username": "parent123", "email": "parent@example.com", "password": "securepassword123" }
Response (201 Created):
{ "message": "User created successfully", "tokens": { "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." } }

2Create a Baby Profile

POST /api/babies/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "name": "Emma Smith", "birth_date": "2024-01-15", "gender": "female" }
Response (201 Created):
{ "id": 1, "name": "Emma Smith", "birth_date": "2024-01-15", "gender": "female", "user": 1 }

3Log a Feeding Session

POST /api/feedings/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "baby": 1, "feeding_type": "breastfeeding", "quantity": 4.0, "last_side": "left_feeding" }
Response (201 Created):
{ "id": 1, "baby": 1, "time": "2025-08-27T14:30:00Z", "feeding_type": "breastfeeding", "quantity": 4.0, "last_side": "left_feeding" }

4Record a Diaper Change

POST /api/diaper-changes/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "baby": 1, "diaper_type": "wet" }
Response (201 Created):
{ "id": 1, "baby": 1, "time": "2025-08-27T15:05:23Z", "diaper_type": "wet" }

5Add a Developmental Milestone

POST /api/babies/1/milestones/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "title": "First Smile", "category": "social", "date_achieved": "2024-02-20", "notes": "Emma smiled for the first time during morning feeding" }
Response (201 Created):
{ "id": 1, "baby": 1, "title": "First Smile", "category": "social", "date_achieved": "2024-02-20", "notes": "Emma smiled for the first time during morning feeding" }

6Schedule a Doctor Appointment

POST /api/doctor-appointments/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "baby": 1, "doctor_name": "Dr. Johnson", "appointment_date": "2024-03-15T10:30:00Z", "notes": "2-month checkup and vaccinations" }
Response (201 Created):
{ "id": 1, "baby": 1, "doctor_name": "Dr. Johnson", "appointment_date": "2024-03-15T10:30:00Z", "notes": "2-month checkup and vaccinations" }

7Update a Milestone

PUT /api/babies/1/milestones/1/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
{ "title": "First Smile", "category": "social", "date_achieved": "2024-02-18", "notes": "Emma smiled for the first time during morning feeding. Updated with correct date." }
Response (200 OK):
{ "id": 1, "baby": 1, "title": "First Smile", "category": "social", "date_achieved": "2024-02-18", "notes": "Emma smiled for the first time during morning feeding. Updated with correct date." }

8Get AI Insights

GET /api/babies/1/ai-insights/?type=comprehensive
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
Response (200 OK):
{ "insights": [ { "type": "feeding", "content": "Emma is feeding well with an average of 4oz per feeding. Consider alternating between left and right sides for balanced feeding." }, { "type": "development", "content": "Emma's first smile at 34 days is right on track with typical developmental milestones." }, { "type": "health", "content": "Don't forget the upcoming doctor's appointment on March 15th for important vaccinations." } ] }

9Delete a Record

DELETE /api/doctor-appointments/1/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
Response (204 No Content)

Batch Operations

For efficiency, you can retrieve multiple records at once using filtering parameters.

Get All Feedings for a Date Range

GET /api/feedings/?baby=1&start_date=2024-02-01&end_date=2024-02-07
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
Response (200 OK):
{ "count": 15, "next": "http://api.example.com/api/feedings/?baby=1&end_date=2024-02-07&page=2&start_date=2024-02-01", "previous": null, "results": [ { "id": 42, "baby": 1, "time": "2024-02-01T08:30:00Z", "feeding_type": "breastfeeding", "quantity": 3.5, "last_side": "left_feeding" }, { "id": 43, "baby": 1, "time": "2024-02-01T12:15:00Z", "feeding_type": "bottle", "quantity": 4.0, "last_side": null }, // ... more results ] }

Get All Milestones by Category

GET /api/babies/1/milestones/?category=physical
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
Response (200 OK):
{ "count": 3, "next": null, "previous": null, "results": [ { "id": 5, "baby": 1, "title": "Holds Head Up", "category": "physical", "date_achieved": "2024-03-10", "notes": "Emma can hold her head up during tummy time for about 30 seconds" }, { "id": 8, "baby": 1, "title": "Rolls Over", "category": "physical", "date_achieved": "2024-04-15", "notes": "First rolled from back to tummy" }, { "id": 12, "baby": 1, "title": "Sits Unassisted", "category": "physical", "date_achieved": "2024-06-20", "notes": "Can sit without support for about a minute" } ] }