Unified Client Libraries

One Unified Client SDK.
All 8 Sovereign Cloud Subsystems.

Eliminate glue code. Connect to authentication, PostgreSQL, serverless functions, maps, object storage, and transactional mail using a single cohesive SDK—or connect directly over standard PostgreSQL wire protocols.

Authentication
Passwordless 6-digit OTP, magic links, JWTs, and automatic Row-Level Security.
PostgreSQL
Schema-free JSONB collections, PostGIS spatial suite, and pgvector embeddings.
Serverless Compute
Fast Node.js & Python function handlers triggered via HTTP, webhooks, or cron.
Self-Hosted Maps
High-performance vector tiles, reverse geocoding, and turn-by-turn routing at ultra-low cost.
Object Storage
Partitioned per-project buckets on S3-compatible storage, with 15-minute presigned upload URLs.
Transactional Mail
Direct email dispatch with automatic bounce and complaint reputation handling.
Unified Client Experience

Code Across All Cloud Subsystems

One unified client for TypeScript, Python, Go, Rust, cURL, and Agent-Native Model Context Protocol (MCP).

import { createClient } from '@pgb/sdk';

// Initialize single client for all PGB Hub services
const pgb = createClient({
  endpoint: 'https://myapp.pgbhub.app',
  apiKey: process.env.PGB_API_KEY
});

// 1. Auth: Passwordless 6-digit OTP verification
const { session, user } = await pgb.auth.verifyOtp({
  email: '[email protected]',
  token: '592810'
});

// 2. Database: Query JSONB collections with a typed table accessor
const drivers = await pgb.table('drivers').find({
  status: 'AVAILABLE'
});

// 3. Storage: Upload a file (presigned R2 upload handled for you)
const { url } = await pgb.storage.upload('receipts/order-948.pdf', fileBuffer);

// 4. Cron: Schedule a recurring job against a serverless function
await pgb.cron.create('nightly-payout', '0 2 * * *', 'function', {
  function_name: 'payouts/run-nightly'
});

// 5. Mail: Dispatch transactional email with automatic SES deliverability
await pgb.mail.send({
  to: user.email,
  subject: 'Your Ride is Confirmed',
  html: '<h2>Driver is arriving in 4 mins</h2>'
});
Standard PostgreSQL Wire Ingress

Full Compatibility with Top ORMs & Frameworks

Beyond the unified HTTP SDK, every PGB Hub database exposes a public TLS-encrypted PostgreSQL wire endpoint. Connect with Prisma, Drizzle, SQLAlchemy, TypeORM, or raw SQL drivers.

Prisma ORM (Node / Next.js)

Connection Configuration
DATABASE_URL="postgresql://pgb_app:[email protected]:5433/production_db?sslmode=require"
Model Definition / Query
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id        String   @id @default(uuid())
  data      Json     // Native JSONB document storage
  createdAt DateTime @default(now())
}

Drizzle ORM (TypeScript)

Connection Configuration
import { pgTable, text, jsonb, timestamp } from 'drizzle-orm/pg-core';

export const documents = pgTable('documents', {
  id: text('id').primaryKey(),
  payload: jsonb('payload').notNull(),
  updatedAt: timestamp('updated_at').defaultNow(),
});
Model Definition / Query
// Accelerated query with Drizzle JSON operators
const results = await db.select().from(documents)
  .where(sql`payload->>'status' = 'published'`);

SQLAlchemy 2.0 (Python)

Connection Configuration
from sqlalchemy import create_engine, Column, String
from sqlalchemy.dialects.postgresql import JSONB

engine = create_engine("postgresql+psycopg://pgb_app:[email protected]:5433/production_db?sslmode=require")
Model Definition / Query
class Document(Base):
    __tablename__ = "documents"
    id = Column(String, primary_key=True)
    attributes = Column(JSONB) # 100% GIN indexed
Universal GUI Client Support

Connect from TablePlus, DBeaver, DataGrip, or psql

Simply paste your public TLS connection string or input host (`db.pgbhub.app`), port 5433, database name, and credentials with SSL enabled (`Require`).

TablePlusDBeaverDataGrippgAdmin 4Posticopsql CLI
# Quick terminal connect:
psql "postgresql://pgb_app:[email protected]:5433/production_db?sslmode=require"
Build AI-Native Applications Today

Ready to build on a truly programmable cloud?

Provision databases, serverless compute, microVM containers, realtime channels, auth, storage, and agent MCP tooling under one unified sovereign endpoint.

No Credit Card Required
Sovereign Cloud Services
Managed Edge Ingress