PROJECT 004 · 2026 · JS · LOCALSTORAGE
Ritual
A habit tracker: add daily habits, tick them off and see today's progress. Every new day, habits reset by themselves.
- lines of JavaScript
- ~160
- file
- 1
- built
- May 2026
- libraries
- 0
00 · Summary
- WHAT
- Calm, minimal habit tracker
- MY ROLE
- Solo
- STACK
- Vanilla JavaScript, localStorage, HTML, CSS
- STATUS
- Live. A small project to train the fundamentals.
01 · Why I built it
After Journalist I wanted to rebuild the basics in a small, clean project: state, rendering from data, events and localStorage. Intentionally simple, but finished and polished, not another generic to-do app.
02 · What it does
- Add and delete habits
- Mark habits as done
- "Completed today: x / y" counter
- Automatic daily reset
- Random quote on each visit
- Saved in localStorage
03 · Architecture
04 · Hard parts
- P-01
A reset that never deletes.
The daily reset clears only the status, never the habits themselves.
- P-02
Missing data.
On the first visit
localStoragereturnsnull, so the app has to start from a safe default. - P-03
One array, one truth.
The whole UI comes from the
habitsarray. Change the data, render again.
05 · Known issue
Known issue
getTodayDate() uses toISOString(), which is UTC time. In Poland habits reset at 1:00 at night (2:00 in summer), not at midnight. The fix is to build the date from local time.
06 · What I learned
- Small projects are the best place to train fundamentals.
- Render the UI from the data, never the other way round.