Small SvelteKit + TypeScript project created with pnpm for learning Svelte and SvelteKit step by step.
pnpm install
pnpm dev
Then open the local URL shown in the terminal.
Use this order for the smoothest ramp-up:
/ for the concept map./counter to practice reactivity./todos to practice bindings and list updates./runes to combine state, derived values, and effects./components to practice component composition./transitions to practice transitions and animation./stores-context to practice shared state and context./kit-load to practice server load and query params./kit-actions to practice server form actions and validation./kit-endpoints to practice GET/POST endpoint handlers./kit-dynamic-routes to practice route params./kit-cookies to practice persisted preferences with cookies./capstone to combine the full SvelteKit workflow.If you are coming from React or Angular, treat this as:
/: mental model translation/counter: local state and derived values/todos: forms and list rendering with less boilerplate/runes: runes working together in one lab/components: reusable component composition/transitions: UI motion and list animation/stores-context: scoped dependency sharing/kit-load: server-side page data fetching/kit-actions: form handling in page actions/kit-endpoints: explicit request/response handlers/kit-dynamic-routes: dynamic param-based page routing/kit-cookies: persisted preferences across requests/capstone: end-to-end flow with load, actions, endpoints, and preferences/ OverviewWhat you should learn:
Try this next:
/counterWhat you should learn:
\$state for local mutable state.\$derived for computed values.Try this next:
/todosWhat you should learn:
bind:value and bind:checked for two-way bindings.Try this next:
/runesWhat you should learn:
\$state, \$derived, and \$effect in one focused workflow.Try this next:
/componentsWhat you should learn:
Try this next:
/transitionsWhat you should learn:
in: and out: directives.animate:flip.Try this next:
/stores-contextWhat you should learn:
setContext / getContext.Try this next:
/kit-loadWhat you should learn:
+page.server.ts load functions for server-side data preparation.setHeaders.Try this next:
/kit-actionsWhat you should learn:
?/action-name.fail(400, ...).use:enhance.Try this next:
/kit-endpointsWhat you should learn:
+server.ts.fetch.Try this next:
/kit-dynamic-routesWhat you should learn:
[lesson].Try this next:
/kit-cookiesWhat you should learn:
Try this next:
compactMode cookie preference./capstoneWhat you should learn:
Try this next:
pnpm dev
pnpm check
pnpm lint
pnpm test
pnpm build
pnpm preview
pnpm test:e2e
pnpm test:all
pnpm check runs Svelte and TypeScript diagnostics.pnpm lint runs ESLint, including deprecation warnings.pnpm test runs Vitest unit and component tests.pnpm build verifies the production build.pnpm test:e2e starts the preview server and runs Cypress browser tests.pnpm test:all runs the full local quality gate in the same order as CI.GitHub Actions is configured in .github/workflows/ci.yml to run check, test, build, and Cypress E2E tests on pushes and pull requests.
Theme files use this shape:
{
"version": 1,
"name": "custom",
"custom": {
"...": "#RRGGBB"
}
}
pnpm dlx sv create . --template minimal --types ts --no-add-ons --install pnpm