A simple starter template for building platforms on Vercel.
Sveltekit Platforms is your starting point for developing a fully scalable platforms implementation built with your favorite framework on Vercel. This is intended to be a simple template and can be extended in many ways to unlock even more amazing functionality.
To get started, deploy to Vercel using the button above and clone the repo. Each "app" can be found in the /lib/apps
folder. This version uses the subdomain of the url host to determine which app components to render in real time.
Each subdomain above maps to an app in the /lib/apps
folder.
The config.js file contains the page mappings needed to create more pages in your app. For example, this mapping in app1 maps the About page to the About.svelte component.
To add another app, create a new folder with the required artifacts in the /lib/apps
folder.
More docs coming soon...
The APP_ID
environment variable is required for local development and is used to switch context between apps. Find an example here.
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.