zabibu canary

man zabibucanary deploy

Deployment

The reference stack: Vercel + Supabase. The app is dual-database by design — local SQLite in development, Supabase in production, chosen by environment.

1. Get the code

git clone https://github.com/Zabibu-Technika/zabibu-canary.git
cd zabibu-canary
npm install

2. Configure the environment

# .env (development)
TOKEN_SECRET=any-dev-secret
DATABASE_URL=file:./data/groundtruth.db

TOKEN_SECRET signs the stateless demo tokens — symmetric on purpose, because both ends are us. DATABASE_URL selects the local SQLite store.

Receipts are a different matter: they are signed with an Ed25519 key, so verification needs the matching public key. In the CLI that key is yours and never moves. A server deployment has no such luxury — set both variables, or accept that receipts stop verifying when the process restarts:

npx vercel env add ZABIBU_SIGNING_KEY production
npx vercel env add ZABIBU_VERIFY_KEY production

3. Deploy to Vercel

npm i -g vercel
vercel login
vercel link
vercel --prod

Or connect the GitHub repo in the Vercel dashboard for automatic deploys on every push to main. Production URL: zabibucanary.vercel.app.

4. Production storage (Supabase)

  1. 1
    Create a project at supabase.com.
  2. 2
    Run supabase/migrations/0001_init.sql in the SQL editor — creates the tables with row-level security enabled.
  3. 3
    Add the variables to Vercel (they stay out of the repo):
npx vercel env add SUPABASE_URL production
npx vercel env add SUPABASE_SERVICE_ROLE_KEY production
npx vercel --prod

The store prefers Supabase automatically when those variables are present — no other change needed. The service-role key is used server-side only and never sent to the browser.

5. Publish the CLI to npm

npm login
npm publish --workspace packages/engine      # the shared engine first
npm publish --workspace cli                  # the zabibucanary CLI

Both packages ship MIT-licensed with publish metadata already prepared. Once the CLI is on npm, the install tabs on the website and the /install script resolve to it directly.

Self-hosting anywhere else

Any Node 22+ host works: npm run build && npm start. For persistent storage without Supabase, point DATABASE_URL at a file: path on a mounted volume.

Security checklist for production

  • Real Ed25519 keys in ZABIBU_SIGNING_KEY / ZABIBU_VERIFY_KEY — the private key is the ledger's root of trust, so keep it out of the repo and rotate it on exposure
  • TOKEN_SECRET and INDEXNOW_SECRET set to real random values — without the first, demo tokens fall back to a default published in this repo and become forgeable; without the second, anyone can make your deployment ping IndexNow
  • .env never committed — .gitignore covers it
  • Sign your commits (git config user.signingkey)
  • Rotate any key that was ever committed — the engine flags them for a reason

zabibu canary — a Zabibu Technika product · built by Tehillah Kachila