MindRhythm is a local-first stability forecasting website for sleep, stress, workload, mood, energy, and quick manual check-ins. It is a reflection tool, not a diagnosis tool.
node server.jsOpen http://localhost:3000.
To enable AI-generated stabilization plans:
$env:OPENAI_API_KEY="your_api_key"
node server.jsOptional model override:
$env:OPENAI_MODEL="gpt-5.1-mini"
node server.js- Upload Apple Health
export.xmlin the Upload tab. - MindRhythm parses sleep records locally in the browser and stores nightly summaries in
localStorage. - Add daily Check-Ins with mood, stress, workload, energy, sleep hours, sleep quality, connection, overwhelm, and an optional note.
- Open Dashboard to see baseline sleep, manual check-in count, forecast confidence, 24/48/72-hour forecast cards, charts, top drivers, and a stabilization plan.
server.js: static localhost server plusPOST /api/stabilization.static/index.html: the full UI, Apple Health XML parser, local model, dashboard rendering, canvas charts, and check-in storage.
- Apple Health sleep data is grouped by sleep night. Records before noon are assigned to the previous night so overnight sleep is not split incorrectly.
- Baseline sleep uses the earliest available nights, up to 14 nights, from the uploaded XML.
- Manual check-ins are permanent browser data until cleared. Older check-ins remain in
localStorageand recent check-ins are used in forecasts. - Manual sleep hours and sleep quality now contribute to the instability signal. If no XML exists, typical sleep comes from manual sleep entries only.
MindRhythm uses a transparent weighted score from 0 to 100.
- Sleep duration below baseline
- Manual sleep quality below the steady range
- Sleep efficiency below baseline
- Stress above baseline
- Mood below baseline
- Workload above baseline
- Energy and social connection below the steady range
Forecast windows:
- 24 hours: latest check-in plus last sleep night
- 48 hours: recent 48-hour trend
- 72 hours: next 72-hour outlook
Forecast states:
0-27: Stable28-51: Watch Zone52-74: Elevated Instability75-100: High Instability
Confidence answers how much the user should trust the forecast right now.
- Apple Health mode combines sleep-history volume, XML presence, check-in volume, and baseline availability.
- Manual-only mode starts lower, rewards check-in count, recency, completeness, and manual sleep entries, and caps at 70%.
- The app should say it lacks data rather than fabricating a sleep baseline.
The dashboard first shows a local driver-based stabilization plan. Clicking Generate AI plan sends summarized forecast context to /api/stabilization. The server calls the OpenAI Responses API when OPENAI_API_KEY is configured. If not configured or if the request fails, the UI keeps a local fallback plan.
Only summarized forecast context is sent to the endpoint; raw Apple Health XML is not sent.
MindRhythm is not medical advice and does not diagnose or treat mental health conditions. If someone feels unsafe or in crisis, they should contact emergency services, 988 in the U.S., or a trusted adult immediately.