Basalt, inside every Driftcloud deploy.
Install the integration and Basalt adds one environment variable to your project. Edge and Node functions read views with the TypeScript SDK.
How it works.
The Driftcloud integration creates a scoped read token and sets BASALT_URL on each environment. The SDK uses fetch, so it runs in the Edge runtime and in Node, and routes to the region nearest your function.
Set it up in three steps.
Add the destination
Install Basalt from the Driftcloud Marketplace and pick a project. Preview and production get separate tokens.
# link a Driftcloud project to the workspace basalt connect vercel --project storefront --role readonly ✓ BASALT_URL set on production, preview ✓ redeploy picked up · iad1 → iad-1 · 4 ms
Shape it with a view
Write plain SQL over the source. Basalt keeps the view current with every record and tracks lineage back to the topic, partition and offset.
CREATE MATERIALIZED VIEW revenue_by_min AS SELECT date_trunc('minute', ts) AS minute, currency, sum(amount) AS revenue, count(*) AS payments FROM payments WHERE status = 'captured' GROUP BY 1, 2;
Read it from anywhere
Every view is an endpoint the moment it exists. Call it over REST, connect with any Postgres client, or use the SDK from your app.
curl https://api.basalt.dev/v1/views/revenue_by_min?limit=5 \ -H "Authorization: Bearer $BASALT_TOKEN"
What you get.
One variable
BASALT_URL carries the endpoint and a scoped token. Nothing else to configure.
Edge runtime
The SDK uses fetch only, so it runs in Edge Functions and Middleware.
Per-environment tokens
Preview deploys get their own token, so you can limit what they read.
Typed queries
Generate TypeScript types from your views with basalt types pull.
Set your data in stone.
Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.