Welcome to the documentation for the Todo Application, a browser-based project built with HTML, CSS, and JavaScript. This project demonstrates state-driven UI rendering, event delegation, and persistent client-side storage without frameworks.
The Todo Application helps users manage tasks in a clean interface. Users can add tasks, toggle completion, delete tasks, filter by status, and clear completed tasks. The app persists data across refreshes using browser storage.
To run the Todo Application locally, follow these steps.
Make sure you have:
- A modern web browser (Chrome, Firefox, Edge, Safari)
- Clone the repository:
git clone <repository-url>- Navigate to the project directory:
cd <project-folder>- Open
index.htmlin a browser.
No additional setup is required.
The project uses a simple structure for readability and maintainability:
- HTML (
index.html)- App layout and structure
- CSS (
style.css)- Theme, layout, responsive styling
- JavaScript (
script.js)- State management, rendering, events, persistence
- Images (
images/)- UI icons (checked, unchecked, app icon, demo example)
This project uses no external runtime dependencies.
- No JavaScript frameworks
- No CSS frameworks
- No build tools
The application stores todos in an in-memory array. Each todo uses:
idtextdone
The DOM is not the source of truth. The UI renders from the data model.
The render flow stays consistent:
- Update state
- Save state to localStorage
- Re-render the visible list based on the active filter
The todo list uses event delegation. One list listener handles actions for dynamically created buttons.
Todos persist using localStorage:
- Save after add, delete, toggle, clear completed
- Load on startup, then render
-
Adding a task
- Type a task in the input
- Press Enter or click Add
-
Completing a task
- Click the checkbox icon to toggle completion
-
Deleting a task
- Click the delete button or 'x' on a task
-
Filtering tasks
- Use filter buttons to view All, Active, or Completed tasks
-
Clearing completed tasks
- Click Clear Completed to remove finished tasks
