Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A minimal SvelteKit example that fetches data from the SpaceX GraphQL API and deploys to Vercel.
SvelteKit Starter is a minimal, Vercel-hosted example project that shows how to build a SvelteKit application that fetches data from the public SpaceX GraphQL API and deploys to Vercel. It is an official example maintained inside the Vercel GitHub repository, so it serves as a reference for both SvelteKit development and Vercel deployment workflows.
The SvelteKit Starter is an example application that consumes the SpaceX GraphQL API (https://api.spacex.land/graphql/) and renders the retrieved data inside a SvelteKit app. It takes no user input; it simply queries SpaceX data and presents it on a page. The project is built on SvelteKit and uses the official Vercel Adapter so that running npm run build produces a deployment ready for Vercel. A live preview is hosted at https://sveltekit.examples.vercel.com, and the source is available in the Vercel examples directory on GitHub.
npm run dev (optionally using -- --open to launch a browser tab), and a production build is generated with npm run build.The project works like a standard SvelteKit app. After installing dependencies with npm install, you start the development server with npm run dev. For production, npm run build uses the Vercel Adapter to generate the deployment output. The live example is already deployed at sveltekit.examples.vercel.com.
The example project is open source and hosted in the Vercel GitHub repository, so the template itself is free to clone and use. Deploying it to Vercel is also free for personal projects, though Vercel has paid plans for higher usage.
It demonstrates a SvelteKit app that fetches data from the public SpaceX GraphQL API and displays that data. It is intended as a reference for structuring a SvelteKit project and deploying it to Vercel.
Clone the repository, then run npm install to install dependencies. Start the development server with npm run dev, or npm run dev -- --open to open it in your browser automatically.
The simplest way is to click the Deploy with Vercel button in the README. It opens a Vercel page where the repository URL is pre-filled, and Vercel clones, builds, and deploys the project. Alternatively, push the code to GitHub and import that repository in Vercel.
No CSS framework is listed on the page. The example focuses on SvelteKit and GraphQL data fetching, so the default styling is minimal and inherited from the SvelteKit boilerplate.
