The Complete Backend Cloud,
Programmable & AI-Native.
Explore all 8 integrated subsystems engineered into PGB Hub: Databases, serverless functions, microVM containers, maps, authentication, object storage, transactional email, and AI agent tooling.
Serverless Python & Node.js Execution
Deploy modular backend business logic that executes instantly. Trigger functions via HTTP REST requests, HMAC-verified webhooks, database change data capture (CDC), or automated cron timers with zero operational overhead.
// Express / Node function executed on PGB Hub
export async function handle(event, { db, auth, env }) {
const { amount, currency } = event.body;
// Insert order using ambient database client
const order = await db.orders.insert({
userId: auth.user.id,
amount,
currency,
status: 'completed',
timestamp: new Date()
});
return { success: true, orderId: order.id };
}CRIU Snapshot Scale-to-Zero MicroVM Containers
Run custom Docker OCI images or build directly from Dockerfiles. PGB Hub provides resource-quota isolation and memory-snapshot technology that automatically freezes idle workloads to zero RAM, with fast wake-up from snapshot.
# PGB Container Specification
services:
express-api:
image: ghcr.io/my-org/myapp:latest
port: 5010
tier: micro
mode: hybrid
schedule:
timezone: Africa/Lagos
always_on_window: "08:00-20:00"
health_check: /healthManaged PostgreSQL, JSONB & PostGIS Engine
Every project receives its own PostgreSQL 18 database. Enjoy document database agility with schema-free JSONB collections and automatic GIN indexing, alongside PostGIS spatial intelligence and pgvector embeddings.
-- PostGIS Geospatial distance query
SELECT
id,
data->>'name' AS driver_name,
ST_Distance(current_location, ST_MakePoint(3.35, 6.60)::geography) AS distance_meters
FROM drivers
WHERE ST_DWithin(current_location, ST_MakePoint(3.35, 6.60)::geography, 3000)
ORDER BY distance_meters ASC
LIMIT 5;Cloud-Hosted PGB Maps & Navigation Gateway
A cloud-hosted geospatial gateway serving dark & street raster and vector map tiles, Search Box autocomplete, reverse geocoding, and traffic-aware turn-by-turn routing at a fraction of the cost of legacy map platforms.
// Dart / Flutter Map using PGB Maps Gateway
TileLayer(
urlTemplate: '${mapConfig.baseUrl}/styles/v1/streets-v12/tiles/256/{z}/{x}/{y}@2x?access_token=${mapConfig.token}',
userAgentPackageName: 'app.myapp',
);Built-In PGB Auth as a Service
Authenticate users effortlessly. PGB Auth provides email/password registration, passwordless 6-digit OTPs, magic links, JWT session verification, and automatic PostgreSQL Row-Level Security (RLS) scoping.
// Client-side authentication with PGB SDK
import { createClient } from '@pgb/sdk';
const pgb = createClient('https://myapp.pgbhub.app', { key: 'pgb_pub_live_...' });
// 1. Request 6-digit OTP
await pgb.auth.requestOtp({ email: '[email protected]' });
// 2. Verify OTP and establish session
const { session, user } = await pgb.auth.verifyOtp({ email: '[email protected]', token: '592810' });Partitioned Object Storage & Media CDN
Store user uploads, profile avatars, documents, and media assets in per-project partitions on S3-compatible object storage. Request secure 15-minute presigned PUT URLs from the project gateway for client-side direct uploads with unified 500MB pool usage tracking.
# 1. Ask the project gateway for a presigned upload URL (secret key)
curl -X POST "https://myapp.pgbhub.app/storage/upload" \
-H "Authorization: Bearer $PGBHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"path": "avatars/user-981.png", "content_type": "image/png"}'
# 2. PUT the file straight to object storage before the URL expires
curl -X PUT "$UPLOAD_URL" -H "Content-Type: image/png" --data-binary @avatar.pngTransactional Mail Engine & Deliverability
Dispatch transactional emails with authenticated sending (SPF, DKIM, DMARC) and bounce and complaint monitoring. PGB Mail handles automatic bounce and complaint webhooks, enforces sender reputation scoring, and maintains anti-abuse outbound quotas.
// Send transactional email via PGB Mail Ingress
POST https://myapp.pgbhub.app/mail/send
Authorization: Bearer pgb_sec_live_...
Content-Type: application/json
{
"to": "[email protected]",
"subject": "Your Order Confirmation",
"html": "<h2>Your Order is Confirmed and will be shipped soon.</h2>"
}Agent-Native Model Context Protocol (MCP)
Connect autonomous AI agents, Cursor IDE, Claude Desktop, and LangChain agents directly to your database schemas, tables, and APIs. The PGB MCP Server enables LLMs to inspect schemas, execute safe parameterized queries, and run actions.
// Claude Desktop / Cursor MCP Config
{
"mcpServers": {
"pgb": {
"command": "npx",
"args": ["-y", "@pgb/mcp"],
"env": {
"PGBHUB_API_KEY": "<your PGBHub API key>",
"PGBHUB_PROJECT_ID": "<your project id>"
}
}
}
}The Full Backend Stack in One Unified Platform
Stop stitching together ten different vendors. PGB Hub combines databases, serverless compute, containers, realtime channels, auth, storage, and AI agents into a single sovereign control plane.
Serverless Compute & Feature Modules
Deploy instantly scalable Python and Node.js logic with pre-warmed runtimes. Trigger executions via standard HTTP REST, HMAC-signed webhooks, database CDC streams, or cron schedules.
export async function handle(event, { db, auth }) {
return db.orders.create({ user: auth.user.id, amount: 4500 });
}MicroVM Container Workloads
Run full Docker OCI workloads with hardware cgroups v2 isolation and memory-snapshot technology that automatically scales to zero RAM when idle.
services:
api:
image: ghcr.io/app/express:v2
port: 8080
tier: microManaged PostgreSQL & JSONB Engine
Store dynamic JSON collections with automatic GIN path indexing, perform PostGIS geospatial queries, and run pgvector semantic search with ACID reliability.
SELECT * FROM venues WHERE ST_DWithin(geom, ST_MakePoint(-122.4, 37.7), 2500);PGB Realtime Channels
Low-latency pub/sub channels with Server-Sent Events streaming, presence tracking, disconnect-recovery buffers, and a broadcast API for live client sync.
pgb.realtime.channel('orders').subscribe((event) => render(event));Built-In Auth as a Service
Complete authentication engine supporting email/password, 6-digit passwordless OTP, magic links, JWT session verification, and automatic PostgreSQL Row-Level Security scoping.
const { session, user } = await pgb.auth.verifyOtp({ email, token: '849201' });Partitioned Object Storage & CDN
Isolated per-project bucket storage on S3-compatible object storage, 15-minute presigned upload URLs, media streaming, and global CDN caching.
const { url } = await pgb.storage.upload('images/hero.png', fileData);Transactional Mail Engine
Authenticated sending (SPF, DKIM, DMARC) for transactional email, with automated bounce and complaint webhooks, template rendering, and domain reputation scoring.
await pgb.mail.send({ to: '[email protected]', subject: 'Verify Account', html: '...' });Agent-Native MCP & LLM Tooling
Connect AI coding agents, Cursor IDE, Claude Desktop, and LangChain models directly to your live database schemas and backend APIs using Model Context Protocol.
mcpServers: { pgb: { command: 'npx', args: ['-y', '@pgb/mcp'] } }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.