Skip to content

Implement Coins shared group cloud sync backend #250

Description

@ucguy4u

Problem

Coins now has an app-side Local / Cloud mode gate for shared groups, but the actual cloud synchronization backend is not implemented yet. Group invites can be generated and parsed in the app, but joining across devices/peers still needs backend invite validation, membership creation, and event-log sync.

Scope

In scope:

  • Add Firebase Auth-backed group membership for Google users.
  • Add Firestore data model for shared groups, members, invites, events, expenses, splits, and settlements.
  • Add short-lived invite token creation/validation for https://airo.app/coins/join links.
  • Add offline-first group sync: local outbox, immutable event log, replay into local SQLite, listener-based updates.
  • Add Firestore security rules so only group members can read/write group data.
  • Keep personal transactions, personal budgets, private receipts, and local AI finance insights local by default.

Out of scope:

  • Syncing the personal ledger by default.
  • Migrating all Coins storage to cloud.
  • Firebase Dynamic Links, because that product is deprecated.

Acceptance criteria

  • Local mode works without Google sign-in.
  • Cloud mode requires Google sign-in before invite creation or shared group sync.
  • Owner can create a cloud invite and share an Airo-owned HTTPS link.
  • Receiver can open/paste the link, sign in with Google, and join the group.
  • Shared group expenses, splits, members, and settlements sync across at least two signed-in users/devices.
  • Offline writes queue locally and replay after reconnect without losing group state.
  • Sync replay from the cloud event log into local SQLite is deterministic.
  • Firestore rules deny reads/writes for non-members.
  • Unit/integration tests cover invite parsing, membership rules, event replay, and conflict handling.
  • Docs update references docs/superpowers/plans/2026-06-22-coins-local-cloud-sharing.md.

Agent

Primary: agent/offline-sync
Supporting: agent/finance, agent/security

Estimate

8-13 points, likely split into backend schema/rules, app sync client, and QA follow-up cards if it grows.

Risks

  • Data privacy: personal money data must not upload unless explicitly shared.
  • Security: invite tokens must be scoped, short-lived, and non-enumerable.
  • Conflict handling: split and settlement conflicts need review-required states, not silent overwrites.
  • Rollout: existing local groups need a clear upgrade path before cloud sharing is enabled for them.

Context

App-side precursor merged locally in main:

  • feat(coins): add local cloud sharing mode
  • feat(coins): merge local cloud sharing mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions