A Todo List application built with React, focused on scalable architecture and modern state management patterns.
- React 19 — hooks, context, performance optimization
- Vite — build tool and dev server
- SCSS Modules — scoped component styles with CSS variables
- json-server — mock REST API for local development
- Add, complete, and delete tasks
- Real-time search with case-insensitive match highlighting
- CSS enter/exit animations on task add and delete
- Smooth scroll to the first incomplete task
- Form validation without external libraries
- Client-side routing with dynamic segments (
/tasks/:id) - Task detail page with async data fetching
- Feature-Sliced Design — project structure follows FSD methodology
- Custom router — client-side routing via
history.pushStateandpopstate, built without React Router or any routing library - Dual API layer —
json-serverin development,localStoragein production. Switching is controlled viaVITE_STATIC_BACKENDenvironment variable, all feature code stays unchanged - State management —
useReducer+useContextinstead of Redux. Context value is memoized to prevent unnecessary re-renders - Performance —
memo,useCallback, anduseMemoapplied where re-renders would otherwise propagate through the list - XSS protection — search highlight escapes HTML entities before
injecting markup via
dangerouslySetInnerHTML - Custom hooks —
useTasks,useIncompleteTaskScroll,useCombinedRefsto keep logic separate from UI
git clone https://github.com/IlliaSHP/todo-react.git
cd todo-react
npm installDevelopment mode — with json-server REST API:
npm run server # terminal 1: start mock API on port 3001
npm run dev # terminal 2: start dev serverProduction mode — with localStorage instead of json-server:
npm run build
npm run previewmain— production-ready source codedevelop— integration branch for completed featuresgh-pages— built and deployed version (GitHub Pages)
