Habit Tracker

A Vanilla JavaScript Case Study

The Habit Tracker is a Vanilla JavaScript application designed to help users build consistent daily habits. It features localStorage persistence, daily streak tracking and a clean, user-friendly experience. More than a productivity app, this project served as a practical case study for strengthening my understanding of application state, DOM manipulation and data modelling.

Role

Front-End Developer

Stack
  • HTML5
  • CSS3
  • Vanilla JavaScript (ES6+)
  • Local Storage
  • DOM API
Type

JavaScript Case Study

The Challenge

The main challenge of this project was not the user interface itself, but designing the application’s underlying logic. I wanted to build a habit tracker from scratch using only Vanilla JavaScript while keeping the code organized, maintainable and easy to extend with new features.

Another important challenge was managing the application’s state. Every user interaction, such as adding a habit, marking it as completed, deleting it or calculating daily streaks, had to update both the UI and the stored data consistently. This required careful handling of the relationship between the application’s state, the DOM and localStorage.

Finally, I wanted to move beyond simply making the application work. Throughout the project I focused on understanding the reasoning behind every implementation, improving the user experience with small but meaningful enhancements and writing code that was easy to read, debug and maintain.

Technical Details

Built with:

  • HTML5
  • CSS3
  • Vanilla JavaScript (ES6+)
  • DOM API
  • Local Storage API

Key concepts:

  • Application State Management
  • Single Source of Truth (SSOT)
  • DOM Manipulation
  • Event Handling
  • Local Storage Persistence
  • Dynamic Rendering
  • Array Methods (map, filter, forEach)
  • Data Modelling with JavaScript Objects
  • Streak Calculation Logic
  • UX-Oriented Interface Design

Interface & Screens

Default interface designed for everyday use.
Dark Mode providing a comfortable experience in low-light environments.