Your first site
Create a PlatformKit site, install its dependencies, and run it locally or from its own repository.
A site is an independently configured project built with PlatformKit. It contains its own package manifest and lockfile, platformkit.config.js, content, and any code or data it registers. The PlatformKit workspace also contains generic example sites; copy one as a starting point, then keep the new project's code and content in its own repository.
The files
my-site/
package.json exact PlatformKit package versions and site scripts
package-lock.json the dependencies used by local and production builds
platformkit.config.js modules, theme and site registrations
index.html the application shell
vite.config.js the kit's Vite plugin
velite.config.js content collections
src/main.js the theme entry
src/looks/<name>.css optional site palette
src/<module>/ optional site-owned modules and components
content/ the site's records, pages and language strings
db/ optional site-owned schemas, rows and functions
build/ site-specific build scripts and tests
openspec/ site-owned specifications and changespackage.json carries an imports map so the same code runs under Node and Vite: #content and #site/* resolve to the kit's Node fallbacks outside Vite. Declare optional peer packages needed by enabled modules in the site manifest. For example, email templates need mjml, print production needs @myriaddreamin/typst-ts-node-compiler, and spoken books need onnxruntime-node and ffmpeg-static. platformkit test and platformkit steps --check report missing packages for enabled features.
The PlatformKit workspace has a separate, opt-in Docker-backed Hyperswitch v2 integration stack
for provider development. It is not needed to build a site or run its regular platformkit test;
see the payment-provider guide if you are
working on that integration.
The config
export default {
name: 'My Site',
theme: 'platformkit/theme',
modules: {
store: true,
print: false,
memberships: true,
sessions: false,
coaching: false,
support: true,
funnels: true,
emails: true,
forms: false,
instrument: false,
recommendations: false,
translation: false,
tts: false,
enrichment: false,
push: false,
},
looks: { mine: { css: './src/looks/mine.css' } },
defaultLook: 'mine',
nav: {
links: [
{ key: 'content', href: '/content', prefix: true },
{ key: 'store', href: '/store' },
],
},
languages: ['en'],
data: { ports: 54360 },
}Sites can disable modules they do not use, add their own modules and routes, or register theme overrides. Module switches also control which pages, admin sections, build steps and deployment settings apply. See Configuration and Declarations and state.
The palette
A look is a CSS file of tokens under [data-look="mine"], including dark-theme values. A site can leave its look unset to use the theme's default palette. See Looks and landing sections.
Running it
From an independent site checkout, install the committed lockfile and run the site's commands:
npm ci
npx platformkit check
npx platformkit dev
npx platformkit test
npx platformkit buildplatformkit check lists everything the machine or the site is missing, each with its fix, before you start. platformkit dev assembles the local Supabase project when the site needs a backend. platformkit test runs the kit checks relevant to the site's modules, the site's own tests, and its OpenSpec validation; platformkit test --e2e runs the checks that need a database, the functions or a browser, on a stack built from the site's files for the run. platformkit build compiles content and produces the site's bundle and prerendered pages. Deploy only from the configured deployment environment, after its checks pass.
For a deployment, the site repository can invoke the Core CLI directly from GitHub:
npx github:platform-kit/core build
DEPLOY=1 npx github:platform-kit/core deployThe longer npx --yes --package=github:platform-kit/core platformkit deploy form is equivalent. This sources platformkit from the Core repository, so npm publication is not required and the site's manifest and lockfile are not changed. The checkout holds the kit's TypeScript uncompiled; the CLI compiles it on first run and then continues from the copy it installs into the site's node_modules. It always works on the folder it is run in as the site. When using npm-published PlatformKit packages instead, pin their exact versions and commit the matching package-lock.json. A standalone site build uses its own repository and dependencies; it does not need files from a sibling site. See Dev, build and deploy and the multi-site guide for local workspace development and repository fetches.
Use Node 22 for every command. The platformkit executable uses nvm to restart under Node 22 when available; otherwise install Node 22 or use the PlatformKit devcontainer.
The first dev or migrate writes supabase/config.toml from the kit's template with the site's id and port base. The rest of supabase/ is assembled on every run from PlatformKit and site-owned declarations.
What to do next
- Write
content/site.mdand the home page. - Add the content collections the site needs; the admin can create and edit their files.
- If the site sells, define its offers and supply payment credentials only in the deployment environment.
- If the site sends email, configure the relay only in the deployment environment.
- Read Dev, build and deploy before the first deploy; its checks name every missing requirement.