Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Frontend Developer Assessment

A comprehensive React + TypeScript project implementing two interactive components: a Tree View and a Kanban Board.

πŸ”— Links

  • Live Demo: [Add your deployed URL here]
  • Repository: [Add your GitHub repository URL here]

πŸ“‹ Table of Contents

🎯 Overview

This project is a solution to a Frontend Developer Assessment containing two practical questions:

  1. Tree View Component - A fully functional hierarchical tree structure with drag & drop, lazy loading, and CRUD operations
  2. Kanban Board Component - A task management board with three columns and drag & drop functionality

✨ Features

Question 1: Tree View Component

  • βœ… Expand/Collapse Nodes - Toggle node visibility with animated arrows
  • βœ… Add Child Nodes - Create new nodes with inline input form
  • βœ… Delete Nodes - Remove nodes with confirmation dialog (including subtrees)
  • βœ… Drag & Drop - Reorder and move nodes across the hierarchy
  • βœ… Lazy Loading - Simulate async API calls when expanding nodes
  • βœ… Inline Editing - Double-click or click edit button to rename nodes
  • βœ… Keyboard Shortcuts - Enter to save, Escape to cancel
  • βœ… Visual Feedback - Loading indicators and hover states

Question 2: Kanban Board Component

  • βœ… Three Columns - To Do, In Progress, and Done
  • βœ… Add Cards - Create new task cards in any column
  • βœ… Delete Cards - Remove cards with confirmation
  • βœ… Drag & Drop - Move cards between columns seamlessly
  • βœ… Inline Editing - Edit card titles on the fly
  • βœ… Responsive Design - Mobile-friendly layout that stacks vertically
  • βœ… Card Ordering - Maintains order within each column
  • βœ… Visual Indicators - Card counts, empty states, and drag feedback
  • βœ… Modern UI - Gradient backgrounds and smooth animations

πŸ› οΈ Tech Stack

  • React 18+ - UI library
  • TypeScript - Type safety and better developer experience
  • Vite - Fast build tool and dev server
  • CSS3 - Modern styling with gradients and animations
  • HTML5 Drag & Drop API - Native drag and drop functionality
  • React Hooks - useState, useRef, useEffect for state management

πŸ“ Project Structure

frontend-assessment/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ TreeView/
β”‚   β”‚   β”‚   β”œβ”€β”€ TreeView.tsx       # Main tree component
β”‚   β”‚   β”‚   β”œβ”€β”€ TreeNode.tsx       # Individual node component
β”‚   β”‚   β”‚   └── TreeView.css       # Tree styling
β”‚   β”‚   └── Kanban/
β”‚   β”‚       β”œβ”€β”€ KanbanBoard.tsx    # Main board component
β”‚   β”‚       β”œβ”€β”€ Column.tsx         # Column component
β”‚   β”‚       β”œβ”€β”€ Card.tsx           # Card component
β”‚   β”‚       └── Kanban.css         # Kanban styling
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   β”œβ”€β”€ tree.ts                # Tree type definitions
β”‚   β”‚   └── kanban.ts              # Kanban type definitions
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ treeHelpers.ts         # Tree utility functions
β”‚   β”‚   └── kanbanHelpers.ts       # Kanban utility functions
β”‚   β”œβ”€β”€ App.tsx                    # Main app with navigation
β”‚   β”œβ”€β”€ App.css                    # Global styles
β”‚   └── main.tsx                   # Entry point
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ vite.config.ts
└── README.md

πŸš€ Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Steps

  1. Clone the repository

    git clone [your-repo-url]
    cd frontend-assessment
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser

    http://localhost:5173
    

πŸ’» Usage

Tree View

  1. Expand/Collapse: Click the arrow icon (β–Ά/β–Ό) next to any node
  2. Add Child: Click the βž• button, enter a name, and press Enter or click "Add"
  3. Edit Node: Double-click on node name or click the ✏️ button
  4. Delete Node: Click the πŸ—‘οΈ button and confirm deletion
  5. Drag & Drop: Drag any node and drop it onto another node to move it
  6. Lazy Load: Click on "Second Root" to see lazy loading in action

Kanban Board

  1. Add Card: Click "+ Add Card" button at the bottom of any column
  2. Edit Card: Double-click on a card or click the ✏️ button
  3. Delete Card: Click the πŸ—‘οΈ button on a card
  4. Move Card: Drag a card from one column and drop it in another
  5. Switch Views: Use the navigation buttons at the top to switch between Tree View and Kanban Board

🧩 Components

Tree View Architecture

TreeView (Main Component)
  └── TreeNode (Recursive Component)
      β”œβ”€β”€ Expand/Collapse Button
      β”œβ”€β”€ Node Name (Editable)
      β”œβ”€β”€ Action Buttons (Edit, Add, Delete)
      β”œβ”€β”€ Add Node Form (Conditional)
      └── Children Nodes (Recursive)

Kanban Board Architecture

KanbanBoard (Main Component)
  └── Column (3 instances)
      β”œβ”€β”€ Column Header
      β”œβ”€β”€ Card List
      β”‚   └── Card (Multiple instances)
      β”‚       β”œβ”€β”€ Card Content
      β”‚       └── Action Buttons
      └── Add Card Button

πŸ“Έ Screenshots

Tree View Component

Tree View Hierarchical tree structure with expand/collapse functionality

Kanban Board Component

Kanban Board Task management board with drag & drop

Responsive Mobile View

Mobile View Responsive design adapts to mobile screens

Note: Add actual screenshots to a /screenshots folder in your project

πŸ”§ Development

Available Scripts

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Lint code
npm run lint

# Type check
npm run type-check

Code Quality

  • TypeScript - Full type coverage with strict mode enabled
  • Component Structure - Clean separation of concerns
  • Reusability - Modular, reusable components
  • Performance - Optimized renders and state updates
  • Accessibility - Semantic HTML and ARIA labels

Key Design Decisions

  1. No External Libraries - Minimal dependencies except React and TypeScript
  2. Native Drag & Drop - Using HTML5 Drag & Drop API for better performance
  3. Component Decomposition - Separated logic into reusable components
  4. Helper Classes - Utility functions for tree and kanban operations
  5. CSS Modules - Scoped styling to prevent conflicts

🌐 Deployment

Vercel (Recommended)

# Install Vercel CLI
npm install -g vercel

# Deploy
vercel

Netlify

# Build the project
npm run build

# Drag and drop the 'dist' folder to Netlify dashboard
# Or use Netlify CLI
npm install -g netlify-cli
netlify deploy --prod

GitHub Pages

# Install gh-pages
npm install gh-pages --save-dev

# Add to package.json scripts:
# "predeploy": "npm run build",
# "deploy": "gh-pages -d dist"

# Deploy
npm run deploy

πŸ“ Assessment Requirements

Question 1 - Tree View βœ…

  • Expand/Collapse Nodes
  • Add New Node
  • Remove Node
  • Drag & Drop Support
  • Lazy Loading
  • Edit Node Name
  • React + TypeScript
  • Clean State Management
  • Component Decomposition
  • Minimal External Libraries

Question 2 - Kanban Board βœ…

  • Three Columns (Todo, In Progress, Done)
  • Add/Delete Cards
  • Move Cards Between Columns
  • Editable Card Title
  • Responsive Layout
  • React + TypeScript
  • Clean State Management
  • Drag-and-Drop Implementation
  • Proper Component Structure

🀝 Contributing

This is an assessment project, but feedback is welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/improvement)
  5. Create a Pull Request

πŸ“„ License

This project is created for assessment purposes. Feel free to use it as a reference.

πŸ‘¨β€πŸ’» Author

[Your Name]

πŸ™ Acknowledgments

  • Assessment provided by [Company Name]
  • Built with React and TypeScript
  • Icons: Unicode emoji characters
  • Gradient inspiration from modern web design trends

Last Updated: January 2026

Status: βœ… Complete and Ready for Review

Note: This project demonstrates proficiency in React, TypeScript, component architecture, state management, and modern web development practices.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages