baby-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev c84ed8821371
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 381bd6356d4b794ac2a7c1b8
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
AGENTS.md
# Baby

Baby is a free baby tracker for feeds, sleep and diapers, shared live by a family, and a free alternative to Huckleberry and Glow Baby premium plans. It is an OpenApp in the OpenApps free apps store (https://free-apps.openapps.xyz/), owned by the OpenApps team.

## What it promises

- Free, with no paid plan, no trial, no ads and no limit on babies, people or entries. Never add a cap, an upsell or tracking.
- No sign-up. A guest account is made in the browser on first use. Email sign-in (Bounded hosted login) is optional and only keeps the log on every device.
- A family link joins someone to the family's log; everyone logs and sees entries and running timers live. An owner can remove someone and change the link.
- It is a log, not a medical device: no predictions, no "is this normal", no medical advice. Copy that touches health says to ask a doctor. Keep it that way.
- AI and voice assistants can log and read today's summary through the public API (`functions/api.ts`) with the family's assistant key, documented in `public/llms.txt` and `public/openapi.json`. Keep both true whenever the API changes.

## How it is built

- `index.html` is the static landing page that search engines and AI crawlers read. Keep its copy, comparison table, FAQ and JSON-LD (with `dateModified`), and `public/index.md` (the same page as plain markdown), in sync with what the app does. Competitor prices link to the vendor's own pricing page and say the month they were checked.
- `src/main.tsx` keeps `/` as the landing (the start card mounts into `#start`) and lazy-loads the app for `/app`, `/app/timeline` (`?date=YYYY-MM-DD` opens a past day), `/app/charts`, `/app/family`, `/app/report` (printable summary, `?baby=&from=&to=`) and `/join` (the family link, `/join#<family key>`). The landing never loads the Bounded SDK. llms.txt lists these links for assistants.
- `src/App.tsx` is the frame: the person (guest or account), their families (`users/<id>/households`), the open family's live data, tabs (header on wide screens, bottom bar on phones), the baby switch, the night look (`body.night`; automatic after 7 pm or with a dark system setting), skeletons while the log opens, and a line when the phone is offline.
- `src/ui.tsx` holds the sheet (the kit's `.dialog`, closed through `useSheet` so it animates out), `Confirm`, the toast with Undo, icons, steppers and choice rows. New entries, deletes, started timers and stopped timers all offer Undo in the toast, so nothing asks "are you sure" before a reversible change.
- `src/lib/family.ts` is the whole data layer: create and join, live reads, logging, timers, removing people, and carrying a guest's families into an account after sign-in (the account joins each family with the family key, and takes ownership where the device holds the owner key).
- `functions/lib/baby.ts` is shared by the app and the API: event shapes (a dirty diaper may carry a `color`), units (stored metric: ml, kg, cm, degrees C; shown per device), breastfeeding side math, one-line descriptions, the snapshot (last feed, diaper, sleep, running timers) and daily totals.
- `policy.json`: everything lives under `households/<id>`, readable only by members. Joining needs the family key: the joiner writes `households/<id>/claims/<me>` with the key's secret, and that write only succeeds when it matches `householdkeys/<id>`. The API checks keys the same way, so the policy names no platform constant. Owners (`owners/<id>`) can remove members and replace the key. `ownerkeys/<id>` is unreadable and lets the creator's signed-in account become an owner too.
- Timers are entries with no `end`: a breastfeed keeps its stretches per side in `data.seg`, a sleep just has a start. Every device computes the running time from those, so timers survive reloads and show everywhere.
- The live read is the family's last 8 days (one subscription, up to 1,000 entries); older days, 30-day charts and exports read once with `loadRange`. Charts open with "Sleep and feeds by hour": each day as a row across 24 hours.
- `src/sw.js` is the service worker template; the build fills in the file list. `public/manifest.webmanifest` and `public/icons/` make it installable. Logging needs a connection.

## Working on it

`npm install && npm run build` typechecks and builds `dist/`. `npm run dev` serves it on port 4336. `bounded tests run --app-id <app>` runs `policy-tests/` in a throwaway sandbox. Ship changes through previews and releases as your runtime instructions describe; the app is an OpenApp, so nobody deploys it directly.

Check a change by starting a log, running a breastfeed timer (switch, pause, done, then Undo) and a sleep timer, logging a bottle and a dirty diaper with a color, opening the family link in a second browser and watching entries appear live, removing that person, reading Charts and the printable summary, and calling the API with curl (good key, wrong key, each entry type). Check phones at 390 px in both the day and night looks.

## Voice

Plain words, short sentences, no jargon, no em dashes. Warm but not cute. Never alarm parents and never diagnose: point to their doctor.

Change history

Quality pass: undo on timers, sleep by hour chart, diaper color, fixes
c84ed88213 · 5 hours ago
Bounded source sync
1ed137d95d · 16 hours ago
Bounded source sync
851999f793 · 17 hours ago
Bounded source sync
9623bc231c · 17 hours ago