| Tool | Version | Purpose |
|---|---|---|
| Node.js | 22 |
SDK and demo development |
| npm | bundled with Node | Dependency management |
Install the SDK dependencies from the repository root:
npm installInstall the demo dependencies when you need to run or build the demo:
cd demo
npm installnpm testFor watch mode:
npm run test:watchnpm run typechecknpm run lintnpm run buildThis writes the distributable SDK files to dist/:
simface-sdk.jssimface-sdk.umd.cjs
The demo consumes the built SDK artifact from dist/, so build the SDK before starting or building the demo:
npm install
npm run build
cd demo
npm install
npm run devThe demo runs at http://localhost:4173 by default. To enable HTTPS (required for camera access from other devices on the local network), set DEMO_USE_HTTPS=true before starting the demo.
- Build the SDK at the repository root.
- Start the separate backend service locally.
- Start the demo from
demo/. - Open
http://localhost:4173(orhttps://localhost:4173ifDEMO_USE_HTTPS=true), fill inprojectId,apiKey, andclientId, then use Validate, Enroll, and Verify.
Note: The demo expects a real backend, usually at
http://localhost:8080.Note: The checked-in demo UI defaults to the hosted demo backend so the GitHub Pages deployment works without manual API URL entry. Override it to
http://localhost:8080when testing against a local backend.Note: The demo only stores the API URL, presentation mode, and client ID between reloads. It intentionally does not persist project IDs or API keys.
Note: The SDK's face-quality checks fetch MediaPipe assets from public URLs, so the demo still needs internet access even when the backend is local.
Note: On standard browsers, the SDK uses in-page camera capture with
getUserMedia(). In WhatsApp, it falls back to the native camera/file-input capture path.
| Workflow | Trigger | Purpose |
|---|---|---|
copilot-setup-steps.yml |
Manual / changes to itself | Prepares the Copilot coding agent environment with Node.js plus frontend and demo dependencies |
test.yml |
PR to main / manual / workflow call |
Runs SDK typecheck, tests, build, and demo build |
deploy.yml |
Manual | Reuses the test workflow, builds the SDK, and uploads the built artifact |