Integrity in the writes you already make.

The Ghostables SDK adds the integrity layer to your existing database writes. Your queries stay as they are, and every protected write is sealed, chained and verifiable from the first deploy. Installation instructions come with SDK access.

Initialise once at startup

No separate service, no cloud dependency and no API key. Ghostables sits inside your existing database.

import { Ghostables } from '@ghostables/sdk'
import { PostgresAdapter } from '@ghostables/adapter-postgres'

const ghostables = new Ghostables({
  adapter: new PostgresAdapter({ connectionString: process.env.DATABASE_URL }),
})

// Creates the integrity tables in your database. Safe to run on every boot.
await ghostables.migrate()

Wrap a write

Pass your existing query in as a callback. Ghostables runs it in the same transaction and records the evidence alongside it.

const { result, integrity } = await ghostables.insert(
  'patients',              // entity type
  id,                      // record id
  { id, name, diagnosis }, // what gets sealed
  (conn) => conn.query(insertPatient, [id, name, diagnosis]), // your query, unchanged
)

Verify a record

Pass in the row you just read. The report tells you whether it still matches its seal, and if not, what happened to it.

const report = await ghostables.verify('patients', id, currentRow)

report.status  // 'VERIFIED' | 'STATE_MISMATCH' | 'UNAUTHORIZED_DELETE' | ...

What is available today

Runtime

Node.js and TypeScript

One SDK, typed end to end.

Adapters

PostgreSQL and MySQL

The integrity layer works unchanged on both.

Access

Integration partners

The SDK is in private beta with selected partners.

Request SDK access

Tell us what you are building and which database you use.