Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.
JacobStephens2Public archive

About

Little One — private pregnancy + baby tracker PWA (baby.stephens.page)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Little One — pregnancy + baby tracker

A private, multi-tenant tracker for pregnancy and a new baby, live at baby.stephens.page. Each account creates a household; members share that household's data and can invite a partner by email. Pregnancy side: gestational + embryonic age, week-by-week size, kick counter, contraction timer, ultrasounds (CRL + heartbeat), weight, symptoms, appointments. Baby side: feeds, diapers, sleep, pumping, growth, milestones. Installable PWA, offline-first with live multi-device sync, a Day and a Night (3am) theme, and push reminders.

Layout

  • server/ — FastAPI + Postgres backend, uvicorn on 127.0.0.1:3490. Accounts, cookie-or-bearer auth, cursor sync, SSE, Web Push. See server/README.md.
  • frontend/ — Svelte 5 + Vite PWA (TypeScript). Local-first via Dexie (IndexedDB) with a cursor-sync client + SSE subscriber. Builds into ../public.
  • public/ — the built static app served by Apache (index.html, assets/, sw.js, manifest.webmanifest, img/). /api/ reverse-proxies to the backend.

Build the frontend

cd frontend
npm install
npm run build      # vite build → ../public  (the served artifact, committed)
npm run dev        # local dev server, proxies /api → 127.0.0.1:3490

public/ is regenerated by the build (Vite hashes asset names, so no ?v= bumping needed). The service worker (static/sw.js) does runtime caching + Web Push.

Architecture notes

  • Auth: signed session as an httpOnly+Secure+SameSite cookie (web) or bearer token (native-ready). No passphrase — real accounts per household.
  • Sync: events are an append-mostly log keyed by client UUID with a server seq cursor and tombstones; settings is last-write-wins. The client pushes dirty rows and pulls since its cursor; SSE nudges a pull when a partner changes something. Offline writes queue locally and flush on reconnect.
  • Native-ready seams (for a future Capacitor wrap): cookie-or-bearer auth, a framework-agnostic sync protocol, and pluggable push transports.

Design

"Dawn Nursery" — warm oat paper with a sunrise glow, Fraunces + Hanken Grotesk, clay / sage / gold accents. Data is canonical metric; the UI converts to imperial (default) at the edges.

About

Little One — private pregnancy + baby tracker PWA (baby.stephens.page)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages