Install an SDK
The SDKs are optional, ergonomic wrappers around the HTTP API. They add named reporting helpers, a background queue, retries with backoff, and graceful shutdown flushing — so you never block your app or lose a report.
If you'd rather not add a dependency, you can call the API directly from any language; see the Quickstart.
JavaScript / TypeScript
npm i bugboard
Runs on Node 20+, browsers, and edge runtimes with nothing to install or wire
up — it uses the platform fetch. The default reporting path loads no
dependencies; opt-in payload encryption is the one feature that needs a crypto
library, and the SDK lazy-loads a tiny tweetnacl sealed-box binding
(tweetnacl-sealedbox-js) automatically the moment you set an encryption key —
never otherwise.
It's one package with one import. import { createClient } from 'bugboard'
is the whole surface, on every runtime — there is nothing framework-specific to
install or wire up.
Read the JavaScript / TypeScript guide, or browse the source on GitHub.
PHP
composer require bugboard/sdk composer require guzzlehttp/guzzle
Requires PHP 8.2+ and any PSR-18 HTTP client (Guzzle is recommended).
Using payload encryption? It needs PHP's
sodiumextension enabled on the host. It ships with PHP but is often packaged separately, so a fresh server may not have it — check withphp -m | grep sodium, and if it's missing, follow Enabling PHP's sodium extension. Plain reporting needs no crypto and works without it.
Read the PHP guide, or browse the source on GitHub.
Configure the client
Every SDK reads the same configuration. Servers use a secret key; browser and mobile clients embed a publishable key.
| Context | Environment variables |
|---|---|
| Server (Node/PHP) | BUGBOARD_KEY_ID, BUGBOARD_SIGNING_SECRET |
| Vite (React/Vue/Svelte client) | VITE_BUGBOARD_API_KEY |
| Next.js (client) | NEXT_PUBLIC_BUGBOARD_API_KEY |
The client variables hold a
bb_pub_…publishable token (safe to expose). The serverBUGBOARD_SIGNING_SECRETholds abb_sec_…secret — never expose it.
The full config reference lives in the API Reference.
Wire it into your framework
Where you build the client, and what makes sure queued reports are actually delivered, differs per framework. The framework guides cover each one end to end: