A take‑home assignment implementing a kanban‑style pipeline with drag‑and‑drop, CRUD, and local persistence. Built with Next.js 15, TypeScript, Tailwind CSS, and @dnd-kit.
This app visualizes a simple workflow with four columns: To Do, In Progress, Review, and Done. Tasks can be created, edited, deleted, and reordered via drag‑and‑drop within and across columns. State persists to localStorage so changes survive reloads.
- Drag‑and‑drop across columns powered by
@dnd-kit - CRUD for tasks: add, edit (inline), delete with confirm
- Local persistence via
localStorage - Responsive layout with scrollable columns
- Unit tests with Vitest and Testing Library
Next.js 15(App Router)React 19+TypeScriptTailwind CSS 4@dnd-kit/core,@dnd-kit/sortable,@dnd-kit/utilitiesVitest+@testing-library/react+@testing-library/jest-dom
From the assignment plan:
- Columns representing workflow stages
- Smooth drag‑and‑drop with visual feedback
- CRUD operations and local persistence
- Mobile‑friendly interactions
- One “twist” feature - Search by title/assignee/priority
- Node.js
>= 18 - npm (or pnpm/yarn/bun)
npm install
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm start- Add tasks using the form at the top of the board.
- Drag tasks within a column to reorder, or across columns to change stage.
- Click the edit icon on a task to rename; Save or Cancel to finish.
- Click the delete icon; confirm to remove.
npm run dev— start the dev servernpm run build— build for productionnpm start— run the built appnpm test— run test suite oncenpm run test:watch— run tests in watch modenpm run lint— run ESLint
- Test runner: Vitest with
jsdomenvironment. - DOM helpers: Testing Library and
jest-dommatchers. - Setup file:
vitest.setup.tsextendsexpectand cleans up after each test.
Run tests:
npm test
# or
npm run test:watchsrc/
├── app/
│ ├── page.tsx # Renders the Board
│ └── layout.tsx # App shell
├── components/
│ ├── Board.tsx # DndContext + DragOverlay
│ ├── Column.tsx # Droppable + SortableContext
│ ├── Task.tsx # Sortable item with inline edit/delete
│ ├── TaskForm.tsx # Add new tasks
│ ├── Task.test.tsx
│ └── TaskForm.test.tsx
├── hooks/
│ ├── useTasks.ts # CRUD + reorder + move + persistence
│ └── useLocalStorage.ts
├── types/
│ └── index.ts # Task, Column, Priority types
└── utils/
├── helpers.ts # generateId, now
└── helpers.test.ts
export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
description?: string;
priority: Priority;
assignee?: string;
createdAt: Date;
updatedAt: Date;
columnId: string;
}
export interface Column {
id: string;
title: string;
taskIds: string[];
}BoardinitializesDndContextand renders columns and an overlay during drag.Columndeclares droppable area and a sortable list of task IDs.TaskusesuseSortableto enable drag and inline edit/delete operations.useTaskspersiststasksandcolumnstolocalStorageand exposes helpers.
- Focused on core functionality first; UI kept intentionally simple.
- Tests cover helpers, TaskForm submission behavior, and Task edit/delete flows.
vitest.config.tssetsjsdomenv and React plugin for JSX transform.
- Recommended: deploy to Vercel.
- Any Node host works: build with
npm run buildthennpm start.