Install an SDK
The SDKs are the recommended way to integrate BugBoard. They give you named reporting helpers, a background queue, retries with backoff, and graceful shutdown flushing — so you never block your app or lose a report. Both the SDKs and the HTTP API hit the same ingestion endpoint.
If you're on an unsupported language, you can call the API directly; see the API Reference or 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 — a key id
(bbk_…) plus a signing secret (bb_sec_…); browser and mobile clients embed a
publishable key (bb_pub_…).
| 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).BUGBOARD_KEY_IDholds the publicbbk_…key id, andBUGBOARD_SIGNING_SECRETholds thebb_sec_…secret — never expose that one.
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: