@urbackend/sdk package is the official TypeScript SDK for urBackend. It wraps the REST API with typed methods for auth, database, and storage — no manual fetch calls required.
Installation
Initialize the client
Import the default export and call it with your API key:UrBackendConfig object:
Quick example
TypeScript generics
Database methods accept a generic type parameter so returned documents are fully typed:Error handling
Import the error classes to handle specific failure modes:API key security
The SDK logs a console warning if it detects you are using a Secret Key (sk_live_...) in a browser context.
Explore the SDK
Auth
Login, logout, profile updates, and social auth.
Database
CRUD operations, query building, and RLS support.
Storage
Upload files and get back a public CDN URL.
Schema
Inspect collection definitions and field types.
Send transactional emails from your server.
