
Template details
Sveltekit Platforms
A simple starter template for building platforms on Vercel.
About this template
Sveltekit Platforms is a Vercel-focused starter template for building multi-tenant platform applications with SvelteKit, where each subdomain of your domain maps to a different app configuration.
What is Sveltekit Platforms?
Sveltekit Platforms is a starter template for building scalable multi-tenant platform applications on Vercel using SvelteKit. It takes a set of app folders under /lib/apps, each with a config.js file and Svelte components, and maps them to subdomains of your domain at request time. The template is authored by brittianwarner and is available as an open-source GitHub repository.
Key Features
- Subdomain-based app switching — The template uses the subdomain of the request URL to decide which app's components to render, enabling one deployment to serve many distinct applications.
- Per-app configuration files — Each app lives in /lib/apps with its own config.js that maps routes (like /about) to Svelte components (like About.svelte).
- Wildcard domain support — The template relies on Vercel's wildcard domains feature to catch any subdomain and route it to the platform.
- Deploy with Vercel button — One-click deployment to Vercel that clones the repository, sets up the project, and prompts for the APP_ID environment variable.
- Local development switching — The APP_ID environment variable selects which app context you work on locally, with an example provided in .env.example.
- Extensible app structure — Adding a new app means creating a new folder with the required artifacts in /lib/apps; the README points to docs coming soon for more detail.
Who is it for?
Sveltekit Platforms is aimed at developers and teams building multi-tenant SaaS products on Vercel. Developers who want to serve different branded experiences or feature sets per customer subdomain can use it as a starting structure. It also suits developers familiar with SvelteKit who want a minimal, unopinionated base for platform-style routing without a full framework like Next.js.
What can you do with it?
- SaaS teams: Launch multiple customer-facing apps from a single SvelteKit deployment, each with its own subdomain, pages, and components.
- Agencies: Reuse one codebase to spin up white-label sites for different clients by dropping new app folders into /lib/apps.
- Product developers: Prototype a platform architecture quickly — the live demo at platforms.page lets you type any subdomain (like anything-you-want.platforms.page) to see the dynamic routing in action.
How does it work?
Deploy the template to Vercel with the Deploy button, then clone the repository. Each app lives in /lib/apps with a config.js file that maps routes to components. When a request arrives, the template reads the subdomain from the URL host, looks up the corresponding app folder, and renders that app's components. Local development uses the APP_ID environment variable to simulate a chosen subdomain.
FAQ
Does Sveltekit Platforms require a wildcard domain setup?
Yes. The template explicitly requires Vercel wildcard domains so that arbitrary subdomains resolve to your deployment. Without configuring a wildcard domain in your Vercel project, subdomain-based app routing won't work in production.
How do I add a new app?
Create a new folder under /lib/apps with the same structure as existing apps, including a config.js file that defines the page-to-component mappings. The README notes that more documentation is coming soon.
What is the APP_ID environment variable for?
APP_ID is used only during local development to switch which app context you are working on. You can set it in a .env file based on the .env.example provided.
Is this template limited to the included example apps?
No. The default repository includes example apps like app1, app2, and default, but you can extend it by adding your own app folders. The template is intentionally minimal and designed to be extended.













