open-vtt-sdk
v0.1.4
Published
Shared TypeScript contracts and validation tooling for Open VTT game modules
Maintainers
Readme
Open VTT SDK
This package bundles the TypeScript contracts and validation tooling required to build third-party Open VTT game modules.
Contents
sdk/– Core interfaces, entity models, and helper services used by the game runtime.validator/– Laravel validation generator (open-vtt-validateCLI) plus supporting scripts and documentation.tsconfig.json– Path mappings you can extend inside your module project to resolve the provided types.
Getting Started
- Install the SDK:
npm install @open-vtt/sdk - Extend the provided tsconfig so imports like
@open-vtt/sdk/types/game/stateresolve automatically:// tsconfig.json { "extends": "@open-vtt/sdk/tsconfig.json", "compilerOptions": { "strict": true } } - Import the types in your module:
import type { GameState, GamePiece } from '@open-vtt/sdk/types/game/state' import { BaseGameRulesModule } from '@open-vtt/sdk/types/game/rules' - Generate Laravel validation rules by running the bundled CLI:
npx open-vtt-validate --module test-chess --type RootInterface --project tsconfig.json --out validation.phpRefer to sdk/docs/game-module-sdk.md and validator/docs/laravel-validation.md for complete guidance.
