How ersindoldur/todo-app-frontend-mentor works
Project type and purpose
• This is a single‐page, front-end only “Todo” app built as a coding challenge.
• There is no server‐side component or external API—everything runs in the browser and data is persisted locally (e.g., localStorage).
• It is a static site composed of HTML, CSS, JavaScript, plus design assets.
File structure
• Top-level files:
• index.html – the single page entry point
• README-*.md – documentation templates
• LICENSE, .gitignore, .gitattributes
• Directories:
• design/ – JPG mockups (mobile & desktop)
• No “backend,” “api,” or “src” folder – all logic lives in a script linked from index.html.
README for additional insights
• It outlines user stories (add/delete/complete/filter todos, theme toggle, drag-and-drop reorder).
• It points to assets and design mockups.
• It gives no mention of external services or build steps (it’s purely HTML/CSS/JS).
Components
a. Browser & User Interface
– index.html + CSS (light/dark theme styles) + JavaScript controller
b. Client-side state management
– In-memory JavaScript data structures (array of todo items)
– Persistence layer: localStorage
c. Design assets module
– design/ folder (for reference, not part of runtime)
d. Deployment/Hosting
– Static site hosting (GitHub Pages, Netlify, Vercel)
– CDN delivering index.html, CSS, JS, and image assets
Relationships and interactions
• User interacts via browser UI → JavaScript handles events (add, complete, delete, filter, reorder, theme toggle).
• JavaScript updates both the DOM and the in-memory data.
• On each change, JavaScript writes the updated state to localStorage (persistence).
• On page load, JavaScript reads from localStorage to hydrate the in-memory state & render the list.
• Static assets (CSS, JS, images) are fetched over HTTP from the hosting/CDN.
Architectural patterns and principles
• Separation of concerns:
• HTML for structure
• CSS for presentation (style-guide tokens, responsive breakpoints)
• JS for behavior & state
• Model-View-Controller-Lite:
• Model: the todo‐items array + localStorage
• View: DOM elements (list, filters, theme toggle)
• Controller: event handlers & state synchronization
• Progressive enhancement & responsive design: mobile & desktop layouts via CSS media queries.
Putting it all together
• Inside, nest three components in order of execution:
• index.html & CSS (View)
• JavaScript (Controller)
• localStorage (Model)
• On the left, list “images/” as a resource node feeding into the Browser.
• Component with the relevant technologies: HTML5, CSS3 (media queries, custom properties), vanilla JS (ES6+), localStorage API.
• HTTP GET from CDN → Browser
• UI events → JS
• JS read/write → localStorage
• Browser render → User