Skip to content

RFC Offline support #1396

Description

@Brah-Timo

Description

[RFC] Offline-First Support: Cache + Queue + Sync Engine

Suggested solution

Suggested solution:

Wrap SupabaseClient with an offline layer:

  1. Cache: cacheFirstThenNetwork strategy for instant data
  2. Queue: Store mutations in Hive when offline, auto-sync on reconnect
  3. Sync: Resolve conflicts with "last write wins"
  4. Realtime: Buffer events offline, replay when online

API stays same: UltraClient(client).from('todos').select()

PoC: https://pub.dev/packages/supabase_flutter_ultra/versions/0.1.0

Open to PRs. What's the preferred approach for conflict resolution?

Alternative

No response

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions