A Task Management Dashboard built with React, TypeScript, and Vite. This application allows users to view, filter, sort, and manage tasks with a clean and intuitive user interface.
- Task Management: Create, read, update, and delete tasks.
- Granular Filtering & Sorting: Filter tasks by status and assignees, and sort them strictly by due date or priority.
- Real-time Feedback: Integrated toast notifications for all CRUD operations using
react-hot-toast. - Form Validation: Comprehensive front-end form validation (checking due dates, character lengths, and valid assignees).
- Persistent Storage: Uses local storage as a mock backend to persist user tasks.
- Status & Priority Indicators: Visual cues for overdue tasks, priorities, and custom status.
- Core: React 19, TypeScript, Vite
- State Management: React Hooks (Custom hooks for state isolation)
- Feedback: React Hot Toast
- Styling: Tailwind CSS (loaded via
@tailwindcss/browserCDN for prototype simplicity) - Icons: Material Icons
The architecture follows a modular approach separating concerns into logical domains:
- State Management (
hooks/):useTasks: Encapsulates all interactions with the local persistence layer and state updates.useTaskFilters: Isolates the filtering and sorting state from the main UI logic.useModal: A reusable toggle pattern for modal interfaces.
- Presentational Components (
components/):Table: Responsible only for rendering the data matrix and emitting actions.ControllerSection: A grouped toolbar for global actions (add, filters, sorts).SummarySection: Metrics aggregation.
- Utilities (
utils/taskUtils.ts): Pure functions handling the heavy lifting of sorting, filtering, and options generation, keeping the components clean.
-
Local State vs Global Store:
- Decision: Used localized component state and custom hooks rather than pulling in external tools like Redux or Zustand.
- Trade-off: Keeps the bundle size small and architecture simple for a dashboard of this scale, though it introduces slight prop-drilling (
App.tsx→ControllerSection).
-
Manual Form Validation vs External Library:
- Decision: Built custom validation logic in
AddTaskFormusing avalidateFieldpure function with touched/blur-aware error display. - Trade-off: Avoids dependency bloat from libraries like
react-hook-formorzod, but requires more boilerplate and manual maintenance for field validations.
- Decision: Built custom validation logic in
-
Mock Backend (
localStorage):- Decision: Simulates network requests using
localStoragecombined with aninitialData.jsonfetch fallback. - Trade-off: Mirrors an asynchronous setup (loading/error states) while maintaining immediate persistence without requiring a backend server. The limitation is that mutations are not synced across multiple browser tabs and the stored data is not schema-validated on load.
- Decision: Simulates network requests using
-
ID Generation (
Math.max):- Decision: New task IDs are assigned using
Math.max(...tasks.map(t => t.id)) + 1. - Trade-off: Simple and readable for a single-user, single-tab prototype. Not collision-safe for concurrent sessions — a
crypto.randomUUID()ornanoid()would be the production choice.
- Decision: New task IDs are assigned using
-
descriptionField Scope:- Decision: The
Taskmodel includes adescriptionfield (seeded viainitialData.json), but the form UI intentionally omits it to keep scope focused. - Trade-off: Reduces form complexity. Existing descriptions are preserved through edits since the save handler spreads over the original task object — only new tasks default to
"".
- Decision: The
If this project were to be scaled further, the following additions would be prioritized:
- Global State Integration: Introduce Context API or Zustand to eliminate prop-drilling for filter states and modal states.
- Server State Library: Implement
React Query(TanStack Query) to manage caching, fetching, and background synchronization when connecting to a real REST/GraphQL API. - Form Refactoring: Migrate to
react-hook-formpaired withzodfor zero-re-render form validation schemas. - Pagination / Virtualization: For
Table.tsx, implement row virtualization (e.g.,@tanstack/react-virtual) or pagination to handle datasets scaling.
Automated tests are not yet implemented.
- Node.js (v18+ recommended)
- npm or yarn
git clone git@github.com:suzit-10/task-management-system.git
cd task-management-system
npm install
npm run dev