Frontend School

Interactive Kanban Board with Drag & Drop

Machine Coding
medium

Interactive Kanban Board with Drag & Drop

Medium
React
Frontend
Kanban
Drag and Drop
State Management
UI/UX

Overview

Kanban boards are essential tools in agile project management, providing a visual representation of work at various stages of completion. They help teams track progress, identify bottlenecks, and maintain workflow efficiency. For a company like Inmobi, managing ad campaigns, feature development, or operational tasks often benefits from clear, intuitive visual tracking. This problem challenges you to build a foundational interactive Kanban board, demonstrating your ability to manage UI state, handle user interactions, and structure a component-based application effectively.

What you need to do / Task

Your goal is to implement a functional, interactive Kanban board where users can manage tasks across different workflow stages.

  1. Render the Board: Display multiple columns (e.g., "To Do", "In Progress", "Done") based on provided initial data. Each column should clearly represent a stage.
  2. Display Tasks: Within each column, render individual task cards. Each card should display at least a task title.
  3. Add New Tasks: Implement a mechanism (e.g., an input field and a button within each column) to allow users to add new tasks to a specific column. New tasks should appear at the bottom of the column.
  4. Drag-and-Drop Tasks: Enable users to drag task cards:
    • Between columns: Move a task from one workflow stage to another (e.g., from "To Do" to "In Progress").
    • Within a column: Reorder tasks within the same column.
  5. State Management: Ensure that the application's state (which tasks are in which column, and their order) is correctly updated after any task movement or addition.

UI/UX expectations

  • Layout: The board should display columns side-by-side. Each column should have a distinct visual boundary.
  • Task Cards: Each task should be represented by a visually distinct card.
  • Interactivity: Provide clear visual feedback when a task is being dragged (e.g., a "ghost" image of the card, highlighting potential drop zones).
  • Responsiveness: A basic responsive layout is expected, ensuring columns adapt reasonably on smaller screens (e.g., wrapping or minimal horizontal scroll).
  • Accessibility: Basic semantic HTML elements should be used for interactive components.

Acceptance criteria

  • The application renders three distinct columns: "To Do", "In Progress", "Done".
  • Each column correctly displays its associated tasks from the initial data.
  • A user can successfully add a new task to any column, and it appears in that column.
  • A user can drag a task card from one column and drop it into another, updating its column assignment.
  • A user can drag a task card within the same column to reorder it.
  • The application state (task positions and column assignments) updates correctly after drag-and-drop operations and new task additions.

Constraints

Constraints & assumptions

  • You should use React for this implementation.
  • All application state should be managed client-side; no backend API calls or database persistence are required.
  • Focus on core functionality. While styling is important for clarity, pixel-perfect design is not the primary goal.
  • You are encouraged to use a suitable drag-and-drop library (e.g., dnd-kit, react-beautiful-dnd) to expedite the implementation of D&D functionality. Time spent on building custom D&D from scratch will not be evaluated positively given the time budget.
  • The initial data for columns and tasks will be provided in the App.tsx file.

Out of scope

  • Backend integration or API calls for data persistence.
  • User authentication or authorization.
  • Complex task editing (beyond adding a title).
  • Advanced features like task filtering, sorting, search, or priority levels.
  • Extensive error handling beyond basic input validation.

What interviewers evaluate

  • Component Design & Structure: How well you break down the UI into reusable and maintainable React components.
  • State Management: Your approach to managing application state (tasks, column assignments) and ensuring UI updates correctly.
  • Drag-and-Drop Implementation: Effective integration and utilization of a D&D library to achieve the required interactions.
  • Code Quality: Readability, organization, adherence to React best practices, and overall code elegance.

Loading editor...