---
title: "SvelteKit Boilerplate"
description: "A SvelteKit app including nested routes, layouts, and page endpoints."
url: "https://vercel.com/templates/svelte/sveltekit-boilerplate"
links:
  repository: "https://github.com/vercel/examples/tree/main/framework-boilerplates/sveltekit"
  demo: "https://sveltekit-1-template.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=SvelteKit+Boilerplate&demo-description=A+SvelteKit+app+including+nested+routes%2C+layouts%2C+and+page+endpoints.&demo-url=https%3A%2F%2Fsveltekit-1-template.vercel.app%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F5WIYQtnSEfZKYFB9kvsR0w%2F974bee31f87aa376a54dccdb0713629d%2FCleanShot_2022-05-23_at_22.13.20_2x.png&project-name=SvelteKit+Boilerplate&repository-name=sveltekit-boilerplate&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fframework-boilerplates%2Fsveltekit&from=templates"
---

# SvelteKit Boilerplate

A SvelteKit app including nested routes, layouts, and page endpoints.

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte), deployed to [Vercel](https://vercel.com).

_Live Example: https://sveltekit-1-template.vercel.app_

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm init svelte@next

# create a new project in my-app
npm init svelte@next my-app
```

> Note: the `@next` is temporary

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

This uses the adapter-auto for SvelteKit, which detects Vercel and runs adapter-vercel on your behalf.

```bash
npm run build
```

> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.

## Related Templates

### [SvelteKit Authentication](https://vercel.com/templates/svelte/sveltekit-authentication)

A SvelteKit app with authentication.

### [SvelteKit Commerce](https://vercel.com/templates/svelte/sveltekit-commerce)

An all-in-one starter kit for high-performance e-commerce sites built with SvelteKit.

### [Astro Boilerplate](https://vercel.com/templates/astro/astro-boilerplate)

An Astro site, using the basics starter kit.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
