π CircaLog (https://circalog.vercel.app/)
A sleep tracking PWA built for humans whose bodies don't run on a 24-hour clock.
CircaLog is an open-source, offline-first Progressive Web App (PWA) designed specifically for people living with Non-24-Hour Sleep-Wake Disorder (Non-24) and other circadian rhythm disorders. Unlike every mainstream sleep app built for neurotypical sleep patterns, CircaLog tracks, visualizes, and understands the drift β the defining feature of your condition, not a flaw in your data.
Every mainstream sleep app assumes you sleep at night and wake in the morning. For the estimated 3 million people living with Non-24, this assumption makes those apps useless, or worse, actively misleading.
CircaLog was built from the ground up for people whose sleep cycle drifts continuously around the clock. It speaks your language:
Cycles, not calendar days. Actograms, not bedtime scores.
- One-tap start/stop sleep timer, or full manual time entry
- Required fields: sleep start time, wake time, quality rating (1β5)
- Optional fields: notes, dreams/nightmares, interruptions (nocturia, thirst, hunger, pain, other), medication taken (before/during/after sleep)
- Automatic nap detection (sessions under 3 hours = nap)
- Back-fill past entries going back weeks or months
- Correct night-anchor dating: sessions that cross midnight (e.g. bed at 23:10 May 31, asleep at 00:37 June 1) are displayed under the night they started, not the calendar date of sleep onset β because that is how patients and doctors think about sleep
- Actogram β the primary chart. A diagonal drift visualization showing your sleep band shifting over time, exactly as sleep researchers view Non-24 data. Time of day on the Y axis, cycle number and calendar date on the X axis.
- Time range toggle:
[ 1W ] [ 2W ] [ 1M ] [ 3M ] [ 6M ] [ 1Y ] [ All ] - Each entry displays both calendar date and cycle number simultaneously
- Free-running period estimation, displayed automatically after 14+ days of data using linear regression on sleep onset times
- Anomaly detection for significant cycle drift
- Flags for unusually short or fragmented sleep sessions
- Bedtime reminder notifications based on predicted sleep window
- Configurable lead time for reminders (default: 30β60 minutes)
- Weekly and monthly health summaries
- Export as CSV and PDF
- In-app changelog with version history
- Subtle logging streak counter for motivation
- Dark mode by default, user-selectable light/dark toggle
- Clinical + cosmic aesthetic β clean, data-forward UI with subtle night sky elements
- Color palette: dark charcoal with purple/violet accents
- Bottom tab bar (Log / Chart / History / Insights) + hamburger side drawer for secondary features (Settings, Reports, Export, About, Privacy, etc.)
- Accessible: high contrast, legible typography, mobile-first layout
- Proper bottom padding for Android and iOS system navigation bars
- Fully functional offline without login (IndexedDB local storage)
- Optional Google Sign-In to enable cloud sync and backup
- Local-first architecture: data lives on device, syncs to cloud when connected
| Layer | Technology |
|---|---|
| Framework | React 19 + Vite 8 |
| Language | TypeScript 6 |
| Styling | TailwindCSS 4 |
| Charts | Recharts 3 |
| Local Storage | IndexedDB |
| Cloud Database | Supabase (PostgreSQL) |
| Authentication | Google Sign-In (optional) |
| Hosting | Vercel |
| Serverless | Vercel Functions (V1) β Cloudflare Workers (V2+) |
| Updates | PWA Service Worker (silent auto-update) |
| URL | Content |
|---|---|
circalog.app |
Landing page / coming soon (V1) β marketing page (V2+) |
circalog.app/log |
The PWA app β permanent, never changes |
- Sleep log with required + optional fields
- Actogram drift chart with time range toggle
- Nap auto-detection
- Dark/light mode with user toggle
- PWA manifest + service worker (offline support + auto-update)
- Local IndexedDB storage
- Coming soon landing page at root domain
- Continuous Vercel deployment from GitHub
- Google Sign-In + Supabase cloud sync
- Push notifications + configurable bedtime reminders
- Free-running period calculation display
- Weekly + monthly PDF and CSV reports
- Doctor report (one-tap PDF with actogram included)
- Medication log linked to sleep patterns
- Android home screen widget (log + summary)
- Educational resources about Non-24
- Sleep debt tracker
- Multi-user / multi-tenant architecture
- Tab bar customization
- Full marketing landing page
- Public open-source release
- Potential integrations (Google Health Connect, etc.)
- Node.js 20+ (LTS recommended; required by Vite 8)
- npm
git clone https://github.com/sobhy0101/CircaLog.git
cd CircaLog
npm install
npm run devnpm run dev # Start dev server at http://localhost:5173
npm run build # TypeScript check + production bundle
npm run lint # Run ESLint
npm run format # Format src/**/*.{ts,tsx,css} with Prettier
npm run preview # Preview the production build locallyThese commands are only needed for V2+ cloud sync work. The app runs fully offline without them.
supabase login # Authenticate with the Supabase CLI
supabase init # Initialize Supabase in the project (creates supabase/ directory)
supabase link --project-ref iarozmvqcsrkdgytqzws # Link to the CircaLog Supabase projectCopy .env.example to .env.local and fill in your values:
cp .env.example .env.localVITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_publishable_keyCircaLog is open-source. Contributions are especially welcome from people living with Non-24, DSPD, or other circadian rhythm disorders β because the best people to build this tool are the ones who need it.
Please read CONTRIBUTING.md before submitting a pull request.
MIT License β see LICENSE for details.
Circa β from Latin: "approximately," "around." Log β a record, a diary, a history.
CircaLog: an approximate record of time, for people who live approximately outside of it.
Built with π for the sleepless, the drifting, and the uncounted.