---
title: "Guide people to their first result"
description: "A first run at /welcome for every new account, then an activation checklist of three to seven tasks that ticks itself off from your own events, shows progress, and goes away once done or dismissed."
canonical_url: "https://nuxt-backend.dev/docs/build/growth/engage/activation"
---
# Guide people to their first result

> A first run at /welcome for every new account, then an activation checklist of three to seven tasks that ticks itself off from your own events, shows progress, and goes away once done or dismissed.

Version: nuxt-backend 0.6.x · Tab: Build · Kind: how-to · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

A new account lands in an empty app. Two pieces get it to a first result. **Onboarding** is a short first run at `/welcome`: who they are, their workspace, who they work with. The **activation checklist** then lists the few tasks that lead to value, such as "Upload a photo" and "Publish your first strip", and ticks each off when it happens.

**What powers it natively:** Better Auth creates the account, and the event path records what people do (checked on 2026-10-25). Nothing here needs a third-party onboarding tool.

**What the package adds:** the `/welcome` page and its steps, the one redirect that leads there, `defineActivation`, `useActivation()` and `<ActivationChecklist>`.

## Define the checklist

Declare three to seven tasks in `backend/activation.ts`. Each task is done when one of your own events is recorded for the person:

```ts [backend/activation.ts]
import { defineActivation } from 'nuxt-backend/audit'

export const activation = defineActivation([
  { key: 'photo', label: 'Upload a photo of yourself', done: 'app.photo_uploaded', to: '/studio/photos' },
  { key: 'strip', label: 'Generate your first strip', done: 'app.strip_generated', to: '/studio/new' },
  { key: 'publish', label: 'Publish a strip', done: 'app.strip_published', to: '/studio' },
  { key: 'invite', label: 'Invite a co-author', done: 'workspace.member_invited', to: '/settings/members' },
])
```

Pass it to `setupAudit(components, { checklist: activation })` in `backend/audit.ts`, and re-export `getActivation` and `dismissActivation` from `audit.api` (the scaffold does). Make the last task your [activation event](https://nuxt-backend.dev/docs/build/growth/measure#name-your-activation-event), the moment the funnel reports on.

- **done** names an event kind: one of yours (`app.*`) or one the package records. A task is done the first time that event lands for the person, or for their workspace with `scope: 'workspace'`. An event recorded while an administrator visits the account never counts.
- **to** is where the task's link goes: a path of your app, or an `https:` address.
- **label** is plain text, or a label key of the form `group.key` that reads in the person's language, such as `activation.photo`: the key's message in `@nuxtjs/i18n`, or its override in app config ([Change copy and labels](https://nuxt-backend.dev/docs/build/ui/customize/labels)).

Order the tasks so the first one takes a minute and the last one is the value. Keep the list short: each extra task lowers how many people finish.

## Show it in a page

`<ActivationChecklist>` shows the tasks with progress, live:

```vue [app/pages/studio/index.vue]
<script setup lang="ts">
definePageMeta({ auth: true })
</script>

<template>
  <ActivationChecklist />
  <StripGrid />
</template>
```

It shows "2 of 4 done" with a progress bar, a link per open task, and a "Dismiss" button. Once every task is done, it congratulates once and goes away. A dismissed checklist stays dismissed for that person. Its `task` slot takes your own row, and its `congratulations` slot your own message; it emits `dismissed` and `completed`.

Build your own with `useActivation()`, which returns `tasks` (each with `done`), `progress`, `isComplete`, `isDismissed`, `readOnly` and `dismiss()`.

## Onboarding at /welcome

`<OnboardingFlow>` renders the first run on `/welcome`, a page the module mounts, and `useOnboarding()` holds its state for a page of your own:

1. **Name and avatar.** The sign-in form asks only for an address, so the name is asked here, once the account exists.
2. **The workspace.** Rename the personal workspace, or accept a pending invitation instead. A team's workspace the person joined is never renamed here, even while it is the active one.
3. **Teammates.** Invite people to the workspace ([Invite people to a workspace](https://nuxt-backend.dev/docs/build/auth/workspaces/invitations)). An app where people work alone drops this step.
4. **A plan.** Shown only when your catalog sells one, and the person may skip it ([Customize the pricing page](https://nuxt-backend.dev/docs/build/billing/pricing-page)).

Add your own steps through named slots, such as the first strip's genre ([Measure growth](https://nuxt-backend.dev/docs/build/growth/measure#ask-how-people-found-you) adds an optional question the same way):

```vue [app/pages/welcome.vue]
<script setup lang="ts">
definePageMeta({ auth: true })
// The page the person was headed for, else where sign-in lands.
const back = useReturnPath()
</script>

<template>
  <OnboardingFlow :steps="['profile', 'genre']" @done="navigateTo(back)">
    <template #genre="{ next }">
      <GenrePicker @picked="next" />
    </template>
  </OnboardingFlow>
</template>
```

`steps` lists the steps in order, the built-in ones by name (`profile`, `workspace`, `teammates`, `plan`) and yours by their slot's name. Each of your slots receives `next()` and `skip()`, and `back()`, the step's place and the whole `useOnboarding()` state. A slot named like a built-in step replaces it. `GenrePicker` is your component. The page `/welcome` is `<OnboardingFlow>` with the four built-in steps; put a page of yours at the same path to add steps, or give `pages.welcome` another path or `false`.

### When it shows

- **Once.** Completing or skipping stamps `onboardedAt` on the account, and the package stops sending the person there.
- **Right after sign-up.** One redirect, for an account created in the last day, then the person is free to go anywhere. Nothing is stored on the device: a reload before the first run is finished or skipped asks once more.
- **Never in the way.** Not during an administrator's visit, and not on `/accept-invitation`, where someone joining a workspace is already where they meant to be.
- **After the consents.** When a required [consent](https://nuxt-backend.dev/docs/build/auth/accounts/consents) is missing, it comes first, then onboarding.

## Before sign-up

The first result can come before the account. A guest may run one generation before signing up, and it is claimed into the new account at sign-up ([Run generation jobs](https://nuxt-backend.dev/docs/build/ai/jobs)).

## The emails that follow

The [lifecycle emails](https://nuxt-backend.dev/docs/build/growth/engage/lifecycle-emails#the-ready-made-flows) read the same events, so the nudges that follow sign-up stop once the person has activated.

## Coming from the current API

`<AuthForm>` no longer asks for a name on its email step: it asks for an address alone. `requireName` (on `<AuthForm>` and `useLoginFlow()`), `useLoginFlow().name` and the `auth.nameOptional` label are gone, since the name is asked here, once the account exists. A new account's name is empty until then; the account menu shows the part of the address before the `@` in its place.

## What happens when…

<table>
<thead>
  <tr>
    <th>
      Situation
    </th>
    
    <th>
      Result
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        defineActivation
      </code>
      
       gets fewer than three or more than seven tasks, two with one key, or a malformed task
    </td>
    
    <td>
      It throws when the deployment loads, naming the problem
    </td>
  </tr>
  
  <tr>
    <td>
      A task's <code>
        done
      </code>
      
       names a package kind that does not exist (<code>
        workspace.member_invted
      </code>
      
      )
    </td>
    
    <td>
      <code>
        defineActivation
      </code>
      
       throws, naming it
    </td>
  </tr>
  
  <tr>
    <td>
      A task's <code>
        done
      </code>
      
       names an <code>
        app.*
      </code>
      
       kind no code records
    </td>
    
    <td>
      The task never ticks: nothing can check a kind of yours until it is recorded
    </td>
  </tr>
  
  <tr>
    <td>
      The person is not signed in
    </td>
    
    <td>
      The checklist renders nothing
    </td>
  </tr>
  
  <tr>
    <td>
      An administrator visits someone's account
    </td>
    
    <td>
      The checklist shows their progress read-only, and dismissing is refused as <code>
        forbidden
      </code>
      
      , reason <code>
        impersonating
      </code>
    </td>
  </tr>
</tbody>
</table>

## Limits

- **Events, not page views.** A task is done when an event is recorded on the server, never from a click alone.
- **One checklist per app.** Every account sees the same tasks, so keep them to what everyone does.
- **Progress is per person** unless a task says `scope: 'workspace'`.
- **A year of history.** A task reads the activity trail, which keeps events 365 days, so a task whose event is older than that reads as open again.

## Test it

```ts [backend/activation.test.ts]
import { asUser, defineBackendTestApp } from 'nuxt-backend/test'
import { expect, test } from 'vitest'
import { api } from './_generated/api'
import schema from './schema'

const testApp = defineBackendTestApp(schema, import.meta.glob('./**/*.ts'))

test('publishing a strip ticks the last task', async () => {
  const ada = await asUser(testApp())
  await ada.mutation(api.strips.publish, { title: 'First strip' })
  const checklist = await ada.query(api.audit.getActivation, {})
  expect(checklist.tasks.find(task => task.key === 'publish')?.done).toBe(true)
})
```

## Related

- [Measure growth](https://nuxt-backend.dev/docs/build/growth/measure): how many people reach activation.
- [Send lifecycle emails](https://nuxt-backend.dev/docs/build/growth/engage/lifecycle-emails): the nudges that follow the same events.
- [Record consents](https://nuxt-backend.dev/docs/build/auth/accounts/consents): the step before onboarding.
- [Swap a part](https://nuxt-backend.dev/docs/build/ui/customize/parts#replace-a-page): put your own page at `/welcome`.
- [Record and review activity](https://nuxt-backend.dev/docs/build/auth/admin/audit-log): the events the tasks listen to.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
