The Backlit SDK
Everything the apps you deploy on Backlit — glows — use at runtime, in one hosted browser library. This site is the home for the JavaScript SDK and the task guides that show it in action.
The JavaScript SDK
A single hosted UMD bundle your glow's HTML loads with one <script> tag — no build step, no bundler. It attaches a single global, window.backlit, giving an app the signed-in user's identity, glow-shared and per-user storage, owner-write records, write-only capture, realtime change events, and web-push notifications. It runs only on a deployed glow host.
<script src="https://sdk.backlit.run/sdk/v1/sdk.js"></script>
<script>
const user = await window.backlit.auth.me();
await window.backlit.data.putJSON("todos", { items: [] });
</script>
The SDK reference is the full public contract — every method on window.backlit.auth / data / userdata / records / capture / on / push, with return types, error codes, and validation rules. It's hand-written so both people and AI agents can read the whole surface from one page.
Guides
Task-focused recipes that narrate one goal across the SDK, the deploy bundle, and a glow's auth modes — linking each fact to the reference rather than restating it.
notify.json so a matching data write fires a doorbell, then enroll users and react to taps with window.backlit.push.*.localStorage/indexedDB app to a glow — pick the store by ownership, satisfy the deploy bundle contract, deploy a draft, and promote.window.backlit, wrap it in the deploy bundle, deploy a draft, and promote.storage.change, refetch and dedup on events, and write with updateJSON so concurrent edits merge.