# Onboarding

> Onboarding checklists per user or organization, run as enrollment programs: the completed steps, completed by hand or by an outbox event type. Organization checklists check onboarding.read and onboarding.complete.

- Category: Growth & engagement
- Module: `onboarding`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/onboarding
- Page: https://bettersupabase.com/blocks/onboarding

## Install

```bash
npx better-supabase add onboarding
```

The command also installs `updated-at`, `memberships`, `permissions`, `enrollments`.

## Configure

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

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

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

## Client

The React hooks are the registry item `@better-supabase/use-onboarding` (`npx shadcn add @better-supabase/use-onboarding`). They return data and actions and render no UI. Source: https://github.com/ScaleDockHQ/better-supabase/blob/main/packages/registry/items/hooks/use-onboarding.ts

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [enrollments](https://bettersupabase.com/blocks/enrollments.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md)

## Recipes

- [Onboarding checklist](https://bettersupabase.com/recipes/onboarding-checklist.md): The organization's getting-started steps with progress, hidden once every step is done.
