Stack Innovations / Services / Web / SvelteKit

The framework that compiles itself away.

Most React stacks ship a runtime, a virtual DOM, a reconciler, and the rest of your app on top. Svelte ships none of that — $state, $derived, and $effect compile down to surgical DOM updates. SvelteKit wraps that in routing, load functions, form actions, and adapters. The result: tiny bundles that feel instant.

01 — In numbers

Five years shipping
compiled components.

Each stat is a Svelte 5 $state rune. Hover any to see the source the compiler turns into surgical DOM updates. Counters scrub with scroll.

$state · projects
0+ SvelteKit apps shipped
let projects = $state(32);
let total = $derived(
  projects + 12
);
$state · routes
0+ +page.svelte routes
let routes = $state(6200);
$effect(() => {
  analytics.track(routes);
});
$state · adapter
0/6 Adapters in production
let adapters = $state(6);
$effect(() => {
  build.target(adapters);
});
$state · runtimeKb
0kb Framework runtime shipped
let runtime = $state(0);
// compiled
// no virtual DOM
02 — What we build

A full-stack SvelteKit practice.

Click a file in the sidebar — the active capability opens in the editor. Each pane is a working pattern we've shipped.

Stack · SvelteKit 2.x · svelte 5 ~/stack/sveltekit/src/routes/+page.svelte vite · ready S S
src/routes file-based · nested · layouts SHIPPED

File-based routing, folders are URLs.

uid: routes.fs updated: 09:42 today by: stack-eng
summary · what this gets you

Folders under src/routes are URLs; +page.svelte renders the page; +layout.svelte wraps every nested route below it. Param folders [slug], optional [[slug]], rest [...path], route groups (marketing) for shared layouts without URL impact.

items · what we customize
  • +page.svelte · the page
  • +layout.svelte · nested chrome
  • [slug], [[opt]], [...rest]
  • (group) folders · shared layouts
  • +error.svelte · per-segment errors
runes $state · $derived · $effect · $props SVELTE 5

Runes & reactivity, fine-grained at compile time.

uid: reactivity.runes updated: yesterday by: stack-eng
summary

$state for reactive values. $derived for computed. $effect for side-effects. $props, $bindable, $inspect round out the set. The compiler tracks dependencies precisely — no virtual DOM, no reconciler, no useMemo ceremony. Updates are O(changed), not O(component).

items
  • let count = $state(0)
  • let total = $derived(price * qty)
  • $effect(() => sync(...))
  • let { name } = $props()
  • $state.snapshot() for serialization
load() universal · server · parent TYPED

Load functions, data before the page paints.

uid: data.load updated: 2d ago by: stack-eng
summary

+page.server.ts for server-only data, +page.ts for universal, +layout.server.ts for shared upstream state. Layout loaders cascade to every nested page, deduped, parallel. Generated $types typecheck the chain end-to-end. Streaming via promises in returned objects.

items
  • +page.server.ts · server-only
  • +page.ts · universal (SSR + CSR)
  • parent() · await layout data
  • Streamed promises in returns
  • Generated ./$types end-to-end
actions FormData · named · enhanced SERVER

Form actions, POSTs the platform already understands.

uid: data.actions updated: 4d ago by: stack-eng
summary

Mutations are <form action>. Server actions in +page.server.ts handle them — named (?/login), validated with Zod, returning fail() for errors or redirect() for success. use:enhance upgrades to JSON without nav and gives optimistic-UI hooks. Works without JS as a baseline.

items
  • export const actions = { default, login }
  • Zod-validated FormData
  • fail(400, { errors })
  • use:enhance · pending state
  • Auto-revalidates affected loaders
motion transition · animate · tween · spring FIRST-PARTY

Transitions & motion, built into the language.

uid: ui.motion updated: 1w ago by: stack-eng
summary

Svelte ships transitions as a directive: transition:fade, fly, slide, scale, blur, draw, crossfade. animate:flip handles list reordering. tweened() and spring() stores let any value follow a curve. No third-party motion library needed for 90% of cases.

items
  • transition:fly · in/out together
  • in: / out: · one-way
  • animate:flip · FLIP reordering
  • spring() store · any value
  • Custom transitions in JS
svelte.config.js auto · vercel · cloudflare · netlify · node · static UNIVERSAL

Adapters & deploy, same code, any runtime.

uid: deploy.adapter updated: 2w ago by: stack-eng
summary

One file (svelte.config.js), one line. adapter-auto detects the host. Otherwise adapter-vercel (edge or serverless), adapter-cloudflare (Workers), adapter-netlify, adapter-node, or adapter-static for fully prerendered output. Per-route prerender / SSR / CSR via page options.

items
  • adapter-auto · detects host
  • adapter-vercel({ runtime: 'edge' })
  • adapter-cloudflare + KV/D1
  • adapter-static · full prerender
  • Per-route export const prerender = true
03 — runes → compiled output

Toggle a feature.
Compiler reacts.

This is what makes Svelte itself: it's a compiler, not a runtime. Toggle the features on the left — the +page.svelte source rebuilds in the middle, the compiled JavaScript that actually ships rebuilds on the right, and the live preview at the bottom of each pane actually does the thing. The bundle-size meter shows how much code each feature adds. Compare to React's baseline.

+page.svelte svelte 5 · runes

      
live preview actually compiled · click around
compiled output $.template · $.text · $.event

      
diagnostics last update — just now
· reactivity tracked at compile time
· no virtual DOM diff
· updates = O(changed) DOM nodes
04 — Why us

Stack Innovations vs the typical SvelteKit build.

Same framework, two very different ways it ends up shipping. Eight criteria your team will actually feel — in plain English, with the receipts.

  1. 01

    Performance

    × Typical
    75/100
    Lighthouse, mobile

    Default config, lots of unused components in the tree. Svelte still wins, but the win gets squandered.

    Stack Innovations
    100/100
    Lighthouse, mobile

    Lighthouse 100s as a starting line. CI fails the build on any regression.

  2. 02

    Reactivity

    × Typical
    $:
    legacy reactive labels
    Svelte 4 syntax $: stores runes

    Stuck on the older reactive-label model. Migrating to Svelte 5 sits in the backlog forever.

    Stack Innovations
    runes
    Svelte 5, fine-grained
    $state $derived $effect $props

    Svelte 5 runes from day one. Updates are O(changed), code is grep-able, types flow end-to-end.

  3. 03

    Bundle size

    × Typical
    ~120kb
    framework + state libs

    Everyone reaches for a state library "just in case." The bundle puts on weight, the win shrinks.

    Stack Innovations
    ~18kb
    framework + your code

    Runes replace 90% of state libraries. The compiler shakes out the rest. You ship the framework's idea, not its weight.

  4. 04

    SEO

    × Typical
    0/4
    coverage at launch
    × Sitemap × JSON-LD × svelte:head meta × OG images

    Bolted on as a follow-up engagement. The "we'll get to it" version of SEO.

    Stack Innovations
    4/4
    shipped at launch
    Sitemap JSON-LD Per-route <svelte:head> OG images

    Sitemaps, structured data, per-route <svelte:head>, Open Graph images — live on day one.

  5. 05

    Deployment

    × Typical
    1 runtime
    picked once, hard to leave
    Vercel Cloudflare Netlify Node Static auto

    Switching providers later means rewriting deploy pipelines and parts of the app.

    Stack Innovations
    6 adapters
    portable by default
    Vercel Cloudflare Netlify Node Static auto

    Same code ships to any of them. Switching is a one-line change in svelte.config.js.

  6. 06

    Migration

    × Typical
    ×
    "out of scope"
    Old SPA New site

    You move the routes yourself. Links break, search rankings drop, customers hit 404s.

    Stack Innovations
    mapped
    redirects + SEO continuity
    React / Vue / Rails SvelteKit

    Route inventory, redirect map, content port, dry-run, cutover. SEO continuity holds.

  7. 07

    Editor handoff

    × Typical
    0/4
    onboarding artifacts
    × Walkthroughs × Role setup × Dry runs × In-app help

    "Good luck with the admin." Editors learn by trial and error in production.

    Stack Innovations
    4/4
    shipped with the site
    Loom walkthroughs Role setup Dry-run publishes In-context help

    Editors leave training feeling fluent. First publish goes through without a Slack ping.

  8. 08

    Care plan

    × Typical
    0 mo
    post-launch coverage
    launch silence

    Hand-off, then silence. Six months later you're two majors behind on Svelte.

    Stack Innovations
    monthly cadence
    launch m+1 m+2

    Monthly version bumps, perf monitoring, real Slack channel. Features, not tickets.

05 — transition: directives

Motion is
built into the language.

Svelte ships transitions as a directive on the element itself: transition:fly, fade, slide, scale, blur, draw. Pick a directive on the left — the card on the right transitions in and out for real, source code on the right shows the exact two lines you'd write. No third-party motion library involved.

preview transition:fade
Card.svelte opacity tween · 240ms

      

Every directive is also one-way (in: / out:) and key-able for FLIP-style list reordering via animate:flip. The compiler turns these into Web Animations API calls — no requestAnimationFrame loops, no detached DOM nodes, no third-party motion runtime in the bundle.

06 — How it ships

Six weeks,
routes first.

  1. w 01

    Audit + route map

    Inventory every URL. Map each to +page.svelte + load function. Lighthouse + TTI baseline. Pick the adapter for the runtime.

  2. w 02

    SvelteKit scaffold

    SvelteKit + Vite + TypeScript, Svelte 5 runes mode, design tokens, layouts, +error.svelte, baseline <svelte:head>.

  3. w 02–04

    Loaders, actions, components

    Routes, layouts, typed loaders, form actions with Zod, use:enhance for pending UI, transitions, accessible motion.

  4. w 04

    Performance + adapter

    Image pipeline, prefetch tuning, JSON-LD, sitemap, OG images. headers() tagging, adapter wired, edge regions pinned.

  5. w 06

    Migration + launch

    Content + redirect map, dry-run on staging, vite build against the target adapter, deploy, DNS cutover.

  6. Care plan

    Svelte + adapter upgrades, route-level perf monitoring, error-boundary triage, monthly review.

Booking Q3 2026 · Avg engagement: 6 weeks · Reply within 24h