Skip to content

Svelte Building Blocks

A hands-on, book-style Svelte 5 and SvelteKit course covering runes, state, component architecture, APIs, testing, production, and deployment.

Install

$git clone https://github.com/erayack/svelte-building-blocks

Install command taken from the project's README or registry entry. Always review code before running it.

Svelte Building Blocks: Svelte 5 Runes Edition

A book-style Svelte and SvelteKit course you can run locally. It targets Svelte 5 runes syntax from the first chapter through production workflows.

Each level is a standalone runnable project with its own package.json, source files, README chapter, guided walkthrough, commands to try, practice prompts, and check-yourself questions.

Syntax target

This course teaches modern Svelte 5 patterns:

  • $props() for component inputs and $bindable for deliberate shared control
  • $state, $state.raw, and $state.snapshot for appropriate state boundaries
  • rune-enabled .svelte.js modules for reusable reactive models
  • $derived and $derived.by for computed values
  • $effect only for real side effects and $inspect for reactive debugging
  • callback props for child-to-parent domain intent
  • snippets, render tags, and component error boundaries for composition and recovery
  • attachments for reusable DOM behavior with cleanup
  • SvelteKit load functions, route errors, form actions, endpoints, and server-only modules
  • focused TypeScript, unit, component-browser, end-to-end, and production-build verification

Classic Svelte 3/4 component syntax is not the default path in this course.

Levels

  1. Foundation: components, $props, $state, $derived, template syntax
  2. State Management: stores alongside runes, derived stores, context, callback props
  3. Component Architecture: snippets, render tags, composition, callbacks, effects
  4. Reactivity Patterns: rune-enabled modules, raw/snapshot state, derived graphs, $inspect, effect cleanup
  5. Dynamic UI: if/each blocks, dynamic components, transitions, attachments, explicit bindings
  6. SvelteKit Fundamentals: routing, SSR, load functions, route errors, component boundaries
  7. Data & APIs: server load functions, form actions, validation, errors, endpoints
  8. Production: TypeScript, unit/component/e2e testing, builds, CI/CD
  9. Capstone: combined SvelteKit feature with runes, components, context, actions, validation, and tests

How to study this repo

Suggested path:

Similar plugs

The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…

Open-source AI job search agent and job finder: scan job boards, score each job 1-5 against your CV before you apply, tailor an ATS-friendly resume and cover letter, get…

Explore related