Skip to content

Groups: organise spending by household, trip, or event

Groups: organise spending by household, trip, or event

Status: Delivered
CAS: CAS-468
Delivered: 2026-04-24
PRs: #160, #163, #164, #159, #161

What’s new

Casaconomy now supports Groups — named buckets that organise transactions, members, and encryption keys by context. Out of the box every household starts with a single “Home” group and all existing transactions are backfilled into it. You can then create additional groups for events such as a shared trip or a wedding, assign transactions to them, control who belongs to each group, and archive groups when they’re over. Sensitive transaction fields (account numbers, references) are always encrypted with your private key, even within a shared group.

How to use it

Managing groups (Settings → Groups):

  1. Open Settings and navigate to the new Groups page.
  2. Your existing “Home” group is already there.
  3. Click New group to create a group. Give it a name, an optional icon, and optional lifespan / event dates (useful for time-bounded events like a trip).
  4. Use Add member to add profiles to the group.
  5. When a group’s event is over, click Archive to hide it from active views without losing the historical data.

Assigning transactions to a group:

A Group picker dropdown appears in transaction views when you have more than one active group. Select the group before adding or editing a transaction to scope it correctly. New transactions default to the currently active group.

Automatic migration: All transactions created before groups shipped have been silently moved to the “Home” group — no action needed.

What changed under the hood

  • New groups table (migration 30): stores name, icon, optional lifespan and event dates, and archived-at timestamp.
  • New group_memberships table (migration 30): tracks which profiles belong to which group and when they joined/left.
  • New nullable group_id column on transactions (migration 31), indexed for fast group-scoped queries.
  • Seed migration 32 creates the default “Home” group and backfills all existing profiles and transactions into it.
  • Seven new Tauri commands: get_groups, create_group, edit_group, archive_group, add_member, remove_member, get_transactions_by_group.
  • New Zustand store useGroupsStore with activeGroupId state that persists across sessions.
  • New UI components: GroupsSettingsPage (full CRUD) and GroupPicker (dropdown, hidden when only one group exists).
  • Two-tier encryption: group changesets use a shared group key; sensitive fields (account number, cardholder, reference) and private-scope changesets continue to use per-user private keys. The legacy KeyId::Household key is migrated to KeyId::Group(<default-uuid>) on startup.

Why we built it

A single-household model is fine for a couple, but breaks down the moment you want to track a shared trip, a wedding fund, or any context that involves different members with different visibility. Groups give the app a first-class way to partition spending, apply group-scoped encryption, and eventually filter reports and analytics by context. They are also the prerequisite for the per-group rule engine that ships in the next milestone.

Known limitations / follow-on work

  • The group picker is not yet wired into the main transaction list filter — you can assign transactions to groups and view them via get_transactions_by_group, but the main feed does not yet filter by active group.
  • Group-scoped reports and charts are not yet implemented.
  • The rule engine integration (auto-categorisation by group) landed separately in CAS-516–CAS-521 and is documented there.
  • Multi-device key distribution for group keys is deferred to a later sync phase.