Integrate in minutes. Prove in production.
@substrate/client SDK, Supabase edge proxies, 176-route OpenAPI, and a live
ingest → evaluate → replay demo on the hosted API.
Governed path demo
Four-step flow via Supabase edge → Fly.io API. Emits a real integrity receipt and replays it.
- API live
- Ingest signal
- Evaluate integrity
- Replay receipt
Application quickstarts
—
Core endpoints
Hosted API: …
OpenAPI: substrate-runtime.openapi.json
@substrate/client SDK
Lightweight fetch client for direct API or Supabase edge proxies. Monorepo package at
packages/substrate-client.
import { SubstrateEdgeClient, DEMO_PRESETS } from "@substrate/client";
const client = new SubstrateEdgeClient({
supabaseUrl: process.env.SUPABASE_URL!,
anonKey: process.env.SUPABASE_PUBLISHABLE_KEY!,
tenantId: "00000000-0000-0000-0000-000000000001",
functions: {
apiLive: "substrate-api-live",
signalsIngest: "substrate-signals-ingest",
integrityEvaluate: "substrate-integrity-evaluate",
receiptReplay: "substrate-receipt-replay",
},
});
const body = {
...DEMO_PRESETS.policyCorpus.body,
sourceId: `demo-${Date.now()}`,
};
const result = await client.runGovernedPathDemo(body);
console.log(result.receiptId, result.replay?.replayStatus);
Direct HTTP (Fly or local): use SubstrateHttpClient with
baseUrl + x-tenant-id.
OpenAPI explorer
176 routes generated from the live Fastify registry — route parity enforced in CI. Schema depth is generic today; typed request bodies land in Phase E.
Self-host quickstart
git clone https://github.com/kevinbrodzinski/tracescript-substrate.git cd tracescript-substrate pnpm install --frozen-lockfile docker compose up -d postgres pnpm db:migrate pnpm dev:api pnpm smoke:api
Remote smoke
export SUBSTRATE_API_URL=https://tracescript-substrate-api.fly.dev export SUPABASE_URL=https://igkxlzaultmzjvfdckzg.supabase.co export SUPABASE_PUBLISHABLE_KEY=your-publishable-key pnpm smoke:remote
Application whitepapers map to demo presets — Policy Corpus, Disclosure Firewall, Action Firewall, Retrieval Integrity, Memory Firewall. For the full language lineage (specs v0.1–v0.5, Code Medium, configuration assembly), see Language foundation.