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.
Sub-10ms 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 cgroups v2 resource isolation, hardware CPU/RAM quota enforcement, and CRIU memory snapshots that automatically freeze idle workloads to zero RAM and resume in under 20 milliseconds.
# PGB Container Specification
services:
express-api:
image: ghcr.io/ridemesh/ridemesh-api:latest
port: 5010
tier: micro
mode: hybrid
schedule:
timezone: Africa/Lagos
always_on_window: "08:00-20:00"
health_check: /healthDedicated PostgreSQL 17, JSONB & PostGIS Engine
Every project receives a high-performance PostgreSQL 17 database. Enjoy document database agility with schema-free JSONB collections and automatic GIN indexing, alongside PostGIS 3.4 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;Self-Hosted PGB Maps & Navigation Gateway
A complete, drop-in replacement for Mapbox APIs. PGB Hub serves dark & street raster/vector map tiles, Search Box autocomplete, reverse geocoding, and traffic-aware turn-by-turn routing directly from your own domain with 0% third-party API bills.
// Dart / Flutter Map using PGB Maps Gateway
TileLayer(
urlTemplate: '${mapConfig.baseUrl}/styles/v1/mapbox/streets-v12/tiles/256/{z}/{x}/{y}@2x?access_token=${mapConfig.token}',
userAgentPackageName: 'app.ridemesh',
);Built-In PGB Auth as a Service
Authenticate users effortlessly without third-party auth SaaS costs. 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 '@pgbox/sdk';
const pgb = createClient('https://ridemesh.pgbhub.app', 'pgb_pub_live_...');
// 1. Request 6-digit OTP
await pgb.auth.requestOtp('user@domain.com');
// 2. Verify OTP and establish session
const { session, user } = await pgb.auth.verifyOtp('user@domain.com', '592810');Partitioned Object Storage & Media CDN
Store user uploads, profile avatars, documents, and media assets with direct S3/R2 API compatibility. Generate secure 15-minute presigned PUT URLs for client-side direct uploads with unified 500MB pool usage tracking.
# Python boto3 S3 Upload via PGB Storage
import boto3
s3 = boto3.client(
"s3",
endpoint_url="https://ridemesh.pgbhub.app/storage",
aws_access_key_id="pgb_sec_live_...",
aws_secret_access_key="vault_secret"
)
s3.upload_file("avatar.png", "default", "avatars/user-981.png")Transactional Mail Engine & Deliverability
Dispatch transactional emails with high delivery rates. PGB Mail integrates with Amazon SES, 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://ridemesh.pgbhub.app/mail/send
Authorization: Bearer pgb_sec_live_...
Content-Type: application/json
{
"to": "rider@domain.com",
"subject": "Your Ride is Confirmed",
"html": "<h2>Driver is arriving in 4 mins</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", "@pgbox/mcp-server"],
"env": {
"PGB_PROJECT_URL": "https://ridemesh.pgbhub.app",
"PGB_API_KEY": "pgb_sec_live_..."
}
}
}
}The Full Backend Stack in One Unified Platform
Stop stitching together ten different vendors. PGB Hub combines databases, serverless compute, containers, maps, auth, storage, and AI agents into a single sovereign control plane.
Serverless Compute & Feature Modules
Deploy instantly scalable Python and Node.js logic with sub-10ms cold starts. 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 CRIU memory snapshots that automatically scale to zero RAM when idle.
services:
api:
image: ghcr.io/app/express:v2
port: 8080
tier: microDedicated PostgreSQL 17 & JSONB Engine
Store dynamic JSON collections with automatic GIN path indexing, perform PostGIS 3.4 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 Maps & Location Gateway
Drop-in Mapbox replacement with self-hosted raster/vector tiles, Search Box autocomplete, reverse geocoding, and live traffic turn-by-turn routing with 0% Mapbox dependency.
https://<project>.pgbhub.app/maps/styles/v1/mapbox/streets-v12/tiles/256/{z}/{x}/{y}@2xBuilt-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 with direct S3/R2 API compatibility, 15-minute presigned upload URLs, media streaming, and global CDN caching.
const { uploadUrl } = await pgb.storage.getPresignedUploadUrl({ path: 'images/hero.png' });Transactional Mail Engine
High-deliverability transactional email dispatch with automated AWS SES bounce and complaint webhooks, template rendering, and domain reputation scoring.
await pgb.mail.send({ to: 'user@domain.com', 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', '@pgbox/mcp-server'] } }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.