A calm sleep tracker in eight pages: flat teal and charcoal, a sleep log with stage charts, a breathing circle and live sounds for winding down, bedtime goals, journal tags and reports.
Web
9 صفحات
$69
صفحے کا پتہ: /
نیچے مزید ↓
پہلے سے شامل
آپ کو کیا ملتا ہے
لائٹ اور ڈارکآپ کی تھیم کے رنگ استعمال کرتا ہے
ڈیسک ٹاپ، ٹیبلٹ، اور فونوہ اسکرینز جن کے لیے یہ بنایا گیا
پیکجز…
کوڈ کا سائز…
بیٹری پر ہلکا30 fps، ساکن ہو تو رک جاتا ہے
چھپنے پر رک جاتا ہےاسکرین سے باہر یا دوسرا ٹیب
کم حرکتجو لوگ کہیں ان کے لیے پرسکون
ہر تبدیلی پر جانچ
سکیورٹی جانچ 28 نومبر
ٹائپ چیکTypeScript strict
لنٹ اور فارمیٹESLint · Prettier
ٹیسٹ اور بلڈلائٹ اور ڈارک اسکرین شاٹس
سکیورٹی آڈٹکوئی ہائی یا کریٹیکل ایڈوائزری نہیں
پیکج کی عمرہر ورژن 7+ دن سے عوامی
فارغ CPUآرام میں آدھے کور سے کم، ≤ 30 fps
کوڈ
اس ایپ میں کچھ گڑبڑ ہے؟ فیڈبیک بھیجیں ›
sleep-nocturneReact
sleep-nocturne.tsxpageThe page: the sections in order.
content.tscontentEvery word and number: brand, nav links, each section's copy and lists.
theme.tsthemeThe colors as CSS variables, and the shared class strings.
README.mdreadmeHow to install it, and where to change the text, colors and form.
pagespagesOne file per page: the sections it shows, in order.
goals.tsxpageGoals (#/goals): your bedtime, wake time and sleep targets (edit in a dialog), how often you met them, tonight's plan on a line from now to waking, a 28-night calendar (each night opens) and reminders.
journal.tsxpageJournal tags (#/journal): what helps and what costs you sleep at a glance, then every tag with its nights and its effect on sleep, deep sleep and falling asleep (your nights with it against nights without). Search, a group filter and sort stay in the address; select tags to delete several; each tag opens the log filtered to it.
log.tsxpageThe sleep log (#/log): every night, newest first, with search, filters (range, rating, tag, goal) and sort kept in the address so Back brings them back, bulk select to tag or delete (with Undo), and Log a night.
night.tsxpageOne night (#/night/<id>): its date and times, earlier and later nights, Edit and Delete, and three tabs kept in the address: Stages (the tall stage chart, stage toggles, totals against typical shares, times awake), Notes and tags, and Compare against your averages.
overview.tsxpageThe overview (#/): last night on a deep card beside the breathing circle, this week's numbers, the bedtime consistency strip and goals, weekly averages and what moves your sleep, then recent nights and quick wind-down favorites. Every tile opens the list it counts.
reports.tsxpageReports (#/reports?range=12): averages over 4 weeks, 12 weeks or 6 months (the range stays in the address), sleep each night, bed and wake by week, stage share by week and tag impact, and every night in the range as a CSV file.
settings.tsxpageSettings (#/settings?tab=…): Profile (name and email), Appearance (theme, palette, language), Sleep (12 or 24 hour clock, first day of the week) and Data (export every night, start the demo over). The tab stays in the address.
sign-in.tsxpageThe sign-in page (#/sign-in), without the rail: the form on the start side and a deep card with the breathing circle and a few calm words on the other (under the form on phones).
winddown.tsxpageWind-down (#/winddown): the breathing player on a deep card (pattern, length, start, pause, stop; a finished or stopped session is logged), the live sounds with volumes and a sleep timer, favorites and recent sessions. #/winddown?fav=<id> opens with a favorite ready.
sectionssectionsOne file per page section.
account-menu.tsxsectionThe 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.tsxsectionSettings → Appearance: the theme (System, Dark or Light) as small previews, the palette (Brand or one of eight, each a swatch of its accent on its deep card) and the language (System or one of locales/list.ts).
breath.tsxsectionThe breathing circle: a soft disc that grows as you breathe in, holds, and shrinks as you breathe out, with the phase and its count in the middle. It runs on the shared clock (30 redraws a second, paused off screen and in hidden tabs); with reduced motion it stays still and shows the pattern's steps.
dock.tsxsectionThe phone dock along the bottom: the first four pages and More (the rest in a sheet), with the same gliding block as the rail. Shown below 48rem, where the rail hides.
favorites.tsxsectionWind-down favorites (a pattern, a length and a sound mix under a name: start, rename, delete, move up and down, save the current one) and the recent sessions list.
log-rows.tsxsectionThe log's rows: one per night (date, bed and wake, the stage line, time asleep, rating, tags), each opening its night; a check box on each and Select all for bulk actions (add a tag, delete with Undo). A table on wide screens, stacked rows on phones.
night-form.tsxsectionThe night form in a dialog: log a new night or edit one (date, bed and wake time, minutes to fall asleep, a rating out of five, tags and notes). Saving goes through the fake API and the log updates in place.
night-tabs.tsxsectionA night's other two tabs: Notes and tags (edit and save in place) and Compare (this night against the last 7 and 28 nights' averages).
overview-cards.tsxsectionThe overview's other cards: this week's numbers (each opens the log filtered to it), the goals ring, what moves your sleep, weekly averages, recent nights and quick wind-down favorites.
overview-top.tsxsectionThe overview's first cards: last night on a deep card (time asleep, score and the stage chart), the breathing card with its circle, and the bedtime consistency strip of the last 14 nights against the goal window.
rail.tsxsectionThe rail on the end edge: the crescent logo, the seven pages as icon and name with a block that glides to the current one, and the theme switch and account menu at the foot. The phone dock (dock.tsx) takes its place on small screens.
reminders.tsxsectionThe reminders card: each reminder (wind-down, bedtime or wake) with its time and days, a switch to turn it on or off, edit and delete; and the form to add or edit one.
report-charts.tsxsectionThe report charts: sleep each night as a line against the goal, bed-to-wake bars by week, stage share by week as stacked bars, and tag impact as bars either side of zero. Each reads the chart variables, so the Chart Studio restyles them.
sign-in-form.tsxsectionThe 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.
sounds.tsxsectionThe sounds card: six sounds made live in the browser, each on or off with its own volume, Play and Stop (sound starts only from that click and stops when the tab is hidden), and a sleep timer.
stage-chart.tsxsectionThe stage chart (a hypnogram): one lane per stage, awake on top and deep at the bottom, each stretch of the night a band in its lane; it sweeps in from the start edge when a night shows. And the thin one-line version for list rows.
tag-form.tsxsectionThe tag form in a dialog (a name and a group; a name already taken is refused) and the delete step for one or several tags, which takes them off every night.
top-band.tsxsectionThe band over every page: a greeting by time of day, the countdown to tonight's wind-down and bedtime (it opens Wind-down), search, and Log a night; on phones also the logo, the theme switch and the account menu.
ui.tsxsectionThe small pieces every page shares: the card and its head, the page head, the segmented switch with its gliding block, rating dots, stage swatches, a "more" link and the confirm dialog.
partspartsWhat several sections share.
buildbuildWhat several sections share.
cardscardsWhat several sections share.
draw.tspartThe draw card style: cards just fade in, and the data does the show.
rowsrowsWhat several sections share.
unfold.tspartThe unfold row motion: each row on screen opens down from its top edge, from faint.
core.tsxpartThe 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.tspartThe 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.tspartHow the app looks right now: dark or light from Settings → Appearance and the page around it, and the palette picked there.
avatar.tsxpartA person's initials in a round badge, tinted with the primary.
backdrop.tsxpartThe backdrop behind the pages: a still night drawn from the ground and panel colors only, a field of small stars toward the top end and wide moon rings low at the start, as strong as the Glow setting; with followBackground it paints your background instead.
clock.tspartOne shared animation clock for the breathing circles: a single frame loop at most 30 times a second, running only while a listener is on screen, playing and the tab is visible.
command-palette.tsxpartThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
csv.tspartExport CSV: turns rows into a CSV file and hands it to the browser to save.
dialog.tsxpartA centered modal dialog (a form, a confirm): rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
field.tsxpartA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
format.tspartHow numbers, dates, clock times and durations are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."; "22:30" or "10:30 PM"; "7h 42m").
glider.tspartThe marker that glides to the current item: the rail's block, the phone dock, segmented controls and tab rows. A hard block on a soft spring that settles without overshoot, measured from each item's own box (never offsetLeft).
icons.tsxpartThe logo and the line icons, drawn on a 24-unit grid with round ends.
language.tspartThe 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).
live-clock.tsxpartOne shared clock for everything live: it ticks only while something on screen listens and the tab is visible. What a tick does (move the demo's time) is the app's, passed to liveClock.
moments.tspartThe animations the rail, the stage chart's sweep, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
motion.tspartMotion helpers: the reduced-motion check, live, and run-once-in-view.
now.tspartThe time of day, in minutes after midnight, kept up to date by the shared live clock (every 30 seconds, only while something on screen shows it and the tab is visible).
palettes.tspartThe eight palettes (the same as meta.json's presets): one accent (Primary), one neutral hue (Tint) and a deep tone for light sleep, the second chart series (Secondary). theme.ts works every shade out of them.
router.tspartThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
scroll-to-view.tspartScrolls an element into view moving only its own scroll container, never the page around it.
select-box.tsxpartA native select dressed to match the app: no browser arrow, a drawn chevron instead.
session.tspartWhether 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.tsxpartThe 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.
sound.tspartThe wind-down sounds, made live with Web Audio from noise and filters (no sound files): rain, ocean, brown noise, a fan, forest wind and pink noise. They start only from a click, stop when the tab is hidden, and can stop themselves on a sleep timer.
states.tsxpartThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
store.tspartThe app-wide state several parts share: the theme mode and palette (kept in the browser) and the toasts.
ticker.tsxpartA number that counts up while its page builds in, and rolls to its new value whenever it changes.
toasts.tsxpartThe toasts: short notes that confirm what just happened, at the bottom end.
use-api.tspartLoads 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.tspartOpens 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.
datadataThe pretend data and the fake API: swap it for your backend.
account.tsdataThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
api.tsdataThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
rules.tsdataThe sleep rules every number in the app counts by: time asleep, stage totals, the score, goals met, the log's filters and the reports. The fake API and the pages both use them, so a tile and the list it opens always agree.
sleep.tsdataThe pretend sleep data: six months of nights with their stages, the journal tags, goals and reminders, breathing patterns, sounds and saved wind-down sessions. Everything is made from a fixed seed, counted back from today, so the demo always ends last night.
localeslocalesEvery word the app shows, one JSON file a language; list.ts names them.
en.jsoncontentOne language's words, with the keys of en.json.
es.jsoncontentOne language's words, with the keys of en.json.
list.tscontentThe 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-locales.mjs the rest (no extra keys, plural forms, {slots}).
sleep-nocturne.tsx
The page: the sections in order.
لوڈ ہو رہا ہے…
کس کے لیے بہتر
Sleep, health and habit apps that log nights, show sleep stages and guide a steady evening routine.
یہ کیسے کام کرتا ہے
Nights sweep in as stage bands, a breathing circle grows and shrinks, sounds play live, and every tile opens a filtered log.
استعمال کا طریقہ
Edit words in locales/, colors and fonts in theme.ts, and swap the bodies in data/api.ts for calls to your backend.