Apps and websites · TypeScript · Full-stack app
Streak.
A calm, minimal habit tracker. One tap a day keeps a streak going, and it syncs between your phone and laptop. Rest days and excused days keep a streak alive without adding to it, so one bad day doesn't wipe out a month. It installs on a phone like an app and works offline. Still in progress.
One habit over the last four weeks. Tap a day to change it: done, rest, excused, then
empty again. The numbers come from the app's real streak.ts, the same file
its tests cover. You can't change days in the future, and today doesn't count as missed
until it's over.
- Done
- Rest day
- Excused
- Missed
- Today
- 0
- Current streak
- 0
- Best streak
- 0
- Times done
- 0
- Rest days left this month
The production build of the app. It needs an account, since your habits sync through Supabase and every account only sees its own data. For the full experience, open it on a phone and add it to the home screen.
The streak maths and the new-habit chat are pure TypeScript with no UI and no clock, which makes them easy to test. 23 tests cover them.
How it's built
A check-in is shown straight away, queued on the device and sent to Supabase. If it fails, a notice offers Retry, and the queue also retries when you're back online or reopen the app. It even survives a reload.
The last loaded data is kept on the device, so Today opens instantly and works without a connection. Fresh data replaces it as soon as the network answers.
Row-level security in Postgres means each account can only read and write its own habits. The browser only ever has the public anon key.
Rest days carry a bar and excused days a dot, every day in the heatmap has a label, and muted text is checked for contrast.