Development
Development
Contributing and Local Development
[Overview](./)
SDK contributors
This guide covers maintaining the SDK, not installing it in a consumer application. For consumer setup, open Installation.
This page is for developers who want to work on the PresenceKit SDK itself. If you only want to use the npm package in a website, start with Installation instead.
Repository contents
| Location | Purpose |
|---|---|
src/ | Core TypeScript client, adapters and React widgets |
contracts/ | Versioned public API response schema and validation |
tests/ | Client, shared-connection and contract tests |
examples/ | Seven consumer example projects |
docs/ | End-user documentation |
scripts/ | Release and packed-package validation |
SDK layout
src/ contracts/ tests/ examples/ docs/ scripts/ package.json
Install and run checks
From the repository root:
bun install
bun test
bunx tsc --noEmit
bun run build
bun run check:releaseThe build script generates the distributable JavaScript and TypeScript declaration files in dist/. check:release checks package exports, license metadata, fixed API origin, and the expected release structure.
Verify the packed npm artifact
bun pm pack --filename presencekit-local.tgz
bun scripts/verify-package.ts presencekit-local.tgzThe verification script installs the real tarball into an isolated temporary consumer project and checks framework imports, runtime behavior and TypeScript declarations.
Work with framework examples
Each example under examples/ uses the published @iconical/presence npm dependency. Once that package version is available, install dependencies and run the example from its directory:
cd examples/react
bun install
bun run devNOTE
Before the corresponding npm version is published, those examples may not install from the public registry. Test the SDK using the local tarball procedure above, or test examples after publication. Do not confuse a missing npm release with an SDK build failure.
API compatibility
The schema in contracts/public-api-v1.schema.json documents the public REST shape. Maintain compatible response fields; breaking changes require deliberate API version planning and corresponding test updates.
Contributions and release responsibility
Before submitting a change, run the test suite, type-check, build, and inspect the applicable documentation. Do not commit credentials, personal Discord data or other secrets. npm publication is a maintainer-controlled action and is not performed by ordinary CI.
See CONTRIBUTING, the PresenceKit Source-Available License, and Privacy. The license is source-available, not an OSI-approved open-source license.
Was this page helpful?