Unified Client Libraries

One Unified Client SDK.
All 8 Sovereign Cloud Subsystems.

Eliminate glue code. Connect to authentication, PostgreSQL 17, 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 17
Schema-free JSONB collections, PostGIS 3.4 spatial suite, and pgvector embeddings.
Serverless Compute
Sub-10ms 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
S3-compatible partitioned buckets with 15-minute presigned upload URLs.
Unified Client Experience

Code Across All 8 Cloud Subsystems

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

import { createClient } from '@pgbhub/client';

// Initialize single client for all 8 PGB Hub services
const pgb = createClient({
  endpoint: 'https://my-app.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 native PostGIS spatial filters
const drivers = await pgb.table('drivers').find({
  status: 'AVAILABLE',
  location: { $near: { coordinates: [-122.4194, 37.7749], maxDistanceMeters: 5000 } }
});

// 3. Storage: Generate 15-minute presigned upload URL for direct S3 upload
const { uploadUrl, fileKey } = await pgb.storage.getPresignedUploadUrl({
  path: 'receipts/order-948.pdf'
});

// 4. Maps: Compute turn-by-turn directions via self-hosted OSRM routing
const route = await pgb.maps.getDirections({
  origin: [-122.4194, 37.7749],
  destination: [-122.2711, 37.8044]
});

// 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 1.3 PostgreSQL 17 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, maps, auth, storage, and agent MCP tooling under one unified sovereign endpoint.

No Credit Card Required
8 Sovereign Cloud Services
Sub-10ms Global Edge Ingress