Skip to content

Quickstart

Gatefit checks your access DB, not Stripe HTTP 200. Node 22+.

No adapter yet? npx gatefit init generates one for drizzle, Prisma, Supabase, or plain pg. It is free. From an empty app to the first result: Onboarding. Command details: gatefit init.

Export createAdapter() (or default) with:

  • apply(event): ingest one billing event
  • snapshot(customerId): return { locked, plan?, seats?, features? }
  • reset(): required when running more than one check

locked: true means deny even if Stripe looks paid. Compare is declared-fields-only.

Reference: src/adapters/sqlite.ts in the repo. Anti-pattern: src/adapters/naive.ts (HTTP 200 as access).

Longer contract: bring-your-adapter.md.

Terminal window
npx gatefit --version
npx gatefit adapter-check
npx gatefit run --suite paid_grants_access --adapter ./src/your-access-adapter.ts

From a checkout of this repo:

Terminal window
npm install
node bin/gatefit.js adapter-check
node bin/gatefit.js run --suite tests/entitlements/goldens --adapter ./src/your-access-adapter.ts

Exit 0 means the checks passed against that adapter. Goldens lists the checks in this repository. The Stripe suite is S1–S12 (17 goldens), including free S7–S12. npm gatefit@0.8.0 is the current release and tag v0.8.0 is cut. That release includes S1–S12 (17 goldens). The $49 one-time Gatefit Indie License unlocks only chaos mode and the Polar and Paddle packs. The core, Phase 2, and S1–S12 (17 goldens) stay free.

In the Gatefit repo:

Terminal window
bash ./ci-local.sh

Do not set GATEFIT_LIVE_CLOCK for this gate. Do not use sk_live. Live Test Clocks are opt-in and documented in the repo.

See GitHub Action.