# Passes

> Admission passes on QR codes and NFC tags, signed with the signing-keys block: a ticket for a booking or a pass with a number of uses for a resource, a log of every scan, class credits that pay for bookings and come back on an early cancellation, and drop-ins counted against the resource's capacity with its bookings.

- Category: Scheduling
- Module: `passes`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/passes
- Page: https://bettersupabase.com/blocks/passes

## Install

```bash
npx better-supabase add passes
```

The command also installs `updated-at`, `tenant`, `access`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by passes; add installs them too.
    "updated-at": {},
    tenant: {},
    access: {},
    // Modes: "managed", "custom". The default is "managed".
    passes: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/passes`.

## Events

- `pass.admitted`
- `pass.issued`
- `pass.rejected`
- `pass.revoked`

## Related blocks

Requires: [tenant](https://bettersupabase.com/blocks/tenant.md), [access](https://bettersupabase.com/blocks/access.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md), [bookings](https://bettersupabase.com/blocks/bookings.md), [signing-keys](https://bettersupabase.com/blocks/signing-keys.md)
