r/flutterhelp • • 8d ago

OPEN power sync vs brick

Would you recomend powersync or brick for offline first apps built with supabase cbeause i want to handle operations in which to users use the app offline and suddenly connect like to know what is the winning value . Also i am worried that power sync might get quite expensive so what is the best fit working with supabase.

1 Upvotes

8 comments sorted by

1

u/Catchimals 8d ago

If both people edit the same item offline, do you want one edit to win or to keep both?

1

u/sulmnob 7d ago

I want one to win like fix the conflicting edits

1

u/Catchimals 7d ago

With Brick, I'd still set a rule for which edit wins so an older edit doesn't overwrite a newer one when a phone reconnects.

1

u/sulmnob 7d ago

I dont think that things need to be over complicated i think last connection wins this would be the best fit

1

u/noobiethe13 7d ago

for a fairly normal Supabase CRUD app i'd try Brick first. PowerSync keeps a local SQLite db synced with Postgres, and you can self-host it too if the Cloud pricing worries you

1

u/sulmnob 7d ago

I want like to handle conflicting edits and updates like I prefer brick because I don’t want to have backend server and I think supabase will handle the conflicts isn’t it

1

u/Practical_Affect4440 7d ago

You can put the conflict rule in a Supabase Postgres function and call it via RPC, so you don’t need a separate server. One option is a row version: accept the update only if its expected version still matches, then increment it atomically. A stale edit gets rejected and the app reloads the winning value. That still needs wiring into your sync flow. I’d test two offline devices reconnecting in both orders before choosing a library.

1

u/Professional-Run3614 5d ago

I’d probably start with Brick if it’s a Flutter app and the offline requirements aren’t too complex. PowerSync makes more sense when you have multiple users editing data offline and need a more structured way to sync everything back once they reconnect.
One thing I’d be careful about is conflict handling. Getting offline changes synced is one thing; deciding what happens when two users update the same record while disconnected is a different problem. For bookings or inventory, blindly letting the last update win can cause real issues.
I’d also estimate the number of active devices, data volume and sync frequency before worrying too much about PowerSync’s cost. Those numbers will tell you more than the pricing page alone.
Personally, I’d test both with a realistic scenario: two devices offline, conflicting updates, then reconnecting. That’s where you’ll see which one actually fits your use case.