- Docs
- Contribute
Working on the SDK
You need Node 22.12 and pnpm 9. If your system Node is older, tell pnpm to use 22.12 for every project with echo "use-node-version=22.12.0" >> ~/.npmrc (your own file, not the repository's), or use nvm use (the repository has a .nvmrc).
pnpm install
pnpm dev # HTTPS dev server: open the Network address on a phone on the same Wi-Fi
pnpm build # build every package
pnpm test # builds, then unit tests (Vitest)
pnpm test:e2e # builds, then browser tests (Playwright, Chrome, a fake camera)
pnpm lint
pnpm typecheck
pnpm format:check
pnpm check:licenses # fails on a forbidden license or a dependency missing from NOTICE.md
pnpm size # gzip budgets of the bundles
How we work. One roadmap checkbox per session. Write a plan, get it approved, then implement with tests. The developer ticks a roadmap box only after testing on a real phone. Keep examples/ and the Viewer working after every change. A new example goes into examples/library.json in the same change, with French and English text (a test fails if a page is missing).
Tests. Unit tests cover the logic. Browser tests use a generated video as the fake camera, so real image tracking runs without a phone, and an emulated AR phone (IWER) runs the world tracking code. What they cannot test is real phones in real light: try new work on a phone and note results in docs/device-matrix.md.
Phone testing. pnpm dev prints a Network address. Open it on a phone (see docs/dev-on-phone.md for the certificate warning). Add ?test to any example for the Test console.
Deploy the site. pnpm site:build writes the guide, the examples and the CDN files into site/; Vercel publishes the main branch.
Release the packages. See Release the SDK.