Building the Kanban Page Structure in Svelte

Welcome To Svelte & Kanban

Welcome to our first lesson on building a Kanban board application with Svelte 5! In this course, you'll learn how to create a fully functional task management system from scratch. A Kanban board is a visual tool that helps you track work progress across different stages - typically "To Do," "In Progress," and "Done."

Svelte 5 is the perfect framework for this project because of its simplicity and powerful reactivity system. Whether you're new to Svelte or web development in general, this course will guide you step-by-step through building a modern web application with clean, maintainable code.

Project Overview: Understanding Our Target Structure

This course will guide you through building a complete Kanban board application using Svelte 5. Before diving into code, let's explore how our application will be structured and the journey we'll take to build it.

Our application follows a component-based architecture that separates concerns and promotes reusability. The file structure reflects this approach:

/src
├── app.html                     # Main HTML template for the app
├── components/                  # Reusable UI components
│   ├── Board.svelte             # Main kanban board container
│   ├── Column.svelte            # Individual column (To Do, In Progress, Done)
│   ├── TaskCard.svelte          # Individual task card component
│   └── TaskForm.svelte          # Form for adding new tasks
├── lib/                         # Shared logic and utilities
│   └── taskStore.svelte.js      # State management for tasks
└── routes/                      # SvelteKit routing system
    └── +page.svelte             # The main page we're building today

What Each File Does

  • app.html: The main HTML template where our Svelte app gets mounted
  • components/: Contains all reusable UI pieces
    • Board.svelte: Manages the layout of columns and facilitates drag-and-drop
    • Column.svelte: Displays a list of tasks for a specific status
    • TaskCard.svelte: Shows task information with interactions like expand/collapse
    • TaskForm.svelte: Handles task creation with validation
  • lib/taskStore.svelte.js: Central place for managing task data using Svelte's runes
  • routes/+page.svelte: Today's focus - the entry point for our application
Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal