my-game/
├── src/
│ ├── main.ts
│ └── score.ts
├── public/media/cover.svg
├── spawnkit/config.ts
├── spawnkit/vite.ts
├── spawnkit.config.ts
├── game.config.json
├── dev-domains.config.mjs
├── vite.config.ts
├── package.json
├── tsconfig.json
└── .spawn/state.json
| File or folder | Responsibility |
|---|
src/ | Game source. The renderer and selected modules determine its exact structure. |
|---|
public/ | Static files copied to the build without import processing. |
|---|
game.config.json | Versioned scaffolding manifest; not the public game listing. |
|---|
spawnkit.config.ts or spawnkit.config.json | One configuration for title, description, genre, dimension, and release-relative media paths. |
|---|
spawnkit/ | Local listing types, validation, and Vite plugin. No private package required. |
|---|
dev-domains.config.mjs | Named local HTTPS endpoints. |
|---|
.spawn/state.json | Generator ownership baseline used for safe module additions. |
|---|
.spawn/project.json | Created by CLI linking; associates this folder with a hosted project. |
|---|
pnpm-lock.yaml | Created by installation. Commit it for reproducible installs and source deployment. |
|---|
dist/ | Generated browser build. Rebuild instead of editing these files. |
|---|
pnpm install
pnpm dev
# Stop the development server before continuing.
pnpm lint
pnpm build
pnpm preview
build checks TypeScript and creates the Vite production output. preview serves that output locally. Test, E2E, and Storybook scripts exist only when their add-ons are selected; inspect package.json before using them. Generated projects and hosted source builds currently use pnpm.
public/media/cover.webp → dist/media/cover.webp
Listing coverPath: media/cover.webp
Browser URL: /media/cover.webp
Use public/ for assets that need a stable filename. Assets imported from source are processed by Vite and may receive hashed filenames. Keep listing media under public/ so their release-relative paths remain predictable. Match filename capitalization exactly; hosted files are case-sensitive.
For a full listing configuration and ZIP commands, see Publishing examples.
SPAWN_GAME_DOMAIN=my-game.spawnkit.games
No domain override is needed for local development. If you set SPAWN_GAME_DOMAIN, use your project's assigned production hostname, not an arbitrary custom name. Verified CLI linking normally supplies the assigned hostname automatically. Run pnpm exec dev-domains urls to see the addresses and pnpm exec dev-domains doctor to diagnose local setup.
Changing the listing configuration requires a new production build. Changing .spawn/project.json by hand is not an authorization mechanism; use the CLI link flow to verify account access.