A privacy-first pediatric growth chart viewer built on the CDC growth reference (0–20 years). Plot a child's weight, length / height, head circumference, and BMI against the same percentile curves a US pediatric EMR uses.
Two modes from one codebase:
- Hosted (e.g. krytonlabs.com/childgrowth) — ephemeral "quick check and leave." Nothing persists. Refresh = gone.
- Self-host — same UI plus opt-in localStorage tracking and one-click export to Baby Buddy CSV format for when you outgrow this tool.
git clone https://github.com/kmanan/child-growth-graph.git
cd child-growth-graph
docker compose up -dThen open http://localhost:4769. That's it.
Why 4769? It's GROW on a phone keypad, and it sidesteps the port-3000 traffic jam (Grafana, Gitea, every other Next.js app). Override with
HOST_PORT=8080 docker compose up -d, or copy.env.exampleto.envand edit. The container always listens on 3000 internally; the host port is yours to choose.
- Plots weight-for-age, length/stature-for-age, head-circumference-for-age, and BMI-for-age against the CDC reference's 10th / 50th / 90th percentile curves.
- Computes percentile and z-score for any measurement, with "outside chart range" handling for ages beyond the table's support.
- Toggle between US (lb / in) and metric (kg / cm) input and display.
- Dark mode.
- No backend, no database, no analytics, no telemetry. The entire app runs in the browser; the server only serves the static bundle.
Validated to within 2.5×10⁻⁵% relative error against the CDC's published P3/P10/P50/P90/P97 columns across all 1,536 reference rows. See docs/oss-self-host-design.md for the methodology.
When NEXT_PUBLIC_ENABLE_TRACKING=true is baked into the build (the default for the Dockerfile), two extra capabilities turn on:
-
localStorage persistence. Measurements survive refreshes. Schema is versioned (
growth-charts.v1) and corrupt entries fall back to empty. -
Baby Buddy CSV export. A single click produces four downloads matching Baby Buddy's import format exactly:
weight.csv—child_id,weight,date,notesheight.csv—child_id,height,date,notesheadcircumference.csv—child_id,head_circumference,date,notesbmi.csv—child_id,bmi,date,notes
child_iddefaults to1(Baby Buddy's first-child default). Edit the CSV before importing if your Baby Buddy install uses a different ID. Values export in whatever unit system you're currently viewing — the button labels the units explicitly.
Tagged releases publish multi-arch images to GitHub Container Registry:
docker run -d --name growth-charts -p 4769:3000 ghcr.io/kmanan/child-growth-graph:latestFor sub-path mounting, build your own image with --build-arg BASE_PATH=/childgrowth because Next.js inlines basePath at build time.
| Variable | Default | Scope | Purpose |
|---|---|---|---|
BASE_PATH |
"" |
Build-time (Docker ARG) |
URL prefix for sub-path mounting. Inlined into client bundle; requires rebuild. |
NEXT_PUBLIC_ENABLE_TRACKING |
"true" (Docker), "false" (npm) |
Build-time | Enables localStorage + CSV export. |
HOST_PORT |
4769 |
Runtime (compose) | Port to expose on the host. |
PORT |
3000 |
Runtime (container) | Internal Next.js listen port. |
basePath is a Next.js build-time inlined value, so this requires rebuilding the image:
docker build --build-arg BASE_PATH=/childgrowth -t cdc-growth-charts .
docker run -d -p 3000:3000 cdc-growth-chartsThen proxy proxy_pass http://127.0.0.1:3000/childgrowth; — do not strip the prefix; Next expects it intact. See docs/oss-self-host-design.md §8.4 for the full discussion.
npm install # use Node 20; .nvmrc and .node-version are provided
npm run dev # http://localhost:3000
npm run build # production build
npm run lint # ESLint (flat config)
node data/build_lms.mjs # regenerate lib/growthData.ts from data/raw/*.csv
npm run validate:data # verify CDC LMS math against published percentiles
npm audit --omit=dev # production dependency auditNode ≥ 20.9 required.
CDC L/M/S parameter tables (public domain). See data/raw/README.md for source URLs, retrieval date, and SHA256 checksums.
This is a viewer/calculator, not a medical device. Numbers shown are directional and based on the CDC reference. Always consult your pediatrician for clinical assessment. See docs/oss-self-host-design.md §2 for full scope/non-goals.
Apache 2.0. See NOTICE for attribution.
docs/oss-self-host-design.md — architecture, deployment, threat model, roadmap.
Migrating to a fuller baby tracker? Baby Buddy is the canonical self-host option, and the CSV export here drops straight into its import flow.