Ultrahost/ docs

Three packages cover the user client, React, and admin work.

PackagePurpose
@ultrahost/sdkFramework-independent TypeScript client
@ultrahost/reactReact hooks and the provider
@ultrahost/adminPrivileged configuration and deployment

The browser SDK and the admin SDK share types and the HTTP transport. They do not share a credential model. That split is what stops an admin token from being bundled into a React app by accident.

User client

ts
import { createClient } from "@ultrahost/sdk";

const ultrahost = createClient({
  projectId: "my-project",
  token: userAccessToken
});

Use this in browsers, mobile apps, and any process that should act as the signed-in user.

Admin client

ts
import { createAdminClient } from "@ultrahost/admin";

const admin = createAdminClient({
  projectId: "my-project",
  token: adminAccessToken
});

Use this on a trusted server, in a deployment pipeline, or in a coding agent that has been granted administrative authority. Typical admin work:

  • Create and configure collections, indexes, metrics, buckets, and jobs
  • Manage identity providers
  • Write authorization policies
  • Deploy functions, set secrets, and set environment variables

A method that only makes sense as admin work is absent from the browser client, or fails before the request is sent if someone constructs it anyway. The reference pages still list the full method so the contract is in one place.

React

tsx
import { UltrahostProvider } from "@ultrahost/react";

UltrahostProvider takes the object returned by createClient(). Hooks are documented in React.

What is shared

Types for requests, responses, and operation objects live where both clients can import them. Each client chooses its own token and its own allowlist of methods. Application code should not reimplement that split with a boolean flag on one client.