SvelteKit
Full-stack framework for building web applications with Svelte
Table of Contents
Setup & Project Structure
Getting started with SvelteKit
Installation & Setup
Creating a new SvelteKit project
Project Structure
SvelteKit file and folder organization
Routing
File-based routing and navigation
Basic Routing
File-based routing patterns
Layouts
Nested layouts and layout groups
Data Loading
Loading data in pages and layouts
Universal Load Functions
Load functions that run on both client and server
Server Load Functions
Server-only load functions with direct database access
Form Actions
Progressive form handling and mutations
Basic Actions
Server-side form handling
Enhanced Forms
Client-side progressive enhancement
API Routes
Creating API endpoints
Server Endpoints
Creating RESTful API endpoints
Streaming & SSE
Server-sent events and streaming responses
Hooks
Server and client hooks for request handling
Server Hooks
Server-side request/response handling
Client Hooks
Client-side navigation and error handling
Authentication
Implementing authentication patterns
Session-based Auth
Cookie-based authentication
OAuth Integration
Third-party authentication providers
Deployment
Building and deploying SvelteKit apps
Adapters
Deployment adapters for different platforms
Performance Optimization
Optimizing SvelteKit apps for production