How softdevdanial/streaky-habit works
Streaky Habit is a browser-only habit tracker: users record daily completions, review rings across 12 weeks or a year, and edit past days; streaks and saved state update with each change. The app module orchestrates domain rules, persistence, and screen rendering. Calendar arithmetic and ring geometry are supporting layers. The README documents the product views and local-only storage; sampled source and the SOURCE INDEX establish module dependencies. Some rendering and event wiring is only partially excerpted, so the graph omits unshown call details.
Main entry points: app.js App orchestration · calendar.js Calendar rendering · habits.js Habit rules · popups.js Dialogs and views
Components 10
App interaction
- App orchestration
src/app.js
Habit domain
- Habit rules
src/habits.js - Date utilities
src/dates.js
Views and rendering
- Main screen
src/view.js - Dialogs and views
src/popups.js - Calendar rendering
src/calendar.js - Ring geometry
src/ring.js
Browser persistence
- State persistence
src/storage.js - Browser localStorage
Other components
- Habit tracker
Connections 20
- Habit tracker → App orchestration: uses
README.md - App orchestration → State persistence: loads and saves
src/app.js - State persistence → Browser localStorage: reads and writes
src/storage.js - App orchestration → Habit rules: updates habits
src/app.js - App orchestration → Main screen: renders screen
src/app.js - App orchestration → Dialogs and views: opens views
src/app.js - App orchestration → Calendar rendering: finds day control
src/app.js - Habit rules → Date utilities: uses calendar math
src/habits.js - State persistence → Habit rules: validates habits
src/storage.js - State persistence → Date utilities: validates dates
src/storage.js - Main screen → Habit rules: calculates streaks
src/view.js - Main screen → Calendar rendering: draws overview
src/view.js - Main screen → Date utilities: formats dates
src/view.js - Dialogs and views → Habit rules: calculates streaks
src/popups.js - Dialogs and views → Calendar rendering: draws popup grids
src/popups.js - Dialogs and views → Main screen: uses stats rendering
src/popups.js - Dialogs and views → Date utilities: formats dates
src/popups.js - Calendar rendering → Habit rules: uses completion flags
src/calendar.js - Calendar rendering → Date utilities: formats calendar days
src/calendar.js - Calendar rendering → Ring geometry: uses ring geometry
src/calendar.js