# Demo 9: Builder onboarding on the form block

**Port:** 3008 · **Postgres schema:** `onboarding` (migration slot `2026102407xxxx`) · **Services:** none (verification and payouts simulated)

## Demo moment

"We build the platform on the platform." The presenter opens "Become a builder", a flow rendered entirely from `builder-onboarding.json` by the generic form block:

1. **About you** (one click: prefill in demo mode)
2. **Skills and rates**
3. **Portfolio** (skipped on stage)
4. **Payouts** (simulated Stripe Connect onboarding; skipped or one click)
5. **Verify your identity** (simulated: choose "verified" or "requires input", mirroring Stripe Identity's sandbox test cases)
6. **Review and publish** (consent to usage rights and royalty terms)

The result is Lea's builder profile card with a **Verified** badge, the same card the licensing demo shows on the floor-plan plugin. Then switch the flow's theme (platform palette → Nordwerk → Spin Mitte) to show that each business can run its own onboarding (suppliers, members, employees) with its own design system.

## Inputs

- `form-flow.schema.json`, `seed/forms/builder-onboarding.json`
- `builder-profile.schema.json` (output), `seed/builders/*.json` (to show existing builders)
- Themes from the seed businesses; `@demo/ui` `applyTheme`

## Build notes

- **Renderer, not a hand-built form.** One `FormFlow` component renders any flow definition: field types from the schema, required checks, `show_if`, step navigation, Skip buttons (`skippable` or `demo_mode.allow_skip_all`), a "Prefill" button from `demo_mode.prefill`.
- **Step kinds:**
  - `fields`: render fields.
  - `verification` with `provider: simulated`: a panel showing the checks (document, selfie) and buttons for each outcome; set the profile's verification status and `verified_at`.
  - `payouts` with `provider: simulated`: a "Connect payouts" button that flips status to `enabled`.
  - `review`: summary of answers plus consent fields.
- **On complete:** apply `on_complete.mapping` to build a `BuilderProfile`; validate it against the schema; skipped verification gives `unverified`, skipped payouts gives `not_started`.
- **Profile card:** name, headline, skills, tools, rate, badges (Verified when verification is `verified`), stats.
- **Storage:** local state is enough; optionally save submissions and profiles in `onboarding` tables.
- **Optional stretch:** "Describe your form" → an AI generates a `FormFlow` from a sentence (for example, "supplier onboarding with VAT ID, certificates and bank details"), validated against the schema and rendered immediately.

## Fallback

A recorded walkthrough; the seeded `builder-lea.json` card as the end state.

## Done when

- The builder onboarding renders from JSON only, with skips and prefill.
- Both verification outcomes produce the right profile state and badge.
- The theme switch restyles the whole flow.
- A second flow definition (any small one you write) renders without code changes.

## Out of scope

Real Stripe Identity and Connect onboarding, file storage, auth.
