Skip to content

Onboarding: multi-profile + group flows

Onboarding: multi-profile + group flows

Status: Delivered
CAS: CAS-713 (closes CAS-713, CAS-715, CAS-716, CAS-719)
Delivered: 2026-04-26
PRs: #234 (Steps 1b, 1c, deep-link)

What’s new

The onboarding flow now handles households with multiple people. A user can add housemates during sign-up, name the household, and the app creates a permanent group automatically. A deep-link handler is registered so invite codes can be accepted directly from a link.

How to use it

Step 1b — Add people in your home:

  1. After creating the first profile, the onboarding presents the “Add people” step.
  2. Tap the + row to add a housemate by name. Each row creates a real profile via add_profile.
  3. Rows can be removed before proceeding. At least one profile must exist to advance.
  4. If a housemate is not present, you can skip the step; they can be added later via an invite link.

Step 1c — Name your home (conditional on 2+ profiles):

  1. If two or more profiles were added in Step 1b, the app presents a “Name your home” step.
  2. Enter a household name and confirm. The app calls create_group and creates a permanent household group containing all profiles from Step 1b.
  3. The group ID is persisted; all future shared invoice and receipt operations refer to it.

Deep-link invite acceptance:

  1. Opening a casaconomy://invite/<code> URL on the device fires the invite://deep-link-received event on the frontend.
  2. The onboarding (or invite screen, if already past onboarding) receives the event and pre-fills the code into the invite redemption flow.
  3. No manual copy-paste required.

What changed under the hood

  • AddPeopleStep.tsx — new onboarding component; dynamic profile-creation rows, calls add_profile per row, surfaced errors via Mantine Alert, ScrollArea mah={320} keeps footer visible at five-plus rows on 1280×800.
  • NameHomeStep.tsx — new onboarding component; calls create_group with all profile IDs collected in Step 1b; conditional render (only when ≥ 2 profiles exist).
  • OnboardingPage.tsx — wired both new steps into the multi-step flow; manages collected profileId[] state passed forward from 1b into 1c.
  • add_profile backend — now returns the full Profile struct (including DB-assigned id), so the frontend can thread profileId through without a second lookup.
  • tauri-plugin-deep-link — added to Cargo.toml and registered in lib.rs; the casaconomy://invite/<code> scheme is declared in tauri.conf.json; the plugin fires invite://deep-link-received on the main window’s event bus.
  • Capabilitiescapabilities/default.json updated for the deep-link plugin.

Why we built it

The existing onboarding stopped at a single profile — the household-sharing features introduced in the CAS-468 groups epic (encryption, invite codes, shared invoices) are only reachable if multiple profiles exist and are linked to a group. Steps 1b and 1c bring that bootstrapping into the first-run experience so households are properly configured from day one rather than requiring a manual post-onboarding setup detour.