~/docs/backends

Dashboard

Backends

Backends

A backend is a Postgres database with auth, file storage and functions in front of it. Your code reaches all of it through the @pherwerz/cloud client.

Updated

2026-12-02

Source

apps/web/docs/backends/index.mdx

Install the client

terminal

npm install @pherwerz/cloud

It runs in browsers, Node 20+, Deno, Bun and edge runtimes, with no runtime dependencies.

Create a client

Find your backend's API URL and publishable key under API & keys on the backend's page.

lib/phz.ts

import { createClient } from '@pherwerz/cloud';

export const phz = createClient(
  'https://api-<ref>.pherwerz.app',
  'phz_pk_…' // publishable key: safe in the browser
);

Every method returns { data, error }; API errors are returned, not thrown.