JavaScript and TypeScript client
Install @plexivo/client and use Plexivo Postgres from the browser, React Native, Vue or Node: queries, Auth, Realtime and more.
@plexivo/client is the client for Plexivo Postgres as a backend. It has no runtime dependencies, is published as an ES module, includes TypeScript types and runs on Node 20 and later.
The full reference, with every method and example, is on npm.
Install#
bash
npm install @plexivo/clientQuick start#
js
import { createClient } from '@plexivo/client';
const db = createClient(PLEXIVO_DATA_URL, PLEXIVO_PUBLISHABLE_KEY);
await db.auth.signInWithPassword({ email, password });
const posts = await db.from('posts')
.where('likes', '>', 10)
.preload('author')
.order('created_at', 'desc')
.limit(20);Pass the database’s Project URL and Publishable key, both on its Connect tab.
What it covers#
- Queries
- Supabase-style
select,eq,orderandrange, or ORM-stylewhere,preload,firstandpaginate, with JSON, array and full-text conditions. - Writes
create,upsert,save,update,deleteand transactions.- Auth
db.auth: sign-up and sign-in by password, email code, Google, GitHub or Microsoft; guests; two-step verification; sessions on each device.- Realtime
db.channel('changes:orders')for row changes; rooms for broadcast and presence.- GraphQL
db.graphql(query, variables)and live queries withdb.graphql.subscribe.- Functions
db.functions.invoke(name, { body }).- RPC
db.rpc(name, args)for SQL functions marked@expose.- Types
- Generate TypeScript types for your tables.
On a server#
With the secret key, the same client runs raw SQL and migrations. Keep that key on the server, for example in Plexivo Secrets.
In React Native, pass an encrypted storage adapter so sessions are kept safely on the device.
Updated 27 October 2026