Frontend School

Interactive Kanban Board

Machine Coding
medium

Interactive Kanban Board

Medium
UI
React
TypeScript
State Management
Drag and Drop

Overview

Kanban boards are a popular tool for visualizing workflows and managing tasks efficiently across teams. This problem challenges you to build a simplified, interactive Kanban board. It focuses on core UI component design, effective state management, and implementing basic drag-and-drop functionality to manage tasks.

What you need to do / Task

Your goal is to build a functional web application that displays a Kanban board with multiple columns and allows users to manage tasks.

  1. Render Columns and Tasks: Display a Kanban board with at least three predefined columns (e.g., "To Do", "In Progress", "Done"). Each column should render a list of task cards.
  2. Display Task Details: Each task card should clearly display its title and a brief description.
  3. Add New Task: Provide an input field and a button (e.g., at the top of the "To Do" column or at the bottom of the board) to add new tasks. Newly added tasks should appear in the "To Do" column.
  4. Drag-and-Drop Tasks: Implement drag-and-drop functionality that allows users to move tasks from one column to another. When a task is dropped into a new column, the UI should update to reflect its new status.

UI/UX expectations

  • Layout: Columns should be arranged horizontally, and tasks within columns vertically. Use clear visual separation (e.g., borders, background colors) to distinguish columns and task cards.
  • Task Cards: Each task should be represented as a distinct card, making its title and description easily readable.
  • Drag Feedback: When a task is being dragged, there should be some visual indication (e.g., a ghost image of the task, a change in cursor). When a task is hovered over a valid drop target (another column), that column could visually indicate it's a target.
  • New Task Input: The input area for adding a new task should be intuitive and easy to use.

Acceptance criteria

  • The application successfully renders the initial Kanban board with predefined columns and tasks.
  • Users can add a new task, providing a title and description, which then appears in the "To Do" column.
  • Tasks can be dragged from any column and dropped into any other column.
  • Upon a successful drop, the task visually moves to the target column, and the application's internal state is updated accordingly.
  • Task titles and descriptions are displayed correctly on their respective cards.

Constraints

Constraints & assumptions

  • You should use React with TypeScript for this problem.
  • All data management will be client-side; no backend API calls are necessary.
  • Assume a fixed set of columns; there's no need to implement adding or removing columns.
  • Focus on functional correctness for drag-and-drop; sophisticated animations or reordering within a column are not required given the time budget.
  • You may use native HTML5 Drag and Drop API or a lightweight library if you are proficient, but native is often sufficient for this scope.
  • Initial data will be provided as mock data within the App.tsx file.

Out of scope

  • Persisting data (e.g., to localStorage or a backend).
  • Reordering tasks within a column.
  • Editing or deleting existing tasks.
  • Advanced accessibility features beyond basic semantic HTML elements.
  • Responsive design for various screen sizes (basic flexbox/grid layout is sufficient).

What interviewers evaluate

  • Architectural Design: How well the UI is broken down into components, and how responsibilities are separated.
  • State Management: Effective use of React's state management capabilities (e.g., useState, useReducer) to manage the board's data and interactions.
  • Interaction Implementation: Correct and robust implementation of the drag-and-drop functionality and new task creation.
  • Code Quality: Readability, maintainability, type safety, and adherence to best practices for React and TypeScript.

Loading editor...