Baby Sprout
v1.0A baby tracker for the first year in soft pink claymorphism: a puffy 24-hour day ring of feeds, naps and diapers you can drag to fix a time.
صفحے کا پتہ: /
پہلے سے شامل
آپ کو کیا ملتا ہے- لائٹ اور ڈارکآپ کی تھیم کے رنگ استعمال کرتا ہے
- ڈیسک ٹاپ، ٹیبلٹ، اور فونوہ اسکرینز جن کے لیے یہ بنایا گیا
- پیکجز…
- کوڈ کا سائز…
- بیٹری پر ہلکا30 fps، ساکن ہو تو رک جاتا ہے
- چھپنے پر رک جاتا ہےاسکرین سے باہر یا دوسرا ٹیب
- کم حرکتجو لوگ کہیں ان کے لیے پرسکون
ہر تبدیلی پر جانچ
سکیورٹی جانچ 3 دسمبر- ٹائپ چیکTypeScript strict
- لنٹ اور فارمیٹESLint · Prettier
- ٹیسٹ اور بلڈلائٹ اور ڈارک اسکرین شاٹس
- سکیورٹی آڈٹکوئی ہائی یا کریٹیکل ایڈوائزری نہیں
- پیکج کی عمرہر ورژن 7+ دن سے عوامی
- فارغ CPUآرام میں آدھے کور سے کم، ≤ 30 fps
کوڈ
baby-sproutReact
- baby-sprout.tsxThe page: the sections in order.
- content.tsEvery word and number: brand, nav links, each section's copy and lists.
- theme.tsThe colors as CSS variables, and the shared class strings.
- README.mdHow to install it, and where to change the text, colors and form.
- pagesOne file per page: the sections it shows, in order.
- caregivers.tsxCaregivers: the family with roles and access (each opens their page), who logged what today, the handover notes, and inviting someone new.
- diapers.tsxDiapers: one-tap logging (each tap squishes and leaves an Undo), the last week of changes, and the log filtered by kind (and by today, from Today's tile).
- feeds.tsxFeeds: the feed timer, the last week as clay bars, and the log filtered by kind (and by today, from Today's tile).
- growth.tsxGrowth: weight, length and head as three tiles (latest, percentile, change), the picked one on the percentile curves, and every measurement, each editable.
- milestones.tsxMilestones: the sticker scrapbook you can arrange, what usually comes next at her age, and each first's own page (#/milestones/<id>).
- reports.tsxReports: a day, a week or four weeks (?range=) as a daily pattern (one clay strip per day, sleep as blocks, feeds as beads), averages against the range before, sleep each day and feeds by hour.
- settings.tsxThe settings page: the baby's profile, then Appearance (style, theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the clay pea and the form on one puffy card over the clouds, a blush strip of the day ring's colors on top, without the nav and top bar.
- sleep.tsxSleep: the sleep timer, two weeks of daily totals against her goal, and the log filtered by naps or nights (and by today, from Today's tile).
- today.tsxToday (the Overview): the clay day ring with the time since the last feed in its middle, the day's totals and the quick-log buttons beside it, then the last feed, sleep and diaper, the handover note and her latest first.
- sectionsOne file per page section.
- account-menu.tsxThe account menu under the avatar in the top bar: who is signed in, Settings and Sign out; the arrow keys move through it, Escape, Tab or a click outside closes it.
- appearance.tsxSettings → Appearance: the style (Clouds or Plain) and the theme (System, Dark or Light), each choice shown as a small clay preview, and the language (System or one of locales/list.ts).
- caregiver-detail.tsxOne caregiver: their bead, role and since when, then three tabs in the address (?tab=): what they logged in the last two days, their handover notes, and their access (saves at once; anyone but you can be removed, after an in-app confirm).
- day-list.tsxWhat the log pages share: the page head with its main action, the kind filter whose pick lives in the address (so Back keeps it), and the log grouped by day with a clay bead per row.
- day-ring.tsxThe signature: the last 24 hours as a puffy clay clock ring, midnight at the top, so it is full at any time of day. Naps and nights sit on it as lavender arcs, feeds as pink arcs, diapers as butter beads; the sage bead is now and breathes softly. Tap an arc, then drag either end (it stays under your finger and glides onto the nearest five minutes) or use the arrow keys on its handles.
- entry-dialog.tsxThe log entry dialog for feeds, sleep and diapers: new (?new) or edit (?edit=id), so Back closes it. Delete asks inside the dialog and leaves an Undo.
- handovers.tsxHandover notes: write one for the next shift, pin the important ones, tick them done, delete with Undo. On a caregiver's page only their notes show.
- milestone-detail.tsxOne first: its big sticker and title, then three tabs in the address (?tab=): the story, the sticker (changes save at once) and what was around then (her growth and the other firsts within three weeks).
- milestone-form.tsxAdding or editing a first: what happened, the day, the story, and a drawn sticker in one of five clay colors. New (?new, with ?title= from Coming up) or edit (?edit=id), so Back closes it.
- nav.tsxThe navigation: on desktop a floating clay capsule at the left whose sage bead springs to the page you pick (and squishes on the way); on phones a bottom tab bar with the same bead, and More for the other pages.
- percentile-chart.tsxThe growth chart: the 3rd to 97th percentile curves for her first year as soft stacked bands, the median dashed, and her measurements as a raised line with clay dots.
- profile.tsxThe baby's profile in Settings: her name and birthday, which growth curves to use, units, the feed reminder and the sleep goal.
- quick-log.tsxQuick log under the day ring: a press squishes the button, a clay bead flies from it onto "now" on the ring and lands with a little bounce, and the entry pops into place. Feed and sleep start and stop their timers the same way.
- scrapbook.tsxThe scrapbook: her firsts as clay sticker cards you arrange by dragging (the card stays under the pointer, the others slide aside, it glides into its place on drop) or with the keyboard (Space picks up, arrows move, Space drops, Escape cancels).
- sign-in-form.tsxThe sign-in form: email and password with their errors under them, show or hide the password, keep me signed in, and the demo account to fill in; a wrong pair says so above the fields.
- timers.tsxThe feed and sleep timers: a puffy card whose big clock runs while a feed or a sleep is on, with start, switch side, stop & save and discard.
- today-cards.tsxToday's lower cards: the last feed, sleep and diaper (each opens today's list), the handover note waiting for you, and her latest first with her growth.
- top-bar.tsxThe top bar: the logo, the baby's chip with her age, the caregivers, search, the theme switch and the account menu.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- rise.tsThe rise card style: cards rise and fade in (24px, a hair smaller), one after another.
- rowsWhat several sections share.
- center.tsThe center row motion: the middle row on screen rises first, then the ripple spreads up and down.
- core.tsxThe page's build-in: on first load and on every page switch the cards arrive in the app's card style and their contents build: bars grow, lines draw, rings fill, the list rows on screen ripple in in the app's row motion, numbers count. The two picks are wired in ./index.ts.
- index.tsThe app's two build-in picks, wired here and nowhere else: its card style (cards/) and its row motion (rows/). npm run new-app copies only the two it is given (--cards, --rows).
- appearance.tsHow the app looks right now: dark or light, Glass or Solid, from Settings → Appearance, the page around it and the Style setting.
- avatar.tsxA person's initials on a small clay bead, its color picked by their place in the family.
- backdrop.tsxThe Clouds style's backdrop: soft clay clouds in the tint and little sage sprouts drifting nowhere (they stand still), faded out in Plain; with followBackground it paints your background instead. Colors come from the primary, the tint and the ground only.
- charts.tsxThe app's two small charts: puffy clay bars (a light top, a tinted drop, an optional goal line) and a soft line with a filled hill under it and clay dots. Both read their color from a chart variable, so they follow a chart theme.
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
- dialog.tsxA centered modal dialog (a form, a confirm): a puffy clay card that rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
- field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
- format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."). Add a helper here when a page needs money, times or a list.
- icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round, chunky ends.
- language.tsThe app's language: the words every page reads (useWords), how dates and numbers are written (parts/format.ts) and the reading direction. Picked in Settings → Appearance (or System: the page's own language) and kept in this browser; English is built in, any other language loads only when it shows (locales/list.ts).
- loop.tsThe app's two clocks: the time now, ticking only while the tab is visible, and a 30-frames-a-second loop for the day ring's breathing bead.
- moments.tsThe animations the sidebar, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
- motion.tsMotion helpers: the reduced-motion check, live, and run-once-in-view.
- router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
- scroll-to-view.tsScrolls an element into view moving only its own scroll container, never the page around it.
- select-box.tsxA native select dressed to match the app: no browser arrow, a drawn chevron instead.
- session.tsWhether someone is signed in: a first visit is signed in as the demo account; Sign out holds until the next sign-in, and a sign-in without Keep me signed in lasts only this tab.
- sheet.tsxThe phone sheet: a modal panel that springs in from the left with the sidebar; Escape, a tap outside or its close button slides it away.
- states.tsxThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
- stickers.tsxThe milestone stickers: twelve puffy drawn shapes on a 48-unit grid, each in the sticker's own clay color with a white highlight and a soft ink outline.
- store.tsThe app-wide state several parts share: the theme mode and style (kept in the browser) and the toasts.
- ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
- toasts.tsxThe toasts: short notes that confirm what just happened, at the bottom end.
- use-api.tsLoads data through the fake API with loading, error and retry, remembering each answer so a page you come back to shows at once.
- use-dialog.tsOpens and closes a native <dialog> as a modal; on close it plays its way out first (data-closing), so dialogs, sheets and the palette never vanish in one frame.
- dataThe pretend data and the fake API: swap it for your backend.
- account.tsThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
- api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
- curves.tsGrowth reference curves for the percentile chart: a smoothed median by month (0-12) for girls and boys and a spread per measure, close to the WHO child growth standards.
- days.tsThe counting rules every page shares, so a tile and the list it opens always agree: what belongs to a day, the day's totals and the baby's age.
- seed.tsThe pretend family: Juniper (4 months), her caregivers, four weeks of feeds, sleep and diapers with a little wobble, her growth and her firsts.
- localesEvery word the app shows, one JSON file a language; list.ts names them.
- en.jsonOne language's words, with the keys of en.json.
- es.jsonOne language's words, with the keys of en.json.
- list.tsThe languages the app offers, in the picker's order: one JSON file each, en.json the source. To remove one, delete its file and its line; to add one, copy es.json, translate it and add a line. English is built in; the rest load only when picked. TypeScript checks each file has en.json's keys, scripts/check/check-locales.mjs the rest (no extra keys, plural forms, {slots}).
baby-sprout.tsx
The page: the sections in order.
لوڈ ہو رہا ہے…
- کس کے لیے بہتر
- New parents and co-parents tracking a baby's feeds, sleep, diapers, growth and firsts, and handing over between shifts.
- یہ کیسے کام کرتا ہے
- Tap a quick-log button: it squishes and drops a clay bead onto the day ring. Drag an arc's end to fix a time; it glides onto five minutes.
- استعمال کا طریقہ
- Edit words in locales/, colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.