Responsive Todo App built with CSS custom properties, Flexbox and ES6+

Solution retrospective
Great question! Here's an honest reflection:
-
The modular architecture — Clean separation into
todoStore,todoRenderer,themeToggle, anddragDropmodules. Each has a single responsibility and they communicate through callbacks. It's maintainable and easy to extend. -
The CSS variable theming system — Switching the entire app's appearance by toggling one
data-themeattribute on<html>, with zero JavaScript touching individual element styles. Elegant and performant. -
Pixel accuracy — Comparing the screenshots against the original Figma designs, the result is very close — spacing, colors, typography, gradients, and responsive breakpoints all match.
-
Test the production build earlier — The
BASE_URLicon path bug would've been caught immediately if I'd runnpm run build && npm run previewbefore the first push. Lesson: always verify prod before deploying. -
Use
importfor assets instead ofpublic/— Instead of putting images inpublic/and referencing them with string paths (which Vite can't fully optimize), I should have usedimport iconSun from '../images/icon-sun.svg'— Vite would then hash, optimize, and resolve all paths automatically. NoBASE_URLbug would've occurred. -
Add a
package-lock.jsoncheck — The.gitignoredidn't explicitly handlepackage-lock.json, which should be committed for reproducible CI builds. -
Accessibility testing — While I added ARIA labels and keyboard support for checkboxes, I should have done a full keyboard navigation test and screen reader pass. The drag-and-drop, in particular, needs an accessible alternative (e.g., move up/down buttons).
-
CSS organization — The 5-file CSS split is good, but I could've been more consistent with naming (BEM methodology) and added a
_variables.csspartial specifically for tokens, separate from the reset.
Those are honest takeaways — the kind of things that make the next project better!
What challenges did you encounter, and how did you overcome them?Here are the real challenges we hit during this build, and how each was solved:
- Vite Initialization in an Existing Directory Problem: npx create-vite@latest ./ cancelled because the directory already had files (README, images, design folder). Solution: Manually scaffolded the Vite project — created package.json, vite.config.js, and the src/ directory structure by hand. Sometimes the scaffold tools aren't flexible enough, and knowing what they generate lets you do it manually.
Here are the key areas where community feedback would be most valuable:
Accessibility — Is the keyboard navigation sufficient? The drag-and-drop currently has no keyboard alternative (e.g., arrow keys to reorder). Would love feedback on screen reader experience with the ARIA labels.
CSS precision — How close is the implementation to the original Figma? Spacing, font sizes, and shadow values were estimated from the JPG designs. Any pixel-level corrections from someone with Figma Pro access would help.
Mobile touch drag UX — The long-press-to-drag interaction on mobile works but may not feel intuitive without visual cues. Is a drag handle icon needed? Should there be haptic feedback or a tooltip?
Performance at scale — The current approach re-renders the entire list on every change. With 100+ todos, would a virtual list or DOM diffing strategy be needed? Looking for real-world stress-test feedback.
Code organization — Is the 4-module JS split (store, renderer, theme, drag) the right granularity, or would the community suggest a different pattern for vanilla JS apps at this scale?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Elsayed Bondok’s solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord