A modern Kanban task board application built with React, TypeScript, and Vite. This application allows you to manage tasks by dragging and dropping them between different status columns (To Do, In Progress, Done).
- Task Management: Create, view, and organize tasks
- Drag & Drop: Intuitive drag and drop interface for moving tasks between columns
- Status Tracking: Visual representation of task progress across three states
- Responsive Design: Fully responsive layout that works seamlessly on desktop, tablet, and mobile devices
- Mock API: Simulated backend with MSW for development and production
- Node.js (v18 or higher)
- pnpm (v8 or higher)
-
Clone the repository:
git clone <repository-url> cd task-manager-frontend
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open your browser and navigate to:
http://localhost:5173
To create a production build:
# Standard build (mocks disabled)
pnpm build
# Build with mock API enabled
pnpm build:with-mocksTo preview the production build:
pnpm previewThe application follows a component-based architecture with a focus on separation of concerns:
- KanbanBoard: Main container component that manages the overall state and data flow
- TaskColumn: Represents each status column (To Do, In Progress, Done)
- TaskCard: Individual task card with drag and drop capabilities
- TaskForm: Modal form for creating new tasks with shadcn UI components
The application uses React's built-in state management with hooks:
useStatefor local component stateuseEffectfor side effects like API calls
- Tasks are fetched from the mock API on initial load
- User interactions (adding tasks, drag and drop) trigger API calls
- UI updates reflect the changes from the API responses
The drag and drop functionality is implemented using @dnd-kit:
- Tasks can be dragged between columns
- When a task is dropped in a new column, its status is updated via the API
- The UI updates immediately for a responsive feel
The application is fully responsive and works well on all device sizes:
- Mobile: Columns stack vertically for easy scrolling on small screens
- Tablet: Adapts layout for medium-sized screens
- Desktop: Full horizontal layout with multiple columns visible
- Touch-friendly: Optimized for touch interactions on mobile devices
This project uses MSW (Mock Service Worker) to simulate a backend API:
GET /api/tasks- Fetch all tasksPOST /api/tasks- Create a new taskPATCH /api/tasks/:id/status- Update task statusPUT /api/tasks/:id- Update task detailsDELETE /api/tasks/:id- Delete a task
The mock API can be enabled in both development and production:
# Enable mocks in production
pnpm build:with-mocks
# Disable mocks in production (default)
pnpm build:no-mocksEnvironment variables in .env files control this behavior:
VITE_ENABLE_MOCKS=true- Enable mock APIVITE_ENABLE_MOCKS=false- Disable mock API